rsl-v1.43/0000755000102200007640000000000011747614602007434 500000000000000rsl-v1.43/CHANGES0000644000102200007640000023120211747613762010355 00000000000000/* Changes for RSL * *--------------------------------------------------------------------- * v1.43 Released 4/30/2011 * * 1. nsig_to_radar.c: Added antenna scan mode to radar header. * Added azimuth to sweep header for RHI. * Fixed a bug that caused incorrect elevation in ray headers for RHI. * 2. nsig.c (nsig_read_sweep): Bug fix: Removed static qualifier from * ingest structure definitions, which caused problems if multiple radars * are ingested. Also turned off debug print accidently left on * in previous release. Thanks to James Ward for the bug report. * 3. wsr88d.c, wsr88d_to_radar.c: Fixed problem that occurred in the rare * case in which a non-data message appears among data messages. * wsr88d_to_radar.c: Bug fix: Initialize sweep elevation. * Thanks to Dan Sheldon for the bug reports and fixes. * 4. configure.in: Changed default directory to /usr/local/trmm/. * 5. Removed references to EDGE. Thanks to Andy Spencer for the patch. *--------------------------------------------------------------------- * v1.42 Released 7/12/2011 * * 1. radar_to_uf.c (RSL_radar_to_uf_fp): Changed scale_factor used for storing * differential phase (PH) in UF from 100 to 10. The usual scale factor * of 100 caused values over 327.67 to become negative when converted to * short integer. *--------------------------------------------------------------------- * v1.41 Released 6/22/2011 * * 1. wsr88d_m31.c: Simplified the WSR-88D ray structure and supporting code. * Added support for dual-polarization data fields. * Thanks go to Andy Spencer for code contributions. * wsr88d_to_radar.c, wsr88d_m31.c: Renamed load_wsr88d_m31_into_radar to * wsr88d_load_m31_into_radar, to be consistent with naming convention. * 2. Added support for Sigmet 2-byte data types, as well as HydroClass 1 and 2 * byte types. Files involved: nsig_to_radar.c, nsig.c, nsig.h, volume.c. * Modified nsig_to_radar.c and rsl.h to handle Sigmet dual PRF. * Thanks to Fabio Sato and Cesar Beneti for the dual PRF code. * 3. Completed DORADE ingest. Files involved: dorade_to_radar.c, dorade.c, * volume.c. * 4. rsl.h, radar.c, radar_to_uf.c, uf_to_radar.c, volume.c: modified for RHI. * nsig_to_radar.c: Thanks go to Scott Collis for a bug fix involving RHI. * 5. anyformat_to_radar.c: Thanks to Thiago Biscaro for fixing a pipe problem * that caused processes to remain open. * 6. gzip.c: Thanks to Dan Sheldon for fix for a file descriptor leak. *--------------------------------------------------------------------- * v1.40 Released 10/10/2008 * * 1. wsr88d_m31.c (load_wsr88d_m31_into_radar): Corrected a potential problem * in which the end of sweep or volume might occur at a point in the program * that was isolated from the code that handles that condition. * Store vcp in radar header. * 2. rsl.h: Added vcp to radar header structure for WSR-88D. * 3. nsig_to_radar.c: Corrected a problem involving Extended Header, which * when present, caused elevation in ray header to be set to 0. * 4. wsr88d_m31.c (wsr88d_load_ray_into_radar): Changed the way we determine * whether or not to keep the reflectivity field (we don't want it from * Doppler split cuts). The previous method was inadequate for VCP 121. * 5. read_write.c (RSL_write_radar_fp, RSL_write_volume, RSL_write_sweep) * (RSL_write_ray): Initialize header_buf to zero to avoid junk in output * files. This provides clean outputs for comparing in test situations. *--------------------------------------------------------------------- * v1.39 Released 07/24/2008 * * 1. Added wsr88d_m31.c. It contains routines to handle new Message Type 31 * in WSR-88D Level II Build 10. * 2. wsr88d_to_radar.c: Modified to call message 31 routine. * 3. wsr88d.c: Added code for VCPs 211, 212, 213. * 4. lassen_to_radar.c: Added a fix for PhiDP provided by Scott Collis of BMRC. * *--------------------------------------------------------------------- * v1.38 Released 11/29/2007 * * 1. wsr88d.c (wsr88d_read_sweep): Modified to handle unusual message packets * at start of WSR-88D files from some future GPM sites. * *--------------------------------------------------------------------- * v1.37 Released 06/19/2007 (Severity: low) * * 1. radar_to_uf.c, uf_to_radar.c: Modified to use Local Use Header to store * and retrieve WSR-88D VR azimuth. This is necessary because WSR-88D runs * separate scans for DZ and VR at lower elevations, which means that they * have different azimuths for a given ray. Thanks go to Pat Kennedy of CSU * for discovering this problem and for bringing it to our attention. * 2. lassen_load_sweep in lassen_to_radar.c: Removed 1.4 dB correction for * reflectivity--BMRC version no longer uses it. * *--------------------------------------------------------------------- * v1.36 Released 08/29/2006 (Severity: low) * * 1. Forgot to put the modified wsr88d_locations.dat file into previous * release. * *--------------------------------------------------------------------- * v1.35 Released 08/28/2006 (Severity: low) * * 1. lassen_to_radar.c: fixed a bug in lassen_load_sweep where sweep index * was being used for sweep number in headers. * 2. radar.c: Modified RSL_get_volume to return volume for any field type. * It had been limited to velocity, spectrum width and reflectivity types. * 3. Added SQ_INDEX for Signal Quality Index field. Files modified: rsl.h, * volume.c, nsig_to_radar.c, nsig.h, uf_to_radar.c, radar_to_uf.c. * 4. wsr88d_locations.dat modified to change height units from feet to meters. * Thanks go to Dave Makofski for finding and fixing that one. * *--------------------------------------------------------------------- * v1.34 Released 02/15/2006 (Severity: low) * * 1. wsr88d.c: Fixed a bug in checking msg_type. The problem occurred while * processing data from Houston, which recently switched over to the new * Open RDA (ORDA) being implemented by NEXRAD. Msg_type is in the * righthand byte of a two-byte word, the left containing Channel ID, * but the full two-byte value was being used to check msg_type. This * became a problem when ORDA used a non-zero value for Channel ID. * 2. wsr88d.c and wsr88d_to_radar.c: Added information for new VCPs 12 and * 121. * 3. Added Huntsville site to wsr88d_locations.dat. * *--------------------------------------------------------------------- * v1.33 Began 02/25/2004. Released 08/27/2004 (Severity: low) * * 1. Modified wsr88d_to_radar.c and anyformat_to_radar.c to handle change in * WSR-88D header record for Level II Build 5 data format. * 2. Fixed a bug in wsr88d.c, wsr88d_read_sweep, which caused the last ray * of sweep to be deleted along with empty rays in second tilt and above. * *--------------------------------------------------------------------- * v1.32 Began 11/05/2003. Released 02/13/2004 (Severity: low) * * 1. Changed computation of sweep seconds in nsig_to_radar.c to eliminate * rounding error. * 2. wsr88d_to_radar.c: removed call to wsr88d_get_wavelength, which computed * the WSR-88D wavelength when parameters were available, or returned a * constant otherwise. Replaced with constant wavelength of 10 cm. Thanks to * Joe Holmes of SIGMET for noticing differing wavelengths between fields. * 3. Added ingest for Rainbow format. Only handles DZ. * *--------------------------------------------------------------------- * v1.31 Began 04/30/2003. Released 09/03/2003 (Severity: low) * * 1. nsig_to_radar.c: removed unused #define, made some cosmetic changes in * code and comment alignment. * 2. Makefile.am: Added line to install include-directory under target * install-exec-hook. * 3. Added code to configure.in to fix yywrap unresolved reference that * occurred when installing rsl when the TSDIS toolkit was not installed. * *--------------------------------------------------------------------- * v1.30 Began 07/30/2001. Released 03/13/2003 (Severity: low) * * 1. Increased the size of parameter arrays in nsig.c as recommended by * Paul Kucera, to accommodate NPOL polarimetric parameters. * 2. Fixed a bug in nsig_endianess in nsig.c. * 3. Modified uf_to_radar to compute unambiguous range using PRF. Reduced * UF record length by removing extra byte at end of record. Made to handle * 4-digit years (previously assumed 2-digit, as declared in UF documention). * 4. Modified hdf_to_radar to use more accurate value for sweep.h.nrays. * 5. Corrected computation in function wsr88d_get_azimuth_rate in wsr88d.c. * 6. Fixed bug in sweep rate computation in wsr88d.c * 7. Changed wsr88d_ray_to_float in wsr88d.c to use field data pointers * provided in the data, instead of computing offsets. The latter method is * incorrect according to NOAA Radar Operations Center. * 8. Modified radar_to_uf to get fixed angle for mandatory header from value * stored in ray. Previously used average elevation of sweep. * 9. Added examples/adjust_gate_size.c, and added enhanced version of qlook.c * which uses it. *10. Fixed problem in which rsl libraries could not be built if a library * didn't already exist in the target directory. Brought configure.in up to * date with autoconf version 2.53 standards. Removed acconfig.h. *11. Removed outdated email addresses found in comments. * *--------------------------------------------------------------------- * v1.29 Began 09/19/2000. Released 4/3/2001 (Severity: low) * * 1. Modified radar_to_hdf_1.c maskBuild() to build MZ mask differently: * maskBuild was checking where CZ and DZ volumes were equal * to build MZ volume (mask). Now, maskBuild just checks where * CZ volume == BADVAL, for runtime speed, and because the comparison between * CZ and DZ volumes was corrupted by the addition of qcParm[ZCAL] to * each CZ range bin in level_1_qc.c qualityControl(). This change is * compatible with Danny Rosenfeld's algorithm by which CZ range bins * are set to BADVAL. * 2. Included Stacy Brodzik's modifications for storing calibration constants * in UF (radar_to_uf.c, uf_to_radar.c). * 3. Corrected version string and units for sweep rate written to UF mandatory * header in radar_to_uf.c, thanks to Joseph Holmes of Sigmet for catching * the inaccuracies. Corrected rounding error in latitude/longitude for UF * mandatory header in same program. Modified assignments of sweep rate * and/or azimuth rate in uf_to_radar.c and hdf_to_radar.c * *--------------------------------------------------------------------- * v1.28 Began 03/23/2000. Released: 7/24/2000 (Severity: low) * * 1. Added 3 functions to volume.c : * RSL_add_dbz_offset_to_volume() , RSL_add_dbz_offset_to_sweep(), * RSL_add_dbz_offset_to_ray() * 2. Modified nsig.h , nsig_to_radar.c , volume.c to handle sigmet's * RhoHV and PhiDP fields. * 3. Modified volume.c to fix problem with subsequent calls to * read_these_sweeps() * 4. Modified uf_to_radar.c to compute unambiguous range for * Radar structure. * *--------------------------------------------------------------------- * * v1.27 Began 01/11/2000. Released: 2/17/2000 (Severity: low) * * 1. Modified files radar_to_hdf_1.c and radar_to_hdf_2.c * to accomodate random ray lengths, eg, Berrimah data. * *---------------------------------------------------------------------- * v1.26 Began 12/11/1999. Released: 12/21/1999 (Severity: low) * * 1. Configuration change for rapic.l and rapic.y. * 2. Changed dependency for rsl.h and wsr88d.h * *---------------------------------------------------------------------- * v1.25 Began 11/30/1999. Released: 12/10/1999 (Severity: medium) * * 1. Merged branch v1.24.1. * 2. Added configure/configure.in/Makefile.in. * 3. Added Makefile.am (automake) and other related files. * 4. Configuration is a snap: * * configure --prefix=/some/dir/to/install * make install * *---------------------------------------------------------------------- * v1.24.1 Began 8/1/1999. Released: 11/30/1999 (Severity: new features) * * 1. Introduced radar->h.project[24] -- project name. * 2. Added dorade ingest -- RSL_dorade_to_radar. * 3. Added examples/kwaj_subtract_one_day.c -- fix KWAJEX dates. * 4. Removed rsl_popen/pclose routines from gzip.c. I found * a way to eliminate the 'Broken pipe' message, the message * reappeared in linux 2.2.* series, by flushing the * stream when looking at the magic numbers in anyformat_to_radar.c. * 5. HDF ROUTINES ARE REMOVED. I have moved them to gvs for level_1. * See gvs/src/gvslib/. That's where they live now. The interface * RSL_hdf_to_radar and RSL_radar_to_hdf remain as hooks. If * you have libgvs, then you can specify -DHAVE_TSDIS_TOOLKIT in * the Makefile. * *---------------------------------------------------------------------- * v1.24 Began 6/25/1999. Released: 6/28/1999 (Severity: bug fix) * * 1. UF ingest improperly set the Fixed angle. * 2. Removed max_reasonable_dbz (60) from gts.c. The app must decide * what a max allowable dbz is. * *---------------------------------------------------------------------- * v1.23 Began 3/31/1999. Released: 4/2/1999 (Severity: upgrade) * * 1. Added EDGE format ingest. This requires the library ETOR * which is obtained from Enterprise Electronics. * To build this component, set -DHAVE_EDGE in Makefile. * *---------------------------------------------------------------------- * v1.22 Began 3/4/1999. Released: 3/4/1999 (Severity: bux fix) * * 1. Forgot to set the global 'rsl_kdp_wavelen' in nsig_to_radar.c. * *---------------------------------------------------------------------- * v1.21 Began 02/16/1999. Released: 3/4/1999 (Severity: minor bux fix) * * 1. UF code didn't recognize VE, now it does. * 2. RSL_SPEED_OF_LIGHT unifies c throughout the library. * 3. Modification to KDP processing for Sigmet. New * F and INVF functions. * *---------------------------------------------------------------------- * v1.20 Began 11/12/98. Released: 01/25/1999 (Severity: bug fix/upgrade) * * 1. Fixed RADTEC ingest. Does RHI too, but, * RSL doesn't have any good RHI image routines. * * 2. Added: RSL_set_color_table * RSL_get_color_table * * 3. Added: '-b x' option to any_to_gif. This makes images black below * x dbz. This is a simple noise filter. *---------------------------------------------------------------------- * v1.19 Began 9/15/98. Released: 9/23/98 (Severity: bug fix) * * 1. Modified file volume.c . New INV_F, _F routines for diff refl. * * 2. Created examples/images to hold a base-line set of images * to compare when running 'run_tests'. Modified run_tests * to compare images. * *---------------------------------------------------------------------- * v1.18 Began 4/28/98. Released: 8/13/98 (Severity: upgrade) * * 1. Added routines: * RSL_radtec_to_radar -- in radtec_to_radar.c * RSL_fix_time -- in volume.c * * 2. Added files: * radtec.c * radtec.h * radtec_to_radar.c * * 3. Modified image generation. Images are produced out to 'range' * specified. Each image pixels is no longer 1km, but radius/range. * * 4. any_to_gif can now accept range and image size arguments. * * 5. RADTEC requires PKWARE routines explode and crc32. * RADTEC is built into RSL, if you specify -DHAVE_PKWARE in * the Makefile. When using RADTEC, you must link your application * staticly; with -static. * * Contact PKWARE at 414-354-8699. * * 6. Modified radar_to_hdf_1.c. Removed ZDR data from 1C-51 HDF. * * 7. Moved HDF_FILE_VERSION definition from toolkit_1BC-51_appl.h * into the application level_1.c * *---------------------------------------------------------------------- * v1.17 Began 4/23/98. Released: 4/28/98 (Severity: upgrade) * * 1. Finally received info regarding KDP (KD_INDEX) for SIGMET. * Assumming the units are similar for LASSEN. Boosted nsig_to_radar * to recognize KDP. It is really KDP * wavelength. * The units are deg*cm/km. You must divide out the wavelength, * if that is desired. * * 2. BADVAL/NOECHO mod for nsig_to_radar.c. This should affect * the values that may be stored in any possible UF output. * * WTD : lassen_to_radar.c - check the ZDR conversion, if any. Do * we need this? * WTD : RHI * *---------------------------------------------------------------------- * v1.16 Began 3/6/98. Released: 4/21/98 (Severity: bug fix/upgrade) * * 1. Changed how any_to_gif output's filenames produced. Now, they * are written to stdout. -v (verbose) and -V (all volume) options * are added. Changed image_gen.c (RSL_volume_to_gif) to output * filenames to stdout. * * 2. You really do need 'bison' (GNU yacc), 'flex' (GNU lex) and * make (GNU make) to build this library. This has been true * since v1.15 when I introduced the rapic format. These programs * are superior to those on your stock Unix system, so take the * time to install them. * * 3. README explains how to apply patches. * * 4. Eliminated the reduce/reduce conflict in rapic.y * * 5. Year 2000 compliant. * * 6. I forgot the format in sprintf. See rapic.y. * *---------------------------------------------------------------------- * v1.15 Began 2/20/98. Released: 3/4/98 (Severity: bug fix/upgrade) * * 1. Michael Whimpey from BMRC, Australia changed code, for the * different callibrations, between, Pre_mctex, mctex, Gunn_Pt * periods. Please see code where there is m.whimpey. See * lassen_to_radar.c * * 2. Added RAPIC format ingest. RSL_rapic_to_radar. * I used GNU Bison (YACC) and GNU Flex (LEX) to code the RAPIC ingest. * This format is used by the Berrimah radar. See rapic_to_radar.c, * rapic_routines.c, rapic.y, and rapic.l. * Not tested w/ older YACC and LEX found on older Unix systems. * * 3. Fixed a bug regarding the reading of stdin streams. Now * you can read compressed or uncompressed files from stdin. * Previously, you couldn't specify NULL as a filename and * have it work reliably in all cases for any file format. * This bug was found by accident and it is nothing you should * be worried about in earlier RSL releases. The reason you need * not worry about it is because 'RSL_anyformat_to_radar' cannot * accept NULL as a filename. For you to notice this, you must * have called the specific ingest routine for the format * being read: RSL_lassen_to_radar, for example. * * 4. Bug in the UF ingest. The scale_factor needs to be float. * When it was 'int', round off errors (truncation) were * happening. This affected the Velocity data, only. The reflectivity * data seemed unaffected, because, the magnitude of the values * was high enough to avoid truncation. *---------------------------------------------------------------------- * v1.14 Began 2/2/98. Released: 2/3/98 (Severity: upgrade) * * 1. Added calibration for Gunn Point radar. Assumes that * the radar name will be 'Gunn_Pt'. * *---------------------------------------------------------------------- * v1.13 Began 1/16/98. Released: 1/26/98 (Severity: minor bug fix) * * 01/16/98 * * 1. radar_to_hdf_1.c: Changed decision algorithm regarding * whether or not to write a VOS into a 1C-51 HDF file. * 1C-51 HDF VOS time_slot status is encoded within the * metaData field 'TK_GEN_DATE_INPUT_FILES'. * *---------------------------------------------------------------------- * v1.12 Began 1/12/98. Released: 1/12/98 (Severity: minor bug fix) * * 1. Changed HDF metadata item for empty granules. * *---------------------------------------------------------------------- * v1.11 Began 12/17/97. Released: 12/17/97 (Severity: minor bug fix) * * 1. Increased the size of pipecmd in RSL_write_gif and TK_MAX_FILENAME to 256.* 2. Modified image_gen.c to increase the data range of Zdr values. * 3. Bug fix in radar_to_hdf_1.c: No longer dumps core for "tiny" sweeps having fewer than 5 rays. * *---------------------------------------------------------------------- * v1.10 Began 8/27/97. Released: 10/21/97 (Severity: minor upgrade) * * 1. Modified ZDR image generation: rsl.h, image_gen.c, ZDR color tables. * 2. Added South Africa data format ingest. Not possible to * interface in RSL_anyformat_to_radar, at this time. The format * is primitive and I need to convert RVPC to dBZ. * 3. Modified HDF component to maintain integrity of anomalous_condition * flags. (RFVAL, APFLAG, NOECHO, BADVAL) * Files: toolkit_1BC-51_appl.h, hdf_to_radar.c, radar_to_hdf_2.c * 4. Modified radar_to_hdf_1.c for TSDIS/DAAC metadata requirements. * 5. Modified any_to_gif.c to output site and date/time for image filenames. * 6. Added QC algorithm parameter. Modified files: * toolkit_1BC-51_appl.h, radar_to_hdf_1.c, radar_to_hdf_2.c, * hdf_to_radar.c * *---------------------------------------------------------------------- * v1.9 Began 8/18/97. Released: 8/18/97 (Severity: bug fix) * * 1. Mofified radar_to_hdf_1.c : Metadata mods for TSDIS. * *---------------------------------------------------------------------- * v1.8 Began 7/30/97. Released: 8/05/97 (Severity: upgrade) * * 1. Added RSL_read_these_sweeps. Specify specific sweep numbers for * ingest. This drastically speeds up ingest, if you're only interested * in the first or first couple of sweeps. For example, making * base scan images. * wsr88d -done * UF -done * sigmet -done * lassen -done * HDF -done * toga -done * mcgill -done. BUT, apparently, mcgill ingest is broken!!! * When did this happen? * * 2. Added RSL_load_zdr_color_table(); * Includes color tables for this field. See colors/ * * 3. More HDF mods; more warning messages. * * 4. The TRMM Office has fixed several bugs in the TSDIS toolkit. * For proper HDF creation, that conform to TSDIS HDF specifications, * you will need toolkit 4.5r1.1. * * Toolkit 4.5r1.1 is an unofficial release; the TRMM office will * pass this out upon request. * *---------------------------------------------------------------------- * v1.7 Began 7/23/97. Released: 7/25/97 (Severity: bug fix) * * 1. Handles corrupt SIGMET files more gracefully. * * 2. All lat/lon (degree,minute,second) triplets have the same sign. * Except, if UF, then what ever the file tells me and if they're * not all the same sign, then you'll have * to correct the UF w/ an RSL application. In other words, UF * stores the lat/lon as deg/min/sec and they have their own signs; * Strict UF have deg/min/sec all w/ the same sign, anyway. * * 3. Minor changes to HDF component of RSL. *---------------------------------------------------------------------- * v1.6 Began 5/02/97. Released: 7/23/97 (Severity: bug fix) * * 1. wsr88d_to_radar.c -- Was too permissive. No longer defaults to KMLB. * If unable to establish a valid site based on callID or first_file, * returns NULL. * * 2. 18 Jul 97 Kolander * Modified radar_to_uf.c & uf_to_radar.c : Fixed some incorrect and * missing sweep and ray header values. Salvaged some numerical precision. * * 3. Fixed a time problem in nsig_to_radar.c. Daylight savings time. * * 4. Saves lat/lon on each ray for UF. * *-------------------- * 16 Jun 97 Kolander * * Modifications to radar parameter calulations in: * wsr88d_to_radar.c, wsr88d.h, wsr88d.c, nsig_to_radar.c, * lassen_to_radar.c, rsl.h * * Modified HDF-related files: * hdf_to_radar.c toolkit_1BC-51_appl.h * and split file 'radar_to_hdf.c' into two files: * radar_to_hdf_1.c and radar_to_hdf_2.c * Can handle oddly sized and/or corrupt VOSs. *---------------------------------------------------------------------- * v1.5 Began 3/17/97. Released: 4/30/97 (Severity: minor upgrade) * * 1. Additional error checking in wsr88d.c to warn when number of gates * expected is exceeded. * 2. Changes by Mike Kolander affect the HDF component of RSL. This * version of RSL works with the TSDIS toolkit 4.0. * 3. Changes to carpi and cube functions, see below. *------------------------- * Date: 26 Mar 97 kolander * * Files: radar_to_hdf.c, hdf_to_radar.c * Moved QC parameters out of the metadata string into VOS comments * field. * * Files: rsl.h, anyformat_to_radar.c * Moved enum File_type definition from anyformat_to_radar.c into * rsl.h *-------------------------- * Date: 17 Mar 97 kolander * * File: rsl.h * Changed carpi structure: * Added f, invf fields. * (Carpi_value **)data is now a doubly indexed array 'data[nrow][ncol]' * Changed slice structure: * Added f, invf fields. * (Slice_value **)data is now a doubly indexed array 'data[nrow][ncol]' * Added function prototypes for: * RSL_free_carpi, RSL_free_cube, RSL_free_slice, RSL_new_cube, * RSL_new_slice, RSL_carpi_to_cart, RSL_carpi_to_gif, * RSL_carpi_to_pict, RSL_carpi_to_ppm, RSL_carpi_to_pgm * * File: cube.c * Added functions: * RSL_free_slice, RSL_new_slice, RSL_new_cube, RSL_free_cube * Modified functions: * RSL_volume_to_cube, RSL_get_slice_from_cube * * File: carpi.c * Added functions: * RSL_free_carpi * Modified functions: * RSL_new_carpi, RSL_find_rng_azm, RSL_cappi_to_carpi * * File: image_gen.c * Added functions: * (These are modified clones of the sweep image_gen functions.) * RSL_carpi_to_cart, RSL_carpi_to_gif, RSL_carpi_to_pict,, * RSL_carpi_to_ppm, RSL_carpi_to_pgm * *---------------------------------------------------------------------- * v1.4 Began 12/24/96. Released: 3/7/97 (Severity: bug fix) * * 1. Some WSR88D files have a 'radial status' of 28. This is un- * documented. I assume it means some catastrophic reset has occured. * Therefore, the code that counts the number of rays is modified * to rely on the 'ray_num' reported upon reading the file. * Also, I assume that when the status tells me that I'm reading * the 'start of a new elevation' (status == 0) that all subsequent * records will overwrite previously stored rays. * * I've seen this status number(28) occur, rarely, in the * WSR88D data. See wsr88d.c. * * 2. Removed kwaj component. - Mike. * * 3. Installs toolkit_1BC-51_appl.h in INCDIR. This file is needed * only if you plan to use the HDF component. * * 4. Fixes a freeing bug in nsig.c. Added member nparams to the * NSIG_Sweep structure to track this for the free routine. * * 5. Ray indexing bug fixed in wsr88d_to_radar.c which produced an * invalid time when the first wsr88d ray was null. Basically, using * 'i' instead of 'iray'. *---------------------------------------------------------------------- * v1.3 Began 08/26/96. Released: 12/17/96 (Severity: upgrade) * * 1. Lassen field 'Zdr' loaded into RSL 'ZD' field, not the RSL 'DR' * field, as originally envisioned within HDF functions. Henceforth, * 'ZD' represents (linear) reflectivity depolarization ratio: * ZD = 10log(Z_horiz/Z_vert) in units dB * as opposed to the circular depolarization ratio. * * What exactly are the RSL 'LR' and 'DR' fields?? * * * For consistency of field nomenclature: * * Renamed 'CR' to 'CD'. (corrected ZDR for 1C-51) * 'MR' to 'MD'. (1C-51 mask for ZDR) * * CD_F returns ZD_F * CD_INVF returns ZD_INVF * * 2. Sort by time forgot to compare the hour field. Minor fix. * * 3. Fix z_to_r to return proper value. * * 4. Lassen ingest: fix the sign of deg/min/sec so they match. * Trusting that the sign of the deg is correct. * * 5. Added RSL_select_fields. This reduces memory requirements * upon ingest. You can select, "all" (default), "none" (just to * get header info) or "dz", "vr", ... * * WHAT? STATUS? * lassen done * wsr88d done * UF done * nsig done * nsig2 done * kwaj not applicable as it only has DZ. * hdf done * mcgill not applicable as it only has DZ. * toga not done. If you want to do this, feel free. * * 6. Uses 'gzip -1'. This cuts the time for making UF files in half. * * 7. Renamed 'makefile' to 'Makefile' * * 8. The HDF component has changed drastically and is not compatable * with previous versions. It may change again, contingent upon * the TSDIS toolkit 3.5.2.1 (as of 12/17/96). Expect minor changes * to the HDF component in the future. * * 9. Pruning of sweeps and rays now sets moved object pointers to * NULL. See prune.c * *10. Updated nsig_to_radar.c to check for ant_scan_mode. If mode is * RHI, then return NULL because RSL can't handle RHIs. --Paul * *11. Split memory management routines for hdf processing. --Mike K. *---------------------------------------------------------------------- * v1.2 Began 08/26/96. Released: 9/6/96 (Severity: minor bug-fix upgrade) * * 1. Eliminated zero sized arrays in lassen.h. SGI 'cc' can't * handle zero sized arrays. This brings back the -pedantic * compile flag. * * 2. Implemented popen and pclose (called rsl_popen and rsl_pclose) * to eliminate the annoying message 'Broken pipe.' on SGI and HP * computers. * * 3. The HDF component is incompatable with earlier versions because * of the use of additional fields. It now uses the MASK fields * and calibration information. It should be considered that the * HDF component is in a state of flux. * * 4. Minor bug in nsig.c wherein when rays are missing (0 sized) * that not all rays present will be ingested. This is fixed. * * 5. Copyrighted the software. * * 6. 'anyformat_to_radar' can recognize HDF files. * *---------------------------------------------------------------------- * v1.1 Began 08/21/96. Released: 08/22/96 (Severity: SERIOUS bug fix) * If you have already upgraded to RSL v1.0.1, then this is a minor * upgrade. * * 1. I should have left well enough alone. But, getting rid * of rsl.h.template in favor of only having rsl.h has revealed * a serious bug. * * THIS BUG IS IN V1.0 ONLY. * * The type for 'Range' could be built into * the RSL differently than how your application is built. * For instance, if RSL is built with USE_TWO_BYTE_PRECISION, then * your application will think 'Range' is a one byte storage class, * because the default RSL configuration is to use one byte storage. * * This bug slipped through all the tests that I perform and was * discovered only when using the radar_to_hdf component of RSL. * Thanks to Mike Kolander for finding this one. * * Configuration instructions are changed so that you must edit * rsl.h to use one byte precision. * * 2. All MCTEX fields are recognized and loaded into Radar. * h.f and h.invf are modeled after LASSEN conversion functions. * 3. Added radar_to_hdf.o to makefile. * 4. In examples/any_to_gif.c, outputs all fields. * 5. Three convience arrays are defined in rsl.h. * a. RSL_ftype[]; * b. RSL_f_list[]; * c. RSL_invf_list[]; * Each array is MAX_RADAR_VOLUMES long and contain: strings * representing the field type, a pointer * to the F function, and a pointer to the INVF function. * * Usage is conditional by defining USE_RSL_VARS before including * rsl.h. Use: * #define USE_RSL_VARS * #include "rsl.h" * * Normally, you shouldn't worry about this. * * 6. Removed -pedantic compile flag because LASSEN code has a 0 * sized array -- no warnings. *---------------------------------------------------------------------- * v1.0 Began 04/19/96. Released: 8/18/96 (Severity: minor upgrade) * * 1. Ignore SIGPIPE when making images. * 2. Can read UF files of MCTEX data. This UF file contains * RH and PH fields. This is LASSEN data that has been converted * to UF via a sun program. It is the LASSEN II format. * 3. Fixed date/time == 0 when calling uf_to_radar multiple times. * The second and subsequent calls produced 0 for the * radar->h.year/month/day and radar->h.hour/min/second. * 4. Always allocate MAX_RADAR_VOLUMES for new radars during ingest. * This will allow one to test any volume index for presence. * 5. Set the default functions to DZ_F. This sets CZ_F correctly. * It is unclear if the other conversion fuctions are properly * defined. * 6. Pure UF file ingest bug fixes. * 7. Added RSL_hdf_to_radar - Mike Kolander. * 8. Added RSL_radar_to_hdf - Mike Kolander. * 9. New field type: XZ for X-band Reflectivity. * 10. Working version of nsig_to_radar. - Paul Kucera. * This version works on both big endian and little endian (Linux), * and, for both version 1 and version 2 formats. Version 2 * files are generated on big-endian machines (so far, SGI Iris * computers), whereas, Version 1 files were written on * little-endian DEC computers. Two routines are provided: * * RSL_nsig_to_radar(char *infile); * RSL_nsig2_to_radar(char *infile); * * Nsig ingest can handle nsig files/tapes that were * written on a DEC (little endian) or an SGI (big endian). * It is handled automatically by examination of the 'magic' bytes. * You will note that the byte-ordering in the file is dependant * on which machine wrote the tape or file. The New-SIGMET * documentation does not specify which byte-ordering is to be used * when the file is written. * * Re-wrote nsig.c and beefed up nsig.h. Now, there is an * interface to read an entire nsig sweep. You can loop through * the returned sweep and pick your values, and load RSL. * This re-write was done to make reading version 2 files easier. * Additionally, all NSIG code for version 1 and version 2 files * is centrally located in: * nsig.h * nsig.c * nsig_to_radar.c * To have both versions supported in the same files, I use #ifdef * and the C preprocessor. 'nsig.h' is saturated with #ifdef NSIG_VER2 * constructs. Thus, only one source is maintained for both NSIG versions. * * 11. Added RSL_print_version(); * 12. Added docs for users guide, hdf. * 13. Added html 'grouping by functionality' page. * 14. Restores stdin and stdout when creating pipes. * The pipe readers need to loop until no data available, because * 'read/fread' will not get all the data in one call. * 15. Added moving platform headers to Ray structure: * float pitch; Pitch angle. * float roll; Roll angle. * float heading; Heading. * float pitch_rate; (angle/sec) * float roll_rate; (angle/sec) * float heading_rate; (angle/sec) * float lat; Latitude (degrees) * float lon; Longitude (degrees) * int alt; Altitude (m) * int rvc; Radial velocity correction (units of velocity) * * This information typically comes from NSIG. For other formats * the values are all zero. * 16. Read version 1.3 and 1.4 of LASSEN data. RSL_lassen_to_radar. * This means that RSL can read MCTEX data. * 17. Users manual. Walk a novice through a simple example and explain * what header information is important. Teach how to take advantage * of the library. * 18. Eliminated the #ifeq in makefile. Thus, rsl.h.template is removed * and rsl.h is resurrected. *---------------------------------------------------------------------- * v0.45 Began 03/26/96. Froze: 03/27/96 (Severity: minor) * * 1. Fixed broken pipe problem on HP and SGI. Cause unknown. * All I did was to remove the pclose in any_format_to_radar.c * It seems that if there is any data left in the pipe that a * SIGPIPE is sent when trying to close the pipe. * On SGI's this causes a core dump. This bug is difficult to * reproduce. * 2. Nsig ingest is severly broken. It always was. Work in * progress. * 3. It is important that TSDIS get this version to run on their SGI * as it prevents a core dump. Normally, this shouldn't affect * anyone. *---------------------------------------------------------------------- * v0.44 Began 03/19/96. Froze: 03/19/96. * * 1. In prune.c, pointers that are pruned are now set to NULL. * This elimated core dumps associated with trying to free structues. * 2. On gzip-ed UF output, stdout is flushed before the pipe is opened. * 3. Added reverse.c -- Reverse the order of the sweep pointers in * a volume. *---------------------------------------------------------------------- * v0.43 Began 03/01/96. Froze: 03/05/96. * * 1. farea.c -- nbins fix. * 2. On UF output, checks for NOECHO. * *---------------------------------------------------------------------- * v0.42 Began 11/27/95. Froze: 02/16/96. * * 1. Removed '#include '. * 2. Added a couple of missing prototypes in rsl.h.template. * 3. Added: * Ray *RSL_prune_ray (Ray *ray); * Sweep *RSL_prune_sweep (Sweep *s); * Volume *RSL_prune_volume(Volume *v); * Radar *RSL_prune_radar (Radar *r); * * These routine remove dataless substructures. Prompted by * poor NCAR ingest routines for UF files; it is wise to prune * a Radar prior to calling RSL_radar_to_uf. Therefore, if * software cannot read the UF files created by RSL, then try these * prune functions before outputting the UF file. In either case, * RSL_radar_to_uf produces valid UF files. * 4. Removed trigraph in mcgill.c. * 5. Fixed lassen ingest problem on Linux. I think XDR has a bug * where bit fields are not loaded properly. This is a kludge fix. * 6. Removed column.c. Code not mature and takes way too much * RAM. Included in the removal are the vertical structure routines. * The code has been moved to the application (qcwin). * 7. RSL_get_first_ray_of_sweep now returns when the ray number is 1 or * 0. This drasitically speeds the routine. * 8. Increased the UF buffer size from 4096 to 16384. *---------------------------------------------------------------------- * v0.41 Began 11/01/95. Froze: 11/20/95. * * 1. Minor doc changes. More up to date with implementation. * 2. Implemented 'radar_type' in the radar_header structure. Values * are strings and are: "wsr88d", "lassen", "uf", "nsig", "mcgill", * "kwajalein", "toga". * 3. Increased range of data (internal storage conversion functions) * when using 2 byte storage. Some nsig data can have values below the * default wsr88d function range. * 4. 'farea.c' -- Volumes are used to compute the fractional area. * This matches the latest specification of the function. * 5. Automatically uncompress files. Transparently sets up * a decompression pipe. If the input is not stdin, then 'anyformat_to...' * can peek inside a compressed file and determine what ingest routine to * use. Reading copmressed files from disk and internally uncompressing * them turns out to be the fastest form of ingesting wsr88d (only format * timed) data on my 486. However, I get mixed results on the HP 755. * 'anyformat_to...' uses 'gunzip' to peek inside compressed files. * 6. Can make gzip-ed UF files. The new routine is 'RSL_radar_to_uf_gzip'. * Also, RSL_radar_to_uf_fp takes a file pointer. Thus, you can * define your own output filter. * 7. Added RSL_write_radar_fp, RSL_write_radar_gzip. *---------------------------------------------------------------------- * v0.40 Began 10/24/95. Froze: 10/24/95. * * 1. Type cast for Sweep_header and Ray_header was removed so that * stock 'cc' on SGI could digest the code. File: column.c. Why? * * Version 0.39 was short lived. :-) *---------------------------------------------------------------------- * v0.39 Began 7/1/95. Froze: 10/24/95. * * 1. Mcgill library is not separate. Included in rsl in whole. * 2. Interpolation routines added. * 3. Added RSL_load_height_color_table -- and the colors/*height.clr * 4. Added RSL_load_rainfall_color_table -- and the colors/*rainfall.clr * 5. Removed RSL_print_{volume,sweep,ray} * 6. Removed some unused routines. * 7. Vertical_structure is its own type composed of Vertical_sweeps and * Vertical_rays (columns). * 8. Added doc/internal_routines.html. * 9. UF is exchangable between big and little endian. Finally, this * has been fixed. Now UF can be generated on little endian machines * and read on big endian (the UF generated is in big endian format even * on the little endian machine). And, visa versa. *10. New version of RSL_get_vertical_structure in column.c. Doc's updated. *11. Fixed bug in radar_to_uf. When the number of actual sweeps (and perhaps * volumes) is less than the determined max of the entire radar structure, * then the pointers may be erroneous. Paul caught this flounder. *12. Added RSL_uf_to_radar_fp. The FILE *fp version of the UF ingest. * Also, passing NULL to RSL_uf_to_radar means to read from stdin. *13. Added NOECHO flag for f and invf. Currently, defined for UF, NSIG and * Kwaj data. *14. Included source for libraries: wsr88d, lassen, tg, nsig, mcgill, * and kwajlein. Now linking needs only: -lrsl -lm *15. Simplified the configuration procedure. All configuration * is specified from 'makefile'. See README for new install instructions. *16. Removed ray_status, sec_num, atm_att, min_dif, sys_cal from ray * header. These are not used and specific for wsr88d. *17. Summary of routine that handle NULL filenames as STDIN. * RSL_wsr88d_to_radar * RSL_uf_to_radar -- calls --> RSL_uf_to_radar_fp * RSL_lassen_to_radar * RSL_nsig_to_radar * RSL_toga_to_radar * RSL_mcgill_to_radar *18. Removed RSL_get_sweep_index_from_volume. *19. Removed RSL_X_ray_indexes. Actually, just renamed the routine * to 'construct_sweep_hash_table'. The hash table retains the hi and * low ray pointers for closest ray comparison. Angle diff's removed. *20. Removed hash table implementation in the Sweep structure. It * is now implemented internally in RSL. *21. BADVAL valued depends on Range type. Picked to be out of range. * *---------------------------------------------------------------------- * v0.38 Began 6/1/95. Froze 6/29/95. * * 1. Makes 2's compliment, instead of 1's compliment, in sweep_to_cart. * 2. Modifications to eth functions. * 3. Added routine RSL_get_column. See column.c. * 4. Added Column data structure. * 5. Static pointer for image generation. Free up image pointer and * reallocate. Otherwise, we've got a memory leak when making many * images. * 6. Added Paul's and Dennis's modifications of the cappi routines. * I modified the cappi structure so that Sweep is a substructure. * This makes image generation and get_value_from_cappi easy to implement. * 7. Added a test program in examples/cappi_image.c to test cappi * generation. * 8. Change doc/ for the cappi routines. Routines added/modified are: * float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm); * int RSL_fill_cappi(Volume *v, Cappi *cap, int method); * void RSL_free_cappi(Cappi *c); * Cappi *RSL_new_cappi(Sweep *sweep, float height); * Cappi *RSL_cappi_at_h(Volume *v, float height, float max_range); * Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, * 9. Carpi structure modified to be compatable with cappi routines. * 10. Added RSL_get_gr_slantr_h. -> range.c * 11. RSL_uf_to_radar only recognizes UF files. * 12. RSL_uf_to_radar handles TRUE UF, 2 and 4 byte record length delimeters. * 13. Minor bug fix in ray_indexes.c to handle RHI input. The number of * hash table entries is now a function of the beam_width and not the * number of rays. * 14. Bug fix in rebin_velocity_sweep. New velocity color tables. * 'examples/qlook.c' added. Yet another image generation program; * redundant. * 15. RSL_uf_to_radar allocated additional space for sweeps, when the * initial allocation is not enough. * 16. Added a programmers guide. See programmers_guide.html. * 17. Get_closest routines removed. * 18. Added RSL_kwaj_to_radar. -- Mike Kolander. * 19. Added docs for RSL_kwaj_to_radar. * * Note: Since v0.37 we've been using h.f and h.invf for the storage * functions and, thus, the library is not compatable with earlier * versions. All subsequent version are, however, compatable. * This means, code that used v0.36 and earlier will break (not * even link) with v0.37 or later. * * You must now use: * ray->h.f(ray->range[i]) instead of F(ray->range[i]) * and * ray->h.invf(x) instead of INVF(x). * *---------------------------------------------------------------------- * v0.37 Began 5/24/95. Froze 5/29/95. * * 1. Removed RSL_float_to_char; too specific. * 2. Implemented seperate conversion functions for each field type. * This added h.f and h.invf to Volume, Sweep and Ray headers. * The ingest routines optionally define there own conversion function. * Most of the time, though, I use the default: wsr88d conversions. * Tested: wsr88d, lassen, mcgill, UF, rsl. * Coded but not tested: toga, nsig. * 3. Added ETH routines: * Sweep *RSL_get_eth_sweep(Volume *v,float et_point); * float RSL_get_echo_top_height(Volume *v,float azim,float grange, float et_point); * 4. If using #define USE_TWO_BYTE_PRECISION, uses 100 as a storage * factor. Now, there is no loss of precision when converting between * internal and float. Before there was just a minor round off when * using any data that used anything other than 1/2 dbz precision. * Using 100 is more than enough. *---------------------------------------------------------------------- * v0.36 Began 5/19/95. Froze 5/19/95. * * 1. Magic in anyformat_to_radar was slightly different than expected * for lassen data. Tested on lassen data. * 2. DEFAULT is to use 2 byte storage precision. See rsl.h. * 3. Several changes to get_closest routines -- Flanigan. * *---------------------------------------------------------------------- * v0.35 Began 5/18/95. Froze 5/18/95. * * 1. Checks iazim validity in ray_indexes.c. Bad angles use to cause * core dumps. * 2. wsr88d_to_radar can handle bogus filenames and callid's. * *---------------------------------------------------------------------- * v0.34 Began 5/17/95. Froze 5/18/95. * * 1. Modified the bscan interface. * * 2. Fixed a minor nrays bookkeeping bug in radar_to_uf. * * 3. Updated Sweep searching routines. * * 4. Added get_closest and get_next_closest ray searching routines. * Updated RSL_get_ray_from_sweep so that it uses the * new_get_closest function. * *---------------------------------------------------------------------- * v0.33 Began 5/12/95. Froze 5/16/95. * * 1. Configure for building using 2 byte precision instead of 1 byte. * This should quell any accuracy problems associated with the * functions F and INVF. * * 2. Added 'RSL_mcgill_to_radar'. Link with -lmcgill. * * 3. Bug fix in cube.c, cappi.c, and carpi.c. *---------------------------------------------------------------------- * * v0.32 Began 5/5/95. Froze 5/12/95. * * 1. Compiles with -Wall -ansi -pedantic. * 2. Minor bug fixes in get_win.c * 3. Compiles on SGI, 486, SUN, HP using gcc or stock cc. *---------------------------------------------------------------------- * v0.31 Began 4/28/95. Froze 5/5/95. * * 1. Added ray_high and ray_low Azimuth_hash pointers * to Azimuth_hash data structure and code in the * the routine RSL_sweep_ray_indexes to set these * pointers. ray_low points to the Azimuth_hash * with the next lowest ray_angle, with ray_high * points to the next highest. * * 2. Created internal routine dir_angle_diff. Returns * negitive difference if the second angle in * the parameter list is counter-clockwise to the * first angle. Returns positive is second * angle is clockwise tk first angle. * * 3. Added internal routine the_closest_hash. This * routine returns the an Azimuth_hash * data structure that contains the closest * ray to the requested angle. * * 4. Added two routines: RSL_get_closest_ray_from_sweep and * RSL_get_next_closest_ray_from_sweep. * * 5. Added routines: RSL_get_window_from_radar, * RSL_get_window_from_volume, RSL_get_window_from_sweep, and * RSL_get_window_from_ray. * * 6. Modified farea.c. * 7. Isolated contruction of azimuth table linked list. * 8. Fixed get_sweep NULL sweep reference (See patch v0_29_3 also). * 9. Compiles on HP CC, SGI CC, GNU CC. I had to #ifdef the * varargs declaration in anyformat_to_radar.c. Why? * 10. Added examples/killer_sweep.c. This randomizes the azimuth * values of each ray. The output checks the sortedness of the * hi and low links in the hash table. * 11. Added doc/...closest... doc/...next_closest... * *------------------------------------------------------------------------- * v0.30 Began 4/20/95. Froze 4/27/95 * * 0. IMPORTANT: Renamed libradar.a to librsl.a. Also, radar.h to rsl.h. * 1. Removed NOTFOUND_H reference in the get_ray function. * 2. Simplified get_sweep. * 3. Uses within 1/2 beam_width test in get_ray_from_sweep. * 4. Checks -1 and +1 bin in azimuth hash table to really find the * closest ray that is within 1/2 beam_width of the target azim. * Surprisingly, it shortened the get_value_from_sweep routine. * * 5. Added anyformat_to_radar.c. Uses magic information to determine * the file format. Handles: UF, RSL, WSR88D, LASSEN. Toga may * be difficult. Unknown, yet, for NSIG. Alan will get me that * information. * 6. Added beam_width to the ray structure. *------------------------------------------------------------------------- * v0.29.1 Began 4/18/95. Froze 4/18/95. * * 1. Bug fix in endian.c. Needed to initialize the word.val to 0. * 2. Bug fix in radar_to_uf.c. little_endian() call. * 3. Added Azumuth_hash to structure list in doc/. * 4. Other minor changes. *------------------------------------------------------------------------- * v0.29 Began 3/1/94. Froze ??/??/?? * * 0. Thanks to Dennis Flanigan for helping with this release. * * 1. Modified sort_rays.c. By Dennis Flanigan, Jr. * a. Added h.sorted_flag to Volume and Sweep header structures. * * b. Added routines: * int ray_sort_compare_by_time(Ray **r1,Ray **r2); * int sweep_sort_compare(Sweep **s1, Sweep **s2) * Sweep *RSL_sort_rays_by_time(Sweep *s); * Volume *RSL_sort_sweeps_in_volume(Volume *v) * Volume *RSL_sort_volume(Volume *v) * Radar *RSL_sort_radar(Radar *r) * * c. Routines that sort data structures now set the * number of structures in the parent data structure. * * d. Fixed: nsweeps was not being set correctly by * RSL_sort_sweeps_in_volume. * * 2. Removed sort calls in the ingest routines: (whatever)_to_radar. * * 3. Removed the auxillary trig tables in image_gen.c. It's just a * memory hog. * * 4. Changed the extension of the tar archives to .tgz. This * allows netscape to ftp the file rather than displaying it :-) * * 5. Added variables in the sweep data structures to represent * the half of the beam width angles. These variables are * vert_half_bw and horz_half_bw. Also added code to all * RSL ingest routines (something_to_radar) to set these values. * The half angle values are used in the volume.c searching routines. * * 6. Added h.indexes to Sweep structure. This is a simple hash * table for making azimuth lookup cake. So far, I've only * got the malloc part placed in the routines that create the * radar structure. Added the file 'ray_indexes.c'. This changes * RSL_get_value_from_ray. * * Code affected: * Modify code: * RSL_copy... * RSL_free... * RSL_clear... * RSL_sort..??? really??? * RSL_get... * RSL_{write,read}_radar * RSL_get_ray??? * * Modify doc * RSL_sweep_struct.html * * 7. Updated doc/. * * 8. Added CHECK_LIST. * * 9. Changed the name from radar-v0.?? to rsl-v0.??. * * *------------------------------------------------------------------------- * v0.28 Began 7/23/94. Froze 2/16/95 * Changes: * * 1. Support for little endian machines (*86 PC's using Linux). * Includes 'endian.c' in 'uf_to_radar.c' and 'radar_to_uf'. It is not * needed in 'lassen.c' because that program uses xdr to transfer the * data. Nor is it required in 'wsr88d_to_radar.c', 'nsig_to_radar.c' * nor 'toga_to_radar.c' because the support for little endian is in * the respective libraries: libwsr88d.a, libnsig.a, libtg.a. * * Requires: * wsr88d_v1.12.taz * lassen_v1.0.taz * libnsig_v1.3.taz * libtg_v1.1.taz * * In order to make this library compatable with versions on either * big endian or little endian machines, it will be adopted that all * output will be in big endian format. Little endian machines will * have to do the extra work of swapping bytes upon input as well as * swapping bytes on output. I could adopt to use the xdr library, * however, it seems too complicated for the simple task of always * guarenteeing that the output is in big endian format. After all, * we only support one output format: UF. (Well, we will make our own * radar format output in big endian format too, but we keep that * knowledge hush hush). * * 2. Documentation in the seperate directory complete for all routines * in the RSL. Documentation froze at v0.27 and is in HTML format. * The documentation version number will be updated to match the version * number of the most current release of RSL. Note: The live link is * in /PUBLIC/httpd/htdocs/trmm_office/software/radar/quick_reference. * It is a symbolic link to ~/proj/trmm/radar/doc/v0.xx. * * 3. Added RSL_ prefix to all documentation. This renamed the HTML files * to begin with RSL_, also. * * 4. Prefixed all routines with RSL_. Status is that it builds. * 5. Combined radar.h, cube.h and volume.h into radar.h. * *------------------------------------------------------------------------- * v0.27 Began 7/23/94. Froze 9/13/94. * Changes: * * 1. Beam width calculation in get_value_from_sweep is not 1/2 on either * side. No provision for best fit. See WTD #2. * 2. Added sort_rays.c. Sort rays in a sweeps and volumes. * 3. Added Vset_earth_radius. Set global variable 'Re' (Default: 4/3R). * 4. Added trig modification of get_slantr_and_h. * 5. Added sort rays call to: toga_to_radar, wsr88d_to_radar, * uf_to_radar, lassen_to_radar. * 6. Added cube.c. By Mike Kolander. * 7. Added carpi.c * 8. Added toga_to_radar.c. By Mike Kolander. * 9. Signed all source files. * 10. Quieted some image print statements. See image_gen.c. * 11. Changed wsr88d_to_radar so it takes 'first_file' or the 4 character * call sign (eg. KMLB). * 12. Fixed makefile so it removes libradar.a before building. This prevents * duplicate object files, only the long filenamed ones, from * appearing in the archive file. * 13. Added gts.c. By Dave Wolff. * 14. Fixed minor round off error in 'uf_to_radar' which caused a 0 dBZ spike. * 15. Added histogram.c. By Dave Wolff. * 16. Added nsig_to_radar.c. By Alan McConnell. * * WTD: * * * 2. Vget_value_from_sweep. When the beam width is increased we * want to return the value that is the best fit for a ray and not * just the first fit. Currently when the beam width is really * large then we will pick the wrong beam for the desired point. * * 3. Add the following to the ray header: * - u,v for ray. * - offset for azim, range, elev (for moving radar) * - lat/lon (for moving radar) * * 4. Bilinear interpolation. * 6. Modify get_ray_above to return a good ray so that QC doesn't zap points * near the radar. * 7. Optimize/Improve the get_value routine. * 8. Remove V prefix to routine names? * 10. Fix why there are bands of missing data when making images. * 11. Specify resolution when making images. * 14. Update: doc's (in HTML), README, etc. * 16. NEED *TESTING* suite of programs. * * Proposed changes for v0.28 * 1. Add support for little endian machines (386, 486, etc.) * 2. F(x, DZ) or ray->f.dz(x). I.e., object function conversion functions. * * *------------------------------------------------------------------------- * v0.26 Began 7/23/94. * Changes: * 1. Adding cappi_to_carpi. * 2. Enhanced the Cappi structure; not the same as a sweep anymore. * *------------------------------------------------------------------------- * v0.26 Began 7/13/94. Froze 7/20/93. * Changes: * 1. Units for wavelength, in radar_to_uf, changed from meters to cm; * as they should be. * 2. Library runs quietly. No noisy print statements. Call * radar_verbose_on() and radar_verbose_off() to control printing. *------------------------------------------------------------------------- * v0.25 Began 7/1/94. Froze 7/1/94 * Changes: * 1. Modifications to makefile to add portibility to building on * other systems w/o gcc. Change to CFLAGS. * 2. Passes lint. * 3. Moved documents radar.ez and volume.ez to ../doc (../doc_RCS). * This means that the version of the documentation will not be kept * up to the version of the RSL library. Only changes to the doc. will * force a new version of the documentation. I'll want to see if this * is a good idea. *------------------------------------------------------------------------- * v0.24 Began 6/29/94. Froze 6/29/94 * Changes: * 1. radar_to_uf, uf_to_radar. Fixed inconsistant use of BADVAL vs. * UF_NO_DATA. The latter is check and used. * 2. Added function: * float get_nyquist_from_radar(Radar *radar); * Useful, for loading non-velocity fields with PRF, PRT and NYQUIST. * 3. Made the makefile more general and added comments. * * WTD: * 1. Modify wsr88d_to_radar to fill PRF, PRT and NYQUIST values in * non-velocity rays. *------------------------------------------------------------------------- * v0.23 Began 6/27/94. Froze 6/27/94 * Changes: * 1. First distribution release. * 2. Added README w/ installation instructions. * 3. Made example_main and colors directories. * 4. Shortened lassen.h to be close to minimial. * 5. Modified makefile to only make libradar.a. Example_main/ has it's * own makefile. *------------------------------------------------------------------------- * v0.22 Began 6/24/94. Froze 6/24/94 * Changes: * 1. radar_to_uf/uf_to_radar PRF/PRT calculation corrected. * *------------------------------------------------------------------------- * v0.21 Began 6/24/94. Froze 6/24/94 * Changes: * 1. radar_to_uf: prf now in microseconds. * 2. uf_to_radar: prf now converted from microseconds to seconds. * *------------------------------------------------------------------------- * v0.20 * Changes: * Need to determine the changes. *------------------------------------------------------------------------- * v0.19 Began 6/17/94. Froze: 6/17/94. * Changes: * 1. Fixed NULL access in write_radar subroutine. * *------------------------------------------------------------------------- * v0.19 Began 6/15/94. Froze: 6/15/94. * Changes: * 1. Check for NULL in Vget_ray_from_sweep fixes a segmentation fault on * Sun. *------------------------------------------------------------------------- * v0.18 Began 6/11/94. Froze: 6/12/94 2pm. * Changes: * 1. Minor changes in volume.c. Vget_value_from_sweep now uses the * beam_width for matching rays. See Vget_sweep too. * 2. cappi.c sets the beam_width. * 3. Added radar types. There is no sure fire way to set * radar->h.radar_type to one of these values automatically, ie. from * information in the input file. It may have to be done by the * application; a runtime parameter, option. * Types are: * TOGACOARE_TOGA_SIGMET * TOGACOARE_MIT_SIGMET * TRMM_DARWIN_LASSEN * DARWIN_TOGA_SIGMET * TRMM_MELBOURNE_WSR88D * TRMM_KWAJALEIN_SIGMET * TRMM_HOUSTON_WSR88D * 4. Added function: * Sweep *Vget_first_sweep_of_volume(Volume *v); * 5. Placed the wsr88d code in wsr88d_to_radar.c (removed from radar.c). * * WORK TO DO: * 1. Rework Vget_value_from_sweep to do a better search for the value. * *------------------------------------------------------------------------- * v0.17 Began 6/10/94. Froze 6/10/94 3:30pm. * Changes: * 1. Corrected the pulse width calculation in uf_to_radar and in * radar_to_uf. *------------------------------------------------------------------------- * v0.16 Began 6/10/94. Froze 6/10/94 12:30pm. * Changes: * 1. Minor changes to radar.c because v1.3 of the wsr88d library is * now using WSR88D_DZ, WSR88D_VR, WSR88D_SW as the field type mask. * REFLECTIVITY, VELOCITY and SPECTRUM_WIDTH are not used. * *------------------------------------------------------------------------- * v0.15 Began 6/7/94. Froze 6/7/94 1pm. * Changes: * 1. Discovered that the range to bin1 calculation in radar_to_uf.c and * uf_to_radar.c was incorrect. See fh[2] and fh[3]. * *------------------------------------------------------------------------- * v0.14 Began 6/2/94. Froze 6/2/94 1pm. * Changes: * 1. Modified the date for the Radar structure for UF reading to reflect * the time of the first ray. It was the generation time of the radar * structure, however, Dave Wolff insists that it reflect the time of * the first ray. Modification to 'uf_to_radar.c' * *------------------------------------------------------------------------- * v0.13 Began 6/2/94. Froze 6/2/94 11am. * Changes: * 1. Modified radar_to_uf.c to undo the faking of the headers. This is * the correct way. * *------------------------------------------------------------------------- * v0.12 Began 5/31/94. Froze 5/31/94 7pm. * Changes: * 1. Check for malloc errors in Vnew* routines. * 2. Fixed a nasty bug in radar_to_uf. I was letting 'j' get to high * for a particular ray in a sweep. 'j' is looping on the maximum * rays possible. I noticed this bug only after Vcopy_volume to * replace a radar->v[i]. *------------------------------------------------------------------------- * v0.11 Began 5/27/94. Froze 5/27/94 12:50pm. * Changes: * 1. Modified radar_to_uf.c to fake header information when fields do * exist, eventually, but not in the current sweep. This is to allow * brain dead UF ingestors (Zeb, RDSS, etc.) to read the UF file; they * assume that whatever fields exist in the first UF sweep is constant * throughout the file. * * 2. Added functions to volume.c * Ray *Vget_first_ray_of_sweep(Sweep *s); * Ray *Vget_first_ray_of_volume(Volume *v); * *------------------------------------------------------------------------- * v0.10 Began 5/26/94. Froze 5/27/94 9am. * Changes: * 1. Modified the names of the INDEX and MASK variables. * * ZT Total Reflectivity (dBZ) ZT_INDEX * May be uncommon, but important * * DZ Reflectivity (dBZ), may contain some DZ_INDEX * signal-processor level QC and/or * filters. This field would contain * Darwin's CZ, or WSR88D's standard * reflectivity. In other words, unless * the field is described otherwise, it * should always go here. In essence, this * is the "cleanest" reflectivity field * for a radar. * * DR Differential reflectivity DR_INDEX * DR and LR are for dual-polarization * radars only. Unitless or in dB. * * LR Another form of differential ref LR_INDEX * called LDR, not sure of units * * CZ QC Reflectivity (dBZ), contains * post-processed QC'd data CZ_INDEX * * VR Radial Velocity (m/s) VR_INDEX * * SW Spectral Width (m2/s2) SW_INDEX * * 2. Fixed some MAX_RADAR_VOLUMES references in the wsr88d_to_radar code. * *------------------------------------------------------------------------- * v0.9 Began 5/25/94. Froze: 5/26/94, 10am. * Changes: * 1. Added lassen_to_radar.c * 2. Added lassen.h * *------------------------------------------------------------------------- * v0.8 Began 5/23/94. Froze: 5/24/94, 10am. * Changes: * 1. F and INVF handle APFLAG. * 2. Image generation creates unsigned char images. * 3. 255-val for negative dBz (val < 0). * *------------------------------------------------------------------------- * v0.7 Began 4/30/94. Froze: 5/20/94. * * Changes: * * 1. Uses char storage for data values, to reduce RAM allocation. * * 2. F(x) ((x-2)/2. - 64.) * 0 is for BADVAL. Bad value. * 1 is for RFVAL. Range folded. * * 3. Added functions: * Vfloat_to_char(float *x, unsigned char *c, int n); * float F(unsigned char c); * unsigned char INVF(float x); -- Inverse of F. * Radar *uf_to_radar(char *infile); * void radar_to_uf(Radar *radar, char *outfile); * * 4. Minor bug fix in wsr88d_to_radar routine. It was setting the * number of volumes to six even though we were only asking for 3. * * 5. Changed the value of BADVAL to 0500 (Octal 500). This is * a value higher than 255 (the maximum byte value) but small enough * to that when a scale factor (typically 100) is applied, the result * does not exceed the I*2 (short) magnitude. I needed this for the * UF programs. I could have tested for BADVAL, RFVAL, etc., and not * applied a scale factor when loading the UF buffer, however, changing * BADVAL and scaling everything was more general. * * 6. Made some slight modifications to the Radar header and Volume header. * *------------------------------------------------------------------------- * v0.6 Began 4/16/94. Froze: 4/30/94. * * Changes: * * 1. Azimuth angles range from -180,180 to 0,360. * 2. New color index binning function for velocity. -nyquist,nyquist * using 15 bin values. See Vrebin_velocity_sweep. * 3. Added the following routines: * * Memory management. * Ray *Vcopy_ray(Ray *r); * Sweep *Vcopy_sweep(Sweep *s); * Volume *Vcopy_volume(Volume *v); * Radar *clear_radar(Radar *r); * void Vget_groundr_and_h(float slant_r, float elev, float *gr, float *h); * void Vget_slantr_and_elev(float gr, float h, float *slant_r, float *elev); * void Vget_slantr_and_h(float gr, float elev, float *slant_r, float *h); * * Image generation preparation. * void Vrebin_velocity_ray (Ray *r); /* Modifies r */ * void Vrebin_velocity_sweep (Sweep *s); /* Modifies s */ * void Vrebin_velocity_volume(Volume *v); /* Modifies v */ * * Color table functions. * void load_red_table(char *infile); * void load_green_table(char *infile); * void load_blue_table(char *infile); * * 4. Added 4/3Re calculation to Vget_slantr_and_elev and Vget_groundr... * 5. Checked for null in the Vclear routines. * *------------------------------------------------------------------------- * v0.5 Began 4/7/94 * * Changes: * * 1. Color table functions taken out of the image routines. * You must call load_refl_table(), load_vel_table(), load_sw_table() * to load the appropriate color table before making color images. * There are seperate color tables for R, V, S. See volume.h. * * 2. Range is now used in Vsweep_to_cart. * 3. Gate size (pixel resolution in km) is now used. * 4. Added range to cappi_at_h function. It is the effective range. * 5. Added the following routines: * * Read radar from disk. * Ray *read_ray (FILE *fp); * Sweep *read_sweep (FILE *fp); * Volume *read_volume(FILE *fp); * Radar *read_radar (char *infile); * * Write radar to disk * int write_ray (Ray *r, FILE *fp); * int write_sweep (Sweep *s, FILE *fp); * int write_volume(Volume *v, FILE *fp); * int write_radar (Radar *r, char *outfile); * * Area calculations * float Varea_of_ray(Ray *r, float lo, float hi, float range); * float Vfractional_area_of_sweep(Sweep *s, float lo, float hi, float range); * * Pixel fractions * Vfraction_of_ray(Ray *r, float lo, float hi, float range); * Vfraction_of_sweep(Sweep *s, float lo, float hi, float range); * Vfraction_of_volume(Volume *v, float lo, float hi, float range); * * * 6. radar.c calls wsr88d_get_site to get additional wsr88d information * not included in the file. Routines compliments of Dan Austin. * 7. Added RFVAL. Range Folded value. Any base data value of 0 is * data below SNR thresholds set for that specific base data. Any * data value of 1 is data considered range ambiguous (folded). * A color table entry needs to be picked to represent this value. * * To do: * o I have to do something about MAX_RADAR_VOLUMES. We really should * rely on radar->h.nvolumes; * * o Add 4/3Rearth calculation to get value routines. * o Incorporate nsig_to_radar. Dennis Flanigan is writing that interface. * o Add fraction of area function. * o Add the following functions: ??? really ??? * Sweep *Vget_closest_sweep(Volume *v, float elev); * Ray *Vget_closest_ray(Sweep *s, float azim); * float Vget_closest_value_in_beam(Ray *ray, float range); * float Vget_closest_value(Ray *ray, float range); * (I'm not sure how this will be different than Vget_value) * * o Sort the rays so locating azimuth is trivial; instead of a search * algorithm as it is now. Hey, would a binary search be good enough or * do we need some hashing function? Is the lookup fast enough already? * o Add CAPPI at h. (Option for bilinear interpolation about h). *------------------------------------------------------------------------- * v0.4 Began 3/23/94 Froze: 4/7/94 * * Changes: * * 1. Made Sweep (sweep) and Ray (ray) members an array of pointers. * This changes the syntax of the access to be * v->sweep[is]->ray[ir]->range[ibin] instead of * v.sweep[is].ray[ir].range[ibin]. The benifit of this is to * be able to dynamically specify the number of sweeps or rays, * even volumes for the Radar structure, and not allocate a maximum. * This makes Vnew_sweep and Vnew_ray useful. * * 2. Added the following functions: * Volume *Vget_volume(Radar *r, int itype); * itype = REFLECTIVITY, VELOCITY, or SPECTRUM_WIDTH, etc. * * Sweep *Vget_sweep(Volume *v, float theta); * Ray *Vget_ray (Volume *v, float theta, float azimuth); * float Vget_value(Volume *v, float theta, float azimuth, float range); * Ray *Vget_ray_from_sweep(Sweep *s, float azimuth, float range); * float Vget_value_from_sweep(Sweep *s, float azimuth, float range); * float Vget_value_from_ray(Ray *r, float range); * float Vget_value_at_h(Volume *v, float azim, float grnd_r, float h); * * Ray *QC_ray (Ray *ray, int radar_type); * Sweep *QC_sweep (Sweep *sweep, int radar_type); * Volume *QC_volume(Volume *volume, int radar_type); * * Radar *QC_radar (Radar *radar); * * void write_gif(char *outfile, char *image, int xdim, int ydim, char c_table[256][3]); * void write_pict(char *outfile, char *image, int xdim, int ydim, char c_table[256][3]); * char *Vsweep_to_cart(Sweep *s, int xdim, int ydim, float range); * void Vsweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range); * void Vsweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range); * void Vvolume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range); * char *Vsweep_to_cart( * 3. When a sweep does not have any rays with any bins, then NULL is * assigned to that Sweep pointer. This occurs for reflectivity for * the 2-nd sweep index (as defined by the data) where the is no * reflectivity data, only doppler and spectrum width. Velocity and * spectrum width data do not exist for sweep number 1 (index 0). * * 4. Speed ups in Vto_cart_sweep. Math is precomputed and saved in * arrays for faster lookup. Still the ppmtogif is a snail and it * overwhelms the runtime. I only saw a 35 second improvment with * these new arrays when outputting 20 gif images. I think the -O * compile flag is doing a good job. * * 5. Added CAPPI at h. Routine in cappi.c. Cappi type is syntatically * identical to the Sweep type. * * Cappi *cappi_at_h(Volume *v, float h); * * 6. Make builds libradar.a which contains radar.c, volume.c, cappi.c and * image_gen.c. Builds on SGI, SUN and HP. * * 7. Add QC routines. See 2. above for the list. Currently they are * place holding functions with only QC_ray needing to be coded. * Paul Kucera will take care of that. * * 8. Improvments to radar.ez and volume.ez. * * To do: * o Add the following functions: * Sweep *Vget_closest_sweep(Volume *v, float elev); * Ray *Vget_closest_ray(Sweep *s, float azim); * float Vget_closest_value_in_beam(Ray *ray, float range); * float Vget_closest_value(Ray *ray, float range); * (I'm not sure how this will be different than Vget_value) * * o Add range resolution to the image generation subroutines. * o Add range resolution to all the 'get_value' routines. * o Sort the rays so locating azimuth is trivial; instead of a search * algorithm as it is now. Hey, would a binary search be good enough or * do we need some hashing function? It the lookup fast enough already? * o Add CAPPI at h. (Option for bilinear interpolation about h). * *------------------------------------------------------------------------- * v0.3 Began 3/22/94 Froze 3/23/94. * * Changes: * 1. Implimented the Radar structure. The heart of it is an array of * Volume pointers. * 2. Using 'data_mask' which is a bitwise ( | operator in C ) of * REFL_MASK, VEL_MASK, or SW_MASK, you can get any field type volume: * reflectivity, doppler velocity, or spectrum width respectively. * 3. Load volume, sweep and ray header information. * 4. Added Radar header information; need a good definition of say date and * time. * * Work to do: * - Improve carteasean image generation. * Input: radar range, pix_width, pix_height. No distortion. * - Need to specify the output GIF filename as options. * - Incorporate Vto_fraction (?? name ??) Dave's new function. *------------------------------------------------------------------------- * v0.2 Began 3/21/94 Froze 3/22/94. * * I am freezing this here because both BSCAN and CARTESEAN image generation * works. You have to hand edit the source to restrict the number of * Sweeps that are converted to images, currently only sweep 0. The inclusion * of sweep/ray header information and the collection of doppler and spectrum * width data requires substantial effort and will be in the next version. * This version freeze is a check point. * * Changes: * 1. Name rsphere change to volume. * 2. File rsphere.c changed to volume.c. (Moved the RCS file rsphere.c,v * to the graveyard directory in RCS/ * 3. Added color gif support. Reads red.clr, green.clr, blue.clr files. * This renamed the Vto_cart_pgm function to Vto_cart_gif. It is likely * that ppm support is not needed. We'll see. * 4. Fixes minor glitches in output images where the tan is undefined. * 5. Added BSCAN production as GIF files. * 6. Output sweep.xx file names; sweep.00.gif, etc. and bscan.00.gif too. * * Work to do: * - Add routines to get volumes for doppler and spectrum width. (Radar lib?) * - Improve carteasean image generation. * Input: radar range, pix_width, pix_height. No distortion. * - Add sweep header information. * - Need to specify the output GIF filename as options. * - Incorporate Vto_fraction (?? name ??) Dave's new function. * *------------------------------------------------------------------------- *v0.1 3/21/94 by John Merritt. * 1. First development version of the radar and rsphere library. * Includes test driver. radar.ez and rsphere.ez document the * functionality of the programs. This version exists to check point * the development. *------------------------------------------------------------------------- */ rsl-v1.43/depcomp0000755000102200007640000003305211354621375010733 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 2003 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. # 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 . 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 # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi 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 tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi 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 '/^# [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 rsl-v1.43/sort_rays.c0000644000102200007640000001425307634132712011547 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /*-----------------------------------------------------------------*/ /* */ /* ray_sort_compare */ /* RSL_sort_rays_in_sweep */ /* RSL_sort_rays_in_volume */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* August 26, 1994 */ /* * Update and Revisions: * * New Routines: * int ray_sort_compare_by_time(Ray **r1,Ray **r2); * int sweep_sort_compare(Sweep **s1, Sweep **s2) * Sweep *RSL_sort_rays_by_time(Sweep *s); * Volume *RSL_sort_sweeps_in_volume(Volume *v) * Volume *RSL_sort_volume(Volume *v) * Radar *RSL_sort_radar(Radar *r) * * Modifications: * Routines that sort data structures now set the * number of structures in the parent data structure. * * Routines set the enum sorted variable in the * appropriate data structure. * * Dennis Flanigan,Jr. * 3/23/95 */ /*-----------------------------------------------------------------*/ #include #include "rsl.h" static int ray_sort_compare(Ray **r1, Ray **r2) { /* Compare azim values. Return -1, 0, 1 for <, =, > comparison. */ if (*r1 == NULL) return 1; if (*r2 == NULL) return -1; if ((*r1)->h.azimuth < (*r2)->h.azimuth) return -1; if ((*r1)->h.azimuth > (*r2)->h.azimuth) return 1; return 0; } static int ray_sort_compare_by_time(Ray **r1, Ray **r2) { /* Compare time values. Return -1, 0, 1 for <, =, > comparison. */ if (*r1 == NULL) return 1; if (*r2 == NULL) return -1; /* Compare year value */ if ((*r1)->h.year < (*r2)->h.year) return -1; if ((*r1)->h.year > (*r2)->h.year) return 1; /* Compare month value */ if ((*r1)->h.month < (*r2)->h.month) return -1; if ((*r1)->h.month > (*r2)->h.month) return 1; /* Compare day value */ if ((*r1)->h.day < (*r2)->h.day) return -1; if ((*r1)->h.day > (*r2)->h.day) return 1; /* Compare hour value */ if ((*r1)->h.hour < (*r2)->h.hour) return -1; if ((*r1)->h.hour > (*r2)->h.hour) return 1; /* Compare minute value */ if ((*r1)->h.minute < (*r2)->h.minute) return -1; if ((*r1)->h.minute > (*r2)->h.minute) return 1; /* Compare second value */ if ((*r1)->h.sec < (*r2)->h.sec) return -1; if ((*r1)->h.sec > (*r2)->h.sec) return 1; return 0; } static int sweep_sort_compare(Sweep **s1, Sweep **s2) { /* Compare elevation values. Return -1, 0, 1 for <, =, > comparison. */ if (*s1 == NULL) return 1; if (*s2 == NULL) return -1; if ((*s1)->h.elev < (*s2)->h.elev) return -1; if ((*s1)->h.elev > (*s2)->h.elev) return 1; return 0; } Sweep *RSL_sort_rays_in_sweep(Sweep *s) { /* Sort rays by azimuth in passed sweep */ int a; if (s == NULL) return NULL; qsort((void *)s->ray, s->h.nrays, sizeof(Ray *), (int (*)(const void *, const void *))ray_sort_compare); /* Set nrays values to number of non-NULL indexes. * After sorting this is highest useable index. */ for(a=s->h.nrays-1; a>=0 ;a--) { if(s->ray[a] != NULL) { s->h.nrays = a+1; break; } } return s; } Sweep *RSL_sort_rays_by_time(Sweep *s) { /* Set rays in passed sweep by time */ int a; if (s == NULL) return NULL; qsort((void *)s->ray, s->h.nrays, sizeof(Ray *), (int (*)(const void *, const void *))ray_sort_compare_by_time); /* Set nrays values to number of non-NULL indexes. * After sorting this is highest useable index. */ for(a=s->h.nrays-1; a>=0 ;a--) { if(s->ray[a] != NULL) { s->h.nrays = a+1; break; } } return s; } Volume *RSL_sort_rays_in_volume(Volume *v) { /* Sort rays in the sweeps pointed to by the volume . * (Does not sort the sweeps pointers) */ int i; if (v == NULL) return NULL; for (i=0; ih.nsweeps; i++) v->sweep[i] = RSL_sort_rays_in_sweep(v->sweep[i]); return v; } Volume *RSL_sort_sweeps_in_volume(Volume *v) { /* Sort sweeps pointers in passed volume data structure. * (Does not sort rays in sweeps.) */ int a; if (v == NULL) return NULL; qsort((void *)v->sweep,v->h.nsweeps,sizeof(Sweep *), (int (*)(const void *, const void *))sweep_sort_compare); /* Set nsweeps value to number of non-NULL indexes. * After sorting, this is the highest usable index. */ for(a=0;ah.nsweeps;a++) { if(v->sweep[a] == NULL) { v->h.nsweeps = a; break; } } return v; } Volume *RSL_sort_volume(Volume *v) { /* Sort sweeps and rays by angle in the Volume data structure * passed. */ if(v == NULL) return NULL; v = RSL_sort_sweeps_in_volume(v); v = RSL_sort_rays_in_volume(v); return v; } Radar *RSL_sort_radar(Radar *r) { /* Sort sweeps and rays in all Volumes of the passed Radar data * structure. */ int a; if(r == NULL) return NULL; for(a=0; ah.nvolumes;a++) { r->v[a] = RSL_sort_volume(r->v[a]); } return r; } rsl-v1.43/rapic.y0000644000102200007640000004166611565532621010657 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ %{ #define USE_RSL_VARS #include "rapic_routines.h" #include "rsl.h" #include #include #include int rapicerror(char *s); int rapicwrap(char *s); int rapicwrap(char *s); int yywrap(char *s); int rapiclex(void); int nsweep = 0; float angres; Radar *radar, *rapic_radar = NULL; Volume *volume; Sweep *sweep; Ray *ray; /* Rapic format declarations. */ Rapic_sweep_header rh; Rapic_sweep *rs; unsigned char outbuf[2000000]; int outbytes; float azim, elev; float save_elev; int delta_time; int nray = 0; int ifield; int ivolume, isweep, iray; int station_id; int sweepcount[5]; extern int radar_verbose_flag; float rapic_nyquist; %} /* 2/18/98 - John Merritt * * This grammar parses the NT Rapic radar format. The grammar * is not minimal, however, it is self documenting; it closely matches * the brief documentation. */ /*----------------------------------------------------------------- * NT Rapic Volume Structure: * NOTE: '*' marked tokens are preent only in versions > 10.0 * * ImageHeader: * The header contains a set of tokens followed by data. * Each token is seperated by '\n' and all the data is * in ascii. * ScanHeader: * Scan header has the scan details like fieldname, * date/time azimuth,elevation etc. * The different sets of Tokens together with the data * are seperate by '\0'. * ScanData: * This represents the field data in runlehgth code. * Each Ray data contains azimuth,elevation,delta time * since start of this scan and the actual data. * * Here is a brief explanation of each of the Tokens. * * * ImageHeader: * * 1 /IMAGE: * 4 digit number * 10 digit number * * 2 /IMAGESCANS: * Number of scans in this volume * * 3 /IMAGESIZE: * Size of image in bytes * * 4 /SCAN * 1 - * seqnum as given in /IMAGE: * yymoddhhmm * Don't care ( I don't know ) * Target Elevation in degrees. * 0-4 * 0 Reflectivity ?? Index? haven't seen this yet. ?? * 1 Velocity Confirmed this index. * 2 Width Confirmed. * 3 ZDR ?? Index? haven't seen this yet. ?? * 4 Uncorrected Reflectivity. Confirmed. * Don't care * Offset to start of scan header * Size of this scan * add offset to size to get to the next scan * /SCAN is repeated for each scan in the volume. * NOTE: * Unlike other formats each scan need not represent a seperate * elevation. * * 5 /IMAGEHEADER END: * Indicates the end of Image header. * * ScanHeader: * * COUNTRY: * is a country code number * * NAME: * 8 char long station name * * STNID: * A unique number indexing into station details * * LATITUDE: * * Latitude in degrees * * LONGITUDE: * * Longitude in degrees * * HEIGHT: * * Radar height in meters * * DATE: * year = datno % 100 * if year > 80 year += 1900 * else year += 2000 * doy = datno / 100 * Get the julian Number from year,1,1 and add doy -1 * Use Julian date conversion to get calendar date. * NOTE: As simple as remembering your partner's DOB. * * TIME: * Hour and minute * * TIMESTAMP: * * year,month,day,hour,min,sec * * VERS: * 10.01 * * FREQUENCY: * * Radar Frequency. * * PRF: * Pulse repetition Frequency * * PULSELENGTH: * * Pulse length * * RNGRES: * Range between gates * * ANGRES: * BeamWidth in degrees. * * CLEARAIR: ON or OFF * * VIDRES: * Video Resolution can be * 16 OR 256. * * STARTRNG: * Range to First gate in meters. * * ENDRNG: * Maximum range. * * PRODUCT: <[id]> * Ascii text * VOLUMETRIC * NORMAL * * <[id]> * * PASS: of * Number of this scan * Max scan no. * * IMGFMT: * PPI,RHI etc. * * ELEV: * Elevation in degrees * * VIDEO: * Field Name Vel,Refl,Vel,UnCorRefl,Zdr,Wid * * VELLVL: * Velocity Level * * NYQUIST: * Nyquist Velocity * * UNFOLDING: * * None or x:y * * * @ * * AAA.A,EEE.E,TTT=LEN16D1D1D1NLD1D1D1NLNL * * AAA.A Azimuth in degrees * EEE.E Elevation in degress * TTT Delta time in seconds since the start of this scan * LEN16 2 byte long length of radial * * D1 Run length coded Data. * NL Null The Next Byte is count of NULL data. * NLNL End of this Radial * * eg. There will be no white space in the actual radial data. * * @066.1,010.6,004=002082B2817F8C84830048D72D0038 * 999C0036202D35FD2C00238A99008AFE920000 * Azimuth = 66.1 * Elev = 10.6 * Dt = 4 sec since the start * 0020 = Bytes to follow * Data = 82,B2,81,7F,8C,84,83 * 0048 = 48H null bytes * Data = D7,2D * 0038 = 38H null bytes * Data = 99,9C * 0036 = 36H Null bytes * ........................ * 0000 = End of Data. * In versions before 10.1 * @ * AAALEN16D1D1D1NLD1D1D1NLNL * * AAA Azimuth in degrees * LEN16 2 byte long length of radial * * D1 Run length coded Data. * NL Null The Next Byte is count of NULL data. * NLNL End of this Radial * * eg. There will be no white space in the actual radial data. * * @066002082B2817F8C84830048D72D0038 * 999C0036202D35FD2C00238A99008AFE920000 * Azimuth = 66 * 0020 = Bytes to follow * Data = 82,B2,81,7F,8C,84,83 * 0048 = 48H null bytes * Data = D7,2D * 0038 = 38H null bytes * Data = 99,9C * 0036 = 36H Null bytes * ........................ * 0000 = End of Data. * * Please see the attached sample.vol to give a overall picture of the data. * This is the dump of the volume with white space inserted to make it readable. * Radial data dump is in hex. */ %token IMAGE IMAGESCANS IMAGESIZE IMAGEEND %token SCAN IMAGEHEADEREND %token NUMBER %token ALPHA %token FLOATNUMBER %token BRACKETNUM %token COUNTRY %token NAME %token STNID %token LATITUDE %token LONGITUDE %token HEIGHT %token DATE %token TIME %token TIMESTAMP %token VERS %token FREQUENCY %token PRF %token PULSELENGTH %token RNGRES %token ANGRES %token ANGLERATE %token CLEARAIR ON OFF %token VIDRES %token STARTRNG %token ENDRNG %token PRODUCT %token PASS %token IMGFMT %token ELEV %token VIDEO %token VELLVL %token NYQUIST %token UNFOLDING %token AT %token VOLUMETRIC %token NORMAL %token OF %token REFL VEL UNCORREFL ZDR WID %token NONE %token RAYDATA %token ENDRADARIMAGE %union { Charlen token; } %expect 61 %% rapic_recognized : complete_header sweeps imageend { if (radar_verbose_flag) fprintf(stderr, "SUCCESSFUL parse\n"); sprintf(radar->h.name, "%s", rh.namestr); sprintf(radar->h.radar_name, "%s", rh.namestr); radar = fill_header(radar); radar = RSL_prune_radar(radar); rapic_radar = radar; YYACCEPT; } sweeps : sweep | sweeps sweep sweep : sweepheader rays ENDRADARIMAGE { /* Attach the sweep to the volume. */ if (radar_verbose_flag) fprintf(stderr, "Attach the sweep %d to the volume %d.\n", isweep, ivolume); radar->v[ivolume]->sweep[isweep] = sweep; radar->v[ivolume]->h.f = sweep->h.f; radar->v[ivolume]->h.invf = sweep->h.invf; } sweepheader : scanheader { /* float c = RSL_SPEED_OF_LIGHT; */ if (rh.angle_resolution != 0) sweep = RSL_new_sweep((int)(360.0/rh.angle_resolution+0.5)); if (fabs(rh.elev - save_elev) > .5) { /* New sweep elevation. */ isweep++; save_elev = rh.elev; } nray = 0; /* rapic_nyquist = c*((float)rh.prf/10.)/(4.*(float)rh.freq*100000.0); */ } imageend : IMAGEEND seqno imgno complete_header : imageheader IMAGEHEADEREND { if (radar_verbose_flag) fprintf(stderr, "sweepcount[0] = %d\n", sweepcount[0]); if (sweepcount[0] > 0) { radar->v[DZ_INDEX] = RSL_new_volume(sweepcount[0]); radar->v[DZ_INDEX]->h.type_str = strdup("Reflectivity"); } if (radar_verbose_flag) fprintf(stderr, "sweepcount[1] = %d\n", sweepcount[1]); if (sweepcount[1] > 0) { volume = radar->v[VR_INDEX] = RSL_new_volume(sweepcount[1]); volume->h.type_str = strdup("Velocity"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[2] = %d\n", sweepcount[2]); if (sweepcount[2] > 0) { radar->v[SW_INDEX] = RSL_new_volume(sweepcount[2]); volume->h.type_str = strdup("Spectral Width"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[3] = %d\n", sweepcount[3]); if (sweepcount[3] > 0) { radar->v[ZD_INDEX] = RSL_new_volume(sweepcount[3]); volume->h.type_str = strdup("Reflectivity Depolarization Ratio"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[4] = %d\n", sweepcount[4]); if (sweepcount[4] > 0) { radar->v[ZT_INDEX] = RSL_new_volume(sweepcount[4]); volume->h.type_str = strdup("Total Reflectivity"); volume->h.calibr_const = 0.0; } isweep = -1; /* It keeps track of the sweep number across all field * types; volumes. It is immediately bumped to 0 when * the sweepheader is parsed. */ save_elev = 99999; } ; imageheader : imageheader_item | imageheader imageheader_item | /* Empty */ ; imageheader_item : IMAGE seqno imgno { radar = RSL_new_radar(MAX_RADAR_VOLUMES); sweepcount[0] = 0; sweepcount[1] = 0; sweepcount[2] = 0; sweepcount[3] = 0; sweepcount[4] = 0; radar->h.number = atoi($2); } | IMAGESCANS number | IMAGESIZE number { if (atoi($2) <= 0) { fprintf(stderr, "RAPIC: /IMAGESIZE == %d. RAPIC ingest returning NULL.\n", atoi($2)); YYERROR; } } | scanlist ; scanlist : SCAN scanno ':' seqno datetime dc elev fieldno dc offset size { ifield = atoi($8); sweepcount[ifield]++; } /* * Now, describe some scan header fields. */ rays : ray | rays ray | /* EMPTY */ ; ray : RAYDATA { /* fprintf(stderr, "YACC len=%d text=<", yylval.token.len); */ /* binprint(yylval.token.s, yylval.token.len); */ /* fprintf(stderr, ">\n"); */ /* Quiet the compilier, because I only use the rsl_f_list and rsl_invf_list. */ RSL_ftype[0] = RSL_ftype[0]; /* Use yylval.token.s and yylval.token.len */ memset(outbuf, '\0', sizeof(outbuf)); rapic_decode((unsigned char *)yylval.token.s, yylval.token.len, outbuf, &outbytes, &azim, &elev, &delta_time); /* fprintf(stderr, "RAYDATA: ray %d, ivol %d, isweep %d, azim %f, elev %f, dtime %d, size=%d\n", nray, ivolume, isweep, azim, elev, delta_time, outbytes); */ ray = RSL_new_ray(outbytes); rapic_load_ray_header(rh, nray, isweep, elev, azim, &ray->h); /* Mostly from the scanheader (rh). */ ray->h.azimuth = azim; /* if (39h.elev = elev; ray->h.sec += delta_time; ray->h.f = RSL_f_list[ivolume]; /* Data conversion function. f(x). */ ray->h.invf = RSL_invf_list[ivolume]; /* invf(x). */ rapic_fix_time(ray); rapic_load_ray_data(outbuf, outbytes, ivolume, ray); #define DODO #undef DODO #ifdef DODO if (ray->h.ray_num == 0 && ivolume == 1 && isweep == 0) { int i; fprintf(stderr, "RAYDATA: ray %d, ivol %d, isweep %d, azim %f, elev %f, dtime %d, size=%d\n", nray, ivolume, isweep, azim, elev, delta_time, outbytes); for (i=0; ih.nbins; i++) { fprintf(stderr,"YACCray->range[%d] = %d %f\n", i, (int)ray->range[i], ray->h.f(ray->range[i])); } } #endif /* Attach the ray to the sweep. */ sweep->ray[nray] = ray; sweep->h.beam_width = ray->h.beam_width; sweep->h.vert_half_bw = sweep->h.beam_width / 2.0; sweep->h.horz_half_bw = sweep->h.beam_width / 2.0; sweep->h.sweep_num = isweep; sweep->h.elev = ray->h.elev; sweep->h.f = ray->h.f; sweep->h.invf = ray->h.invf; nray++; /* } */ } scanheader : scanheaditem | scanheader scanheaditem | /* EMPTY */ ; /* Each of these items are the header for a sweep. */ scanheaditem : NAME namestr { memmove(rh.namestr,$2,$2); } | COUNTRY code { rh.country = atoi($2); } | STNID idno { rh.station_id_no = atoi($2); } | LATITUDE lat { rh.lat = atof($2); } | LONGITUDE lon { rh.lon = atof($2); } | HEIGHT alt { rh.height = atof($2); } | DATE datno { rh.datno = atoi($2); } | TIME hhmm { rh.hhmm = atof($2); } | TIMESTAMP yyyymoddhhmmss { memmove(rh.yyyymoddhhmmss,$2,$2); } | VERS versionNumber { rh.versionNumber = atof($2); } | FREQUENCY freq { rh.freq = atoi($2); } | PRF prf { rh.prf = atoi($2); } | PULSELENGTH len { rh.pulselen = atof($2); } | RNGRES gatewidth { rh.range_resolution = atoi($2); } | ANGLERATE anglerate { rh.anglerate = atof($2); } | CLEARAIR clearair { memmove(rh.clearair,$2,$2);} | ANGRES angle { rh.angle_resolution = atof($2); } | VIDRES res { rh.video_resolution = atoi($2); } | STARTRNG rng { rh.start_range = atoi($2); } | ENDRNG rng { rh.end_range = atoi($2); } | PRODUCT typeid BRACKETNUM { memmove(rh.product_type,$2,$2); } | PRODUCT | PASS noofnscans | ELEV elev { rh.elev = atof($2); } | VELLVL level { rh.vellvl = atof($2); } | NYQUIST nyq { rh.nyquist = atof($2); rapic_nyquist = rh.nyquist; } | VIDEO field { memmove(rh.video,$2,$2); } | IMGFMT type { memmove(rh.imgfmt,$2,$2); } | UNFOLDING ratio /* Already loaded: rh.ratio1, rh.ratio2 */ ; real : number | FLOATNUMBER number : NUMBER seqno : number scanno : number imgno : number datetime : number dc : real | ALPHA elev : real fieldno : number offset : number size : number datno : number code : number namestr : ALPHA idno : number lat : real lon : real alt : real hhmm : real yyyymoddhhmmss : number versionNumber : real freq : number prf : number len : real gatewidth : number angle : real anglerate : real clearair : ON | OFF res : number rng : number typeid : VOLUMETRIC | NORMAL noofnscans : no OF nscans no : number {rh.scannum = atoi($1);} nscans : number {rh.ofscans = atoi($1);} type : ALPHA field : REFL {ivolume = DZ_INDEX; volume = radar->v[ivolume];} | VEL {ivolume = VR_INDEX; volume = radar->v[ivolume];} | UNCORREFL {ivolume = ZT_INDEX; volume = radar->v[ivolume];} | ZDR {ivolume = ZD_INDEX; volume = radar->v[ivolume];} | WID {ivolume = SW_INDEX; volume = radar->v[ivolume];} level : real nyq : real ratio : NONE {rh.ratio1 = 0; rh.ratio2 = 0;} | number ':' number {rh.ratio1 = atoi($1); rh.ratio2 = atoi($3);} %% int rapicerror(char *s) { fprintf(stderr, "RAPIC ERROR: <%s> on token <", s); binprint(yylval.token.s, yylval.token.len); fprintf(stderr, ">\n"); return 1; } int rapicwrap(char *s) { yywrap(s); return 1; } rsl-v1.43/ltmain.sh0000644000102200007640000060342611312033143011166 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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., 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. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -pg pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. # for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` # done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: rsl-v1.43/dorade.c0000644000102200007640000005446111225720507010761 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1999 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include "dorade.h" int dorade_verbose = 0; void dorade_verbose_on() { dorade_verbose = 1; } void dorade_verbose_off() { dorade_verbose = 0; } static int do_swap = 0; /**********************************************************************/ /* */ /* read_extra_bytes */ /* */ /**********************************************************************/ int read_extra_bytes(int nbytes, FILE *in) { char *extra; int nread; /* * Read and discard nbytes bytes. The return value is the byte count * returned by fread, unless there is an error, then it is 0. */ extra = (char *) malloc(nbytes); if (!extra) { perror("\nError: read_extra_bytes"); fprintf(stderr,"Tried to allocate %d bytes\n", nbytes); return 0; } nread = fread(extra, sizeof(char), nbytes, in); free(extra); return nread; } /**********************************************************************/ /* */ /* dorade_read_comment_block */ /* */ /**********************************************************************/ Comment_block *dorade_read_comment_block(FILE *in) { Comment_block *cb; cb = (Comment_block *) calloc(1, sizeof(Comment_block)); if (cb == NULL) { perror("dorade_read_comment_block"); return NULL; } fread(cb->code, sizeof(cb->code), 1, in); fread(&cb->len, sizeof(cb->len), 1, in); /* Check for big endian data on little endian platform. The smallest value * cb->len could have is 8 (length of cb->code + cb->len), so we put that in * first byte of test value, and also test for negative, since sign bit could * be set in a larger value. */ if (cb->len > 0x08000000 || cb->len < 0) do_swap = 1; if (do_swap) cb->len = ntohl(cb->len); /* Length of cb->comment is cb->len-8 since cb->code and cb->len have * already been read. */ cb->comment = (char *) calloc(cb->len-8, sizeof(char)); if (cb->comment == NULL) { perror("dorade_read_comment_block: cb->comment"); return cb; } fread(cb->comment, sizeof(char), cb->len-8, in); return cb; } /**********************************************************************/ /* */ /* dorade_read_volume_desc */ /* */ /**********************************************************************/ Volume_desc *dorade_read_volume_desc (FILE *in) { Volume_desc *vd; vd = (Volume_desc *) calloc(1, sizeof(Volume_desc)); if(!vd) { perror("dorade_read_volume_desc"); return NULL; } fread(vd, sizeof(Volume_desc), 1, in); /* Now, convert from Big Endian. */ if (do_swap) { vd->len = ntohl(vd->len); vd->version = ntohs(vd->version); vd->volume_number = ntohs(vd->volume_number); vd->max_bytes = ntohl(vd->max_bytes); vd->year = ntohs(vd->year); vd->month = ntohs(vd->month); vd->day = ntohs(vd->day); vd->hour = ntohs(vd->hour); vd->minute = ntohs(vd->minute); vd->second = ntohs(vd->second); vd->gen_year = ntohs(vd->gen_year); vd->gen_month = ntohs(vd->gen_month); vd->gen_day = ntohs(vd->gen_day); vd->nsensors = ntohs(vd->nsensors); } return vd; } extern int little_endian(void); extern void swap_4_bytes(void *word); extern void swap_2_bytes(void *word); /* Sensor descriptor routines. */ /**********************************************************************/ /* */ /* dorade_read_radar_desc */ /* */ /**********************************************************************/ Radar_desc *dorade_read_radar_desc (FILE *in) { Radar_desc *rd; int i; rd = (Radar_desc *) calloc(1, sizeof(Radar_desc)); if(!rd) { perror("dorade_read_radar_desc"); return NULL; } fread(rd, sizeof(Radar_desc), 1, in); /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&rd->len); swap_4_bytes(&rd->radar_constant); /* Yes, even the ieee floating values. */ swap_4_bytes(&rd->peak_power); swap_4_bytes(&rd->noise_power); swap_4_bytes(&rd->rcvr_gain); swap_4_bytes(&rd->ant_gain); swap_4_bytes(&rd->radar_system_gain); swap_4_bytes(&rd->horizontal_beam_width); swap_4_bytes(&rd->vertical_beam_width); swap_2_bytes(&rd->radar_type); swap_2_bytes(&rd->scan_mode); swap_4_bytes(&rd->scan_rate); swap_4_bytes(&rd->start_angle); swap_4_bytes(&rd->stop_angle); swap_2_bytes(&rd->nparam_desc); swap_2_bytes(&rd->ndesc); swap_2_bytes(&rd->compress_code); swap_2_bytes(&rd->compress_algo); swap_4_bytes(&rd->data_reduction_param1); swap_4_bytes(&rd->data_reduction_param2); swap_4_bytes(&rd->longitude); swap_4_bytes(&rd->latitude); swap_4_bytes(&rd->altitude); swap_4_bytes(&rd->unambiguous_velocity); swap_4_bytes(&rd->unambiguous_range); swap_2_bytes(&rd->nfreq); swap_2_bytes(&rd->npulse_periods); for (i=0; i<5; i++) { swap_4_bytes(&rd->freq[i]); swap_4_bytes(&rd->period[i]); } } /* If RADD block is longer than structure, read through extra bytes. * This sometimes happens. */ if (rd->len > sizeof(Radar_desc)) { if (read_extra_bytes(rd->len - sizeof(Radar_desc), in) <= 0) fprintf(stderr,"Called from %s, line: %d\n", __FILE__, __LINE__ - 1); } return rd; } /**********************************************************************/ /* */ /* dorade_read_parameter_desc */ /* */ /**********************************************************************/ Parameter_desc *dorade_read_parameter_desc (FILE *in) { Parameter_desc *pd; pd = (Parameter_desc *) calloc(1, sizeof(Parameter_desc)); if(!pd) { perror("dorade_read_parameter_desc"); return NULL; } fread(pd, sizeof(Parameter_desc), 1, in); /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&pd->len); swap_2_bytes(&pd->ipp); swap_2_bytes(&pd->xmit_freq); swap_4_bytes(&pd->rcvr_bandwidth); swap_2_bytes(&pd->pulse_width); swap_2_bytes(&pd->polarization); swap_2_bytes(&pd->nsamp_in_dwell_time); swap_2_bytes(&pd->parameter_type); swap_4_bytes(&pd->threshold_value); swap_4_bytes(&pd->scale_factor); swap_4_bytes(&pd->offset_factor); swap_4_bytes(&pd->missing_data_flag); } /* If the descriptor block is longer than the structure, read past the extra bytes. */ if (pd->len > sizeof(Parameter_desc)) { if (read_extra_bytes(pd->len - sizeof(Parameter_desc), in) <= 0) fprintf(stderr,"Called from %s, line: %d\n", __FILE__, __LINE__ - 1); } return pd; } /**********************************************************************/ /* */ /* dorade_read_cell_range_vector */ /* */ /**********************************************************************/ Cell_range_vector *dorade_read_cell_range_vector (FILE *in) { Cell_range_vector *cv; char *buff; int i; cv = (Cell_range_vector *) calloc(1, sizeof(Cell_range_vector)); if(!cv) { perror("dorade_read_cell_range_vector"); return NULL; } fread(&cv->code, sizeof(cv->code), 1, in); fread(&cv->len, sizeof(cv->len), 1, in); fread(&cv->ncells, sizeof(cv->ncells), 1, in); if (do_swap) { swap_4_bytes(&cv->len); swap_4_bytes(&cv->ncells); } cv->range_cell = (float *)calloc(cv->ncells, sizeof(float)); if (!cv->range_cell) { perror("dorade_read_cell_range_vector: cv->range_cell"); return cv; } fread(cv->range_cell, sizeof(float), cv->ncells, in); if (do_swap) { for (i=0; incells; i++) swap_4_bytes(&cv->range_cell[i]); } /* Usually reading the range cells does not read to the end * of the Cell_range_vector structure. We may be reading * a non seekable device! */ i = cv->len /* Remove a few bytes that precede. */ - sizeof(cv->code) - sizeof(cv->len) - sizeof(cv->ncells) - cv->ncells*4; buff = (char *)malloc(i); if (!buff) return cv; fread(buff, sizeof(char), i, in); free(buff); return cv; } /**********************************************************************/ /* */ /* dorade_read_correction_factor_desc */ /* */ /**********************************************************************/ Correction_factor_desc *dorade_read_correction_factor_desc(FILE *in) { Correction_factor_desc *cf; char *remaining; int is_cfac = 0; cf = (Correction_factor_desc *) calloc(1, sizeof(Correction_factor_desc)); if(!cf) { perror("dorade_read_correction_factor_desc"); return NULL; } /* Make sure we have Correction Factor Descriptor. */ while (!is_cfac) { fread(cf->code, sizeof(cf->code), 1, in); if (strncmp(cf->code, "CFAC", 4) == 0) is_cfac = 1; else { fread(&cf->len, sizeof(cf->len), 1, in); if (do_swap) swap_4_bytes(&cf->len); remaining = (char *) malloc(cf->len-8); if (!remaining) { perror("\ndorade_read_correction_factor_desc"); fprintf(stderr,"cf->len = %d\n\n", cf->len); return NULL; } fread(remaining, sizeof(char), cf->len-8, in); free(remaining); } } fread(&cf->len, sizeof(Correction_factor_desc)-4, 1, in); /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&cf->len); swap_4_bytes(&cf->azimuth); swap_4_bytes(&cf->elevation); swap_4_bytes(&cf->range); swap_4_bytes(&cf->longitude); swap_4_bytes(&cf->latitude); swap_4_bytes(&cf->altitude); swap_4_bytes(&cf->height); swap_4_bytes(&cf->speed_east_west); swap_4_bytes(&cf->speed_north_south); swap_4_bytes(&cf->vertical_velocity); swap_4_bytes(&cf->heading); swap_4_bytes(&cf->roll); swap_4_bytes(&cf->pitch); swap_4_bytes(&cf->drift); swap_4_bytes(&cf->rotation_angle); swap_4_bytes(&cf->tilt_angle); } return cf; } /**********************************************************************/ /* */ /* dorade_read_sensor */ /* */ /**********************************************************************/ Sensor_desc *dorade_read_sensor (FILE *in) /* Read one 'Sensor #n' descriptor from FILE. */ { Sensor_desc *sd; int i; sd = (Sensor_desc *) calloc (1, sizeof(Sensor_desc)); if (!sd) { perror("dorade_read_sensor"); return NULL; } sd->radar_desc = dorade_read_radar_desc(in); sd->nparam = sd->radar_desc->nparam_desc; sd->p_desc = (Parameter_desc **) calloc(sd->nparam, sizeof(Parameter_desc *)); if (!sd->p_desc) { perror("dorade_read_sensor: sd->p_desc"); return sd; } for (i=0; inparam; i++) { sd->p_desc[i] = dorade_read_parameter_desc(in); } sd->cell_range_vector = dorade_read_cell_range_vector(in); sd->correction_factor_desc = dorade_read_correction_factor_desc(in); return sd; } /**********************************************************************/ /* */ /* dorade_read_sweep_info */ /* */ /**********************************************************************/ Sweep_info *dorade_read_sweep_info(FILE *in) { Sweep_info *si; si = (Sweep_info *) calloc(1, sizeof(Sweep_info)); if(!si) { perror("dorade_read_sweep_info"); return NULL; } fread(si, sizeof(Sweep_info), 1, in); /* FIXME: ?? For now, VOLD is what we expect when there * are no more SWIB. This is a data driven EOF. * Returning NULL should suffice. */ if(strncmp(si->code, "SWIB", 4) != 0) { /* Ignore the rest of the file. */ free(si); return NULL; } /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&si->len); swap_4_bytes(&si->sweep_num); swap_4_bytes(&si->nrays); swap_4_bytes(&si->start_angle); swap_4_bytes(&si->stop_angle); swap_4_bytes(&si->fixed_angle); swap_4_bytes(&si->filter_flag); } return si; } /* Data Ray routines. */ /**********************************************************************/ /* */ /* dorade_read_ray_info */ /* */ /**********************************************************************/ Ray_info *dorade_read_ray_info (FILE *in) { Ray_info *ri; ri = (Ray_info *) calloc(1, sizeof(Ray_info)); if(!ri) { perror("dorade_read_ray_info"); return NULL; } fread(ri, sizeof(Ray_info), 1, in); /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&ri->len); swap_4_bytes(&ri->sweep_num); swap_4_bytes(&ri->jday); swap_2_bytes(&ri->hour); swap_2_bytes(&ri->minute); swap_2_bytes(&ri->second); swap_2_bytes(&ri->msec); swap_4_bytes(&ri->azimuth); swap_4_bytes(&ri->elevation); swap_4_bytes(&ri->peak_power); swap_4_bytes(&ri->scan_rate); swap_4_bytes(&ri->status); } return ri; } /**********************************************************************/ /* */ /* dorade_read_platform_info */ /* */ /**********************************************************************/ Platform_info *dorade_read_platform_info (FILE *in) { Platform_info *pi; int len_first_two; pi = (Platform_info *) calloc(1, sizeof(Platform_info)); if(!pi) { perror("dorade_read_platform_info"); return NULL; } /* Read the id code to make sure we have "ASIB" for platform info. If * id is ASIB, then read data into the Platform_info structure. If it is * XSTF, read and discard remainder of block, which will have a different * size than Platform_info. XSTF is undocumented, but apparently it takes * the place of ASIB when radar is grounded. */ fread(pi->code, sizeof(pi->code), 1, in); fread(&pi->len, sizeof(pi->len), 1, in); if (do_swap) swap_4_bytes(&pi->len); len_first_two = sizeof(pi->code) + sizeof(pi->len); if (strncmp(pi->code, "ASIB", 4) == 0) { fread(&pi->longitude, sizeof(Platform_info)-len_first_two, 1, in); /* Read past any extra bytes. */ if (pi->len > sizeof(Platform_info)) { if (read_extra_bytes(pi->len - sizeof(Platform_info), in) <= 0) fprintf(stderr,"Called from %s, line: %d\n",__FILE__,__LINE__-1); } /* Now, convert from Big Endian. */ if (do_swap) { swap_4_bytes(&pi->longitude); swap_4_bytes(&pi->latitude); swap_4_bytes(&pi->altitude); swap_4_bytes(&pi->height); swap_4_bytes(&pi->ew_speed); swap_4_bytes(&pi->ns_speed); swap_4_bytes(&pi->v_speed); swap_4_bytes(&pi->heading); swap_4_bytes(&pi->roll); swap_4_bytes(&pi->pitch); swap_4_bytes(&pi->drift); swap_4_bytes(&pi->rotation); swap_4_bytes(&pi->tilt); swap_4_bytes(&pi->ew_wind_speed); swap_4_bytes(&pi->ns_wind_speed); swap_4_bytes(&pi->v_wind_speed); swap_4_bytes(&pi->heading_rate); swap_4_bytes(&pi->pitch_rate); } } else if (strncmp(pi->code, "XSTF", 4) == 0) { /* Read to end of XSTF block. */ if (read_extra_bytes(pi->len - len_first_two, in) <= 0) fprintf(stderr,"Called from %s, line: %d\n", __FILE__, __LINE__ - 1); } else { fprintf(stderr,"Unexpected block id: \"%s\"." " Expected \"ASIB\" or \"XSTF\"\n", pi->code); } return pi; } /**********************************************************************/ /* */ /* dorade_read_parameter_data */ /* */ /**********************************************************************/ Parameter_data *dorade_read_parameter_data(FILE *in) { Parameter_data *pd; int len; pd = (Parameter_data *) calloc(1, sizeof(Parameter_data)); if(!pd) { perror("dorade_read_parameter_data: pd"); return NULL; } fread(&pd->code, sizeof(pd->code), 1, in); fread(&pd->len, sizeof(pd->len), 1, in); fread(&pd->name, sizeof(pd->name), 1, in); if (do_swap) swap_4_bytes(&pd->len); /* Length is in parameter data block? or calculate if from pd->len. */ len = pd->len /* Use pd->len for now. */ - sizeof(pd->code) /* Remove a few bytes from */ - sizeof(pd->len) /* the count. */ - sizeof(pd->name); pd->data = (char *)calloc(len, sizeof(char)); if (!pd->data) { perror("dorade_read_parameter_data: pd->data"); return pd; } fread(pd->data, sizeof(char), len, in); /* FIXME: Big endian conversion in caller? Is that the right place? */ return pd; } /**********************************************************************/ /* */ /* dorade_read_sweep */ /* */ /**********************************************************************/ Sweep_record *dorade_read_sweep(FILE *fp, Sensor_desc **sd) { Sweep_record *sr; Sweep_info *si; Ray_info *ri; Platform_info *pi; Parameter_data *pd; Parameter_desc **parameter_desc; int i, j, k,len; int nparam; sr = (Sweep_record *) calloc (1, sizeof(Sweep_record)); if (!sr) { perror("dorade_read_sweep"); return NULL; } nparam = sd[0]->nparam; parameter_desc = sd[0]->p_desc; /* Expect SWIB */ sr->s_info = si = dorade_read_sweep_info(fp); if (!si) { free(sr); return NULL; /* EOF or error. */ } sr->nrays = si->nrays; if (dorade_verbose) { printf("=====< NEW SWIB >=====\n"); dorade_print_sweep_info(si); } sr->data_ray = (Data_ray **) calloc(si->nrays, sizeof(Data_ray *)); if (!sr->data_ray) { free(sr); return NULL; /* EOF or error. */ } for (i=0; inrays; i++) { if (dorade_verbose) printf("---------- Ray %d ----------\n", i); sr->data_ray[i] = (Data_ray *) calloc(1, sizeof(Data_ray)); if (!sr->data_ray[0]) { free(sr); return NULL; /* EOF or error. */ } ri = dorade_read_ray_info(fp); if (dorade_verbose) { dorade_print_ray_info(ri); } pi = dorade_read_platform_info(fp); if (dorade_verbose) { dorade_print_platform_info(pi); } sr->data_ray[i]->ray_info = ri; sr->data_ray[i]->platform_info = pi; sr->data_ray[i]->parameter_data = (Parameter_data **) calloc(nparam, sizeof(Parameter_data *)); sr->data_ray[i]->data_len = (int *) calloc(nparam, sizeof(int)); sr->data_ray[i]->word_size = (int *) calloc(nparam, sizeof(int)); sr->data_ray[i]->nparam = nparam; for (j=0; jlen /* Use pd->len for now. */ - sizeof(pd->code) /* Remove a few bytes from */ - sizeof(pd->len) /* the count. */ - sizeof(pd->name); sr->data_ray[i]->parameter_data[j] = pd; sr->data_ray[i]->data_len[j] = len; if (parameter_desc[j]->parameter_type == 2) sr->data_ray[i]->word_size[j] = 2; /* 2 bytes per word */ else if (parameter_desc[j]->parameter_type == 3 || parameter_desc[j]->parameter_type == 4) sr->data_ray[i]->word_size[j] = 4; /* 4 bytes per word */ if (do_swap) { /* Numbers were read big-endian. */ if (sr->data_ray[i]->word_size[j] == 2) for (k=0; kdata[k]); else if (sr->data_ray[i]->word_size[j] == 4) for (k=0; kdata[k]); } } } return sr; } /* MEMORY MANAGEMENT ROUTINES */ /**********************************************************************/ /* */ /* dorade_free_data_ray */ /* */ /**********************************************************************/ void dorade_free_data_ray(Data_ray *r) { int i; if (r == NULL) return; free(r->ray_info); free(r->platform_info); if (r->parameter_data) { for (i=0; inparam; i++) free(r->parameter_data[i]); free(r->parameter_data); } free(r); } /**********************************************************************/ /* */ /* dorade_free_sweep */ /* */ /**********************************************************************/ void dorade_free_sweep(Sweep_record *s) { int i; if (s == NULL) return; if (s->data_ray) { for (i=0; inrays; i++) dorade_free_data_ray(s->data_ray[i]); free(s->data_ray); } if (s->s_info) free(s->s_info); free(s); } rsl-v1.43/nsig.h0000644000102200007640000010526611562617470010500 00000000000000/* For SIGMET version 1 and version 2 files. * * John H. Merritt * Applied Research Corp. * NASA GSFC Code 910.1 * * * The structures exactly match the SIGMET documentation. */ #ifndef NSIG2_H #define NSIG2_H /*Structure identifier, byte 0 of structure_header, III-18 */ #define NSIG_INGEST_SUM 3 #define NSIG_PROD 7 /* Data type, value for byte 22 in ingest data header, III-29 */ #define NSIG_DTB_EXH 0 #define NSIG_DTB_UCR 1 #define NSIG_DTB_CR 2 #define NSIG_DTB_VEL 3 #define NSIG_DTB_WID 4 #define NSIG_DTB_ZDR 5 #define NSIG_DTB_UCR2 8 #define NSIG_DTB_CR2 9 #define NSIG_DTB_VEL2 10 #define NSIG_DTB_WID2 11 #define NSIG_DTB_ZDR2 12 #define NSIG_DTB_KDP 14 #define NSIG_DTB_KDP2 15 #define NSIG_DTB_PHIDP 16 #define NSIG_DTB_VELC 17 #define NSIG_DTB_SQI 18 #define NSIG_DTB_RHOHV 19 #define NSIG_DTB_RHOHV2 20 #define NSIG_DTB_DBZ2 21 #define NSIG_DTB_VELC2 22 #define NSIG_DTB_SQI2 23 #define NSIG_DTB_PHIDP2 24 #define NSIG_DTB_HCLASS 55 #define NSIG_DTB_HCLASS2 56 #define NSIG_DTB_ZDRC 57 #define NSIG_DTB_ZDRC2 58 /* Product type code ,value for byte 12 in product configuration * struct, III-35 */ #define NSIG_PROD_PPI 1 /* PPI */ #define NSIG_PROD_RHI 2 /* RHI */ #define NSIG_PROD_CAPPI 3 /* CAPPI */ #define NSIG_PROD_CROSS 4 /* Cross section */ #define NSIG_PROD_TOPS 5 /* Echo tops */ #define NSIG_PROD_RAIN1 7 /* Precipitation 1 hour */ #define NSIG_PROD_TRACK 6 /* Storm track */ #define NSIG_PROD_RAINN 8 /* Precipitation n hour */ #define NSIG_PROD_VVP 9 /* Velocity Volume processing */ #define NSIG_PROD_VIL 10 /* Vertically Integrated Liquid */ #define NSIG_PROD_SHEAR 11 /* Wind shear */ #define NSIG_PROD_WARN 12 /* Warning (overlay) */ #define NSIG_PROD_RTPPI 13 /* Real time PPI */ #define NSIG_PROD_RTRHI 14 /* Real time RHI */ #define NSIG_PROD_RAW 15 /* Raw data set (no display)*/ #define NSIG_PROD_MAX 16 /* Maximum with side panels */ #define NSIG_PROD_USER 17 /* Earth projection user product */ #define NSIG_PROD_USERV 18 /* Section projection user product */ #define NSIG_PROD_OTHER 19 /* Other user product (no display) */ #define NSIG_PROD_STATUS 20 /* Status product (no display) */ #define NSIG_PROD_SLINE 21 /* Shear Line Product */ #define NSIG_PROD_WIND 22 /* Horizontal wind field */ #define NSIG_SCAN_PPI 1 #define NSIG_SCAN_RHI 2 #define NSIG_SCAN_MAN 3 #define NSIG_SCAN_CON 4 #define NSIG_SCAN_FIL 5 #define NSIG_BLOCK 6144 #define NSIG_MAX_BIN 1536 /* Two byte binary angle is unsigned short */ /* Using these typedefs forces non-word alignment. This is because * we don't want any space between members of a structure. * -- A coding trick -- */ typedef unsigned char bang[2]; typedef unsigned char twob[2]; typedef unsigned char fourb[4]; /* Ray header 3.4.2, page III-29 */ /* No change for NSIG_VER2 */ typedef struct { bang beg_azm; /* Azimuth at beginning of ray (binary angle). */ bang beg_elev; /* Elevation at beginning of ray (binary angle). */ bang end_azm; /* Azimuth at end of ray (binary angle). */ bang end_elev; /* Elevation at end of ray (binary angle). */ twob num_bins; /* Actual number of bins in the ray. */ twob sec; /* Time in seconds from start of sweep (unsigned). */ } NSIG_Ray_header; /*============================================================*/ /*============================================================*/ /* Extended Header version 0, section 3.4.3, page III-29 */ /* No change for NSIG_VER2 */ typedef struct { fourb msec; twob cal_sig; twob spare[7]; } NSIG_Ext_header_ver0; /*============================================================*/ /*============================================================*/ /* Extended Header version 1, section 3.4.3, page III-29 */ typedef struct { fourb msec; /* Time in milliseconds from the sweep starting time. */ twob cal_sig; /* Calibration Signal level. */ bang azm; /* Azimuth (binary angle) */ bang elev; /* Elevation (binary angle) */ bang train_ord; /* Train order (binary angle) */ bang elev_ord; /* Elevation order (binary angle) */ bang pitch; /* Pitch (binary angle) */ bang roll; /* Roll (binary angle) */ bang heading; /* Heading (binary angle) */ bang azm_rate; /* Azimuth Rate (binary angle/sec) */ bang elev_rate; /* Elevation Rate (binary angle/sec) */ bang pitch_rate; /* Pitch Rate (binary angle/sec) */ bang roll_rate; /* Roll Rate (binary angle/sec) */ #ifdef NSIG_VER2 #else bang heading_rate; /* Heading Rate (binary angle/sec) */ #endif fourb lat; /* Latitude (binary angle) */ fourb lon; /* Longitude (binary angle) */ twob alt; /* Altitude (meters) */ twob vel_e; /* Velocity East (cm/sec) */ twob vel_n; /* Velocity North (cm/sec) */ twob vel_u; /* Velocity Up (cm/sec) */ #ifdef NSIG_VER2 #else fourb time_update; /* Time since last update (milliseconds) */ #endif twob nav_sys_flag; /* Navigation system OK flag */ twob rad_vel_cor; /* Radial velocity correction (velocity units) */ } NSIG_Ext_header_ver1; /*============================================================*/ /*============================================================*/ /*-----------------------------------------------------------------*/ /* Note: * All structure names are prefixed with NSIG_ and have the * first letter of the remainder capitalized. */ /*-----------------------------------------------------------------*/ /* Structure header 3.2.35, page III-18 */ typedef struct { twob id; #ifdef NSIG_VER2 twob version; fourb num_bytes; #else fourb num_bytes; twob version; #endif twob spare; twob flags; } NSIG_Structure_header; /*============================================================*/ /*============================================================*/ /* Time sturcture 3.2.36, page III-18 */ typedef struct { #ifdef NSIG_VER2 fourb sec; twob msec; /* Fractions of seconds in milliseconds. */ twob year; twob month; twob day; #else twob year; twob month; twob day; fourb sec; #endif } NSIG_Ymds_time; /*============================================================*/ /*============================================================*/ /* ingest data header 3.4.1, page III-28 */ typedef struct { NSIG_Structure_header struct_head; NSIG_Ymds_time time; #ifdef NSIG_VER2 #else twob data_type; #endif twob sweep_num; twob num_rays_swp; twob ind_ray_one; twob num_rays_exp; twob num_rays_act; bang fix_ang; twob bits_bin; #ifdef NSIG_VER2 twob data_type; /* Data code (See Task_DSP_Info.IDATA) */ char spare[36]; #else char spare[38]; #endif } NSIG_Ingest_data_header; /*============================================================*/ /*============================================================*/ /* No change for NSIG_VER2 */ typedef struct { twob rec_num; twob sweep_num; twob ray_loc; twob ray_num; twob flags; twob spare; } NSIG_Raw_prod_bhdr; /*============================================================*/ /*============================================================*/ #ifdef NSIG_VER2 /* Define the color scale conversion */ typedef struct { #define COLOR_SCALE_OVERRIDE (0x0200) #define COLOR_SCALE_VARIABLE (0x0100) #define COLOR_LABEL_MASK (0x00ff) fourb iflags; fourb istart; fourb istep; twob icolcnt; twob ipalette_num; twob ilevel_seams[16]; } NSIG_Color_scale_def; #endif /*============================================================*/ /*============================================================*/ /* Product configuration structure 3.5.1.1, page III-35 */ typedef struct { NSIG_Structure_header st_head; twob prod_code; #ifdef NSIG_VER2 twob isch; /* Scheduling */ #define PSC_HOLD_P 0 /* Do not run at all. */ #define PSC_NEXT_P 1 /* Run once on next available data */ #define PSC_ALL_P 2 /* Run as data becomes available */ #define PSC_AGAIN_P 3 /* Run again on data last used */ fourb isch_skip; /* # seconds between runs */ #else #endif NSIG_Ymds_time prod_time; NSIG_Ymds_time file_time; NSIG_Ymds_time schd_time; twob schd_code; /* Not used in Ver 2. */ fourb sec_skip; /* Not used in Ver 2. */ char user_name[12]; #ifdef NSIG_VER2 #else char file_name[12]; #endif char task_name[12]; #ifdef NSIG_VER2 #else char spare_name[12]; #endif twob flag; #ifdef NSIG_VER2 fourb ixscale, iyscale, izscale; /* Scale in cm/pixel */ #else #endif fourb x_size; fourb y_size; fourb z_size; fourb x_loc; fourb y_loc; fourb z_loc; fourb max_rng; #ifdef NSIG_VER2 fourb irange_last_v20; /* Range of last bin in cm (raw only) */ char ipad128x2[2]; twob idata_out; /* Data type of data generated by product gen */ /* This section for version 2.1+ products: */ char ipad132x12[12]; twob idata_in; /* Data type used by the generator */ char ipad146x2[2]; twob iradial_smooth; /* Range in km*100 over which radial */ /* smoothing should be done. 0:none. */ twob iruns; /* # of times this pcf has been run */ fourb izr_const; /* Z-R or Z-W constant and exponent */ fourb izr_exp; /* in 1/1000 of integers */ twob ix_smooth; /* X-Y Smoothing parameters for 2D */ twob iy_smooth; /* products. km*100, 0:none */ /* ---- Product Specific Parameters ---- */ /*The following area conveys information needed for each specific product.*/ char psi[80]; /* Do we need these?? -John 8/14/96 */ char ipad244x28[28]; NSIG_Color_scale_def colors; #else twob bits_item; twob data_type; fourb data_start; fourb data_step; twob num_col; /* The following depends on version 2.0, 2.1 etc check III-34,35 */ /* Currently, though, this is not used. */ char spare[178]; #endif } NSIG_Product_config; /*============================================================*/ /*============================================================*/ /* product end 3.5.1.2 ,page III-36 */ typedef struct { #ifdef NSIG_VER2 char sprod_sitename[16]; /* Name of product generator site, space padded */ char sprod_version[8]; /* Product IRIS version, null terminated */ char sing_version[8]; /* Ingest IRIS version, null terminated */ NSIG_Ymds_time data_time; /* Oldest data in this file */ char ipad44x46[42]; #else char part_name[80]; /* Path name of file on disk. */ NSIG_Ymds_time data_time; /* Date/time structure. */ #endif char site_name[16]; /* Site name. Eg. mit, tog, kwa (upper-case?). */ twob ahead_gms; /* # minutes ahead of GMT. */ fourb lat; /* Latitude (binary angle format). */ fourb lon; /* Longitude (binary angle format). */ twob grnd_sea_ht; /* Signed ground height (meters). */ twob rad_grnd_ht; /* Radar height above ground (meters). */ #ifdef NSIG_VER2 #else twob sig_proc; /* Type of signal processor used. */ #endif fourb prf; /* PRF (hz). */ fourb pulse_wd; /* sample width in microsec/100*/ #ifdef NSIG_VER2 twob sig_proc; /* Type of signal processor used. */ #else #endif twob trg_rate; /* Trigger rate scheme. */ twob num_samp; /* number of samples (per ray). */ char clutter_file[12]; /* Clutter filter file name. */ twob num_filter; /* Number of filter used for the first range bin. */ fourb wavelen; /* Wavelength in 1/100 of centimeters. */ fourb trunc_ht; /* Truncation height in cm. */ fourb rng_f_bin; /* Range of the first bin in cm. */ fourb rng_l_bin; /* Range of the last bin in cm. */ fourb num_bin; /* Number of output bins. */ twob flag; /* Flag word. */ #define PH_OVERLAY_P (0x0001) /* Has an overlay \ For picture */ #define PH_RINGS_P (0x0002) /* Has range rings/ products only */ twob file_up; /* Number of updates to the file. */ char label[16][4]; /* Array of labels for color parameter legend. */ #ifdef NSIG_VER2 twob ilog_filter_first; /* Log filter used on first bin */ char ipad238x10[10]; #else char label_unit[12]; /* Text holding units of the labels. (Ver 2 only) */ #endif twob prod_seq; /* Product sequence number. */ twob color_num[16]; /* Color numbers for the up to 16 steps. */ char color_reject; /* Color used for rejected data. */ #ifdef NSIG_VER2 char ipad283x2[3]; /* The number of results elements at the end of the file. * Used for warning, shearline, and track only */ twob iresults_count; #define PROD_END_PAD 20 char ipad_end[PROD_END_PAD]; #else char color_unscan; /* Color used for unscanned area. */ char color_over; /* Color used for overlays. */ char spare; fourb prod_max_rng; /* Max range of the first product used as input. */ char spare2[18]; #endif } NSIG_Product_end; /*============================================================*/ /*============================================================*/ /* Ingest Summary Header 3.3.1 , page III-19 */ typedef struct { char file_name[80]; /* Name of file on disk. */ twob num_file; /* Number of associated data files extant. */ #ifdef NSIG_VER2 twob isweeps_done ; /* # of sweeps that have been completed */ #endif fourb sum_size; /* Total size of all files in bytes. */ NSIG_Ymds_time start_time; #ifdef NSIG_VER2 char ipad100x12[12]; #else char drive_name[16]; /* Name of tape drive written to. */ #endif twob size_ray_headers; /* Number of bytes in the ray headers. */ twob size_ext_ray_headers; /* Number of bytes in extended ray headers. */ #ifdef NSIG_VER2 twob ib_task; /* # bytes in task config table */ char ipad_118x6[6]; char siris_version[8]; /* Null terminated */ char ipad_132x18[18]; #else twob num_task_conf_tab; /* Number of task configuration table. */ twob size_device_status_tab; /* Number of bytes in device status table. */ twob gparam_size; /* Number of bytes in each gparam. */ char spare[28]; #endif char site_name[16]; /* Name of site from setup program. */ twob time_zone; /* Time zione of recorded time, +min of GMT */ fourb lat_rad; /* Latitude of radar. */ fourb lon_rad; /* Longitude of radar. */ twob grd_height; /* Height of ground at site (meters) */ twob ant_height; /* Height of radar above ground (meters) */ twob azm_res; /* Resolution of delta azimuth in sweep. */ twob ray_ind; /* Index of first rays from above set of rays. * Or the angle of the first ray. */ twob num_rays; /* Number of rays in a sweep. */ fourb ant_alt; /* Altitude of radar above sea level in cm */ fourb vel[3]; /* [0]=east, [1]=north, [2]=up */ fourb ant_offset[3]; /* [0]=starboard, [1]=bow, [2]=up */ #ifdef NSIG_VER2 char spare2[264]; #else char spare2[266]; #endif } NSIG_Ingest_summary; /*============================================================*/ /*============================================================*/ /* rvp5_gparam structure 3.3.4.1, page III-26 */ typedef struct { twob revision; /* Revision */ twob num_bins; /* Number of range bins */ twob cur_trig_p; /* Current trigger period */ twob cur_tag1; /* Current TAG00 - TAG15 */ twob cur_tag2; /* Current TAG16 - TAG31 */ twob l_chan_noise; /* Log channel noise level */ twob i_chan_noise; /* I Channel noise level */ twob q_chan_noise; /* Q Channel noise level */ twob lat_proc_status;/* Latched processor status */ twob imm_proc_status;/* Immdiate processor status */ twob diag_reg_a; /* Diagnostic register A */ twob diag_reg_b; /* Diagnostic register B */ twob num_pulses; /* Number of pulses per ray */ twob trig_c_low; /* Trigger count (low 16 bits) */ twob trig_c_high; /* Trigger count (high 8 bits) */ twob num_acq_bins; /* # of properly acquired bins */ twob num_pro_bins; /* # of properly processed bins */ twob rng_off; /* 25-meter range offset */ twob noise_rng; /* Noise range in KM */ twob noise_trg; /* Noise trigger period */ twob pulse_w_0; /* Pulse width 0 min trig period */ twob pulse_w_1; /* Pulse width 1 min trig period */ twob pulse_w_2; /* Pulse width 2 min trig period */ twob pulse_w_3; /* Pulse width 3 min trig period */ twob pulse_w_pat; /* Pulse width bit patterns */ twob cur_wave_pw; /* Current waveform/pulsewidth */ twob cur_trig_gen; /* Current trigger gen period */ twob des_trig_gen; /* Desired trigger gen period */ twob prt_start; /* PRT at start of last ray */ twob prt_end; /* PRT at end of last ray */ twob proc_thr_flag; /* Processing/threshold flags */ twob log_con_slope; /* LOG conversion slope */ twob log_noise_thr; /* LOG noise threshold */ twob clu_cor_thr; /* Clutter correction threshold */ twob sqi_thr; /* SQI threshold */ twob log_thr_w; /* LOG threshold for width */ twob cal_ref; /* Calibration reflectivity */ twob q_i_cur_samp; /* Q and I current sample */ twob l_cur_samp; /* Log current sample */ twob rng_avr_cho; /* Range averaging choice */ twob spare1[3]; twob i_sqr_low; twob i_sqr_high; twob q_sqr_low; twob q_sqr_high; twob noise_mean; twob noise_std; twob spare2[15]; } NSIG_Rpv5_gparam; /*============================================================*/ /*============================================================*/ typedef struct { NSIG_Structure_header struct_head; NSIG_Rpv5_gparam rpv5; } NSIG_Gparam; /*============================================================*/ /*============================================================*/ /* One_device_structure. Sect: 3.3.3.1 */ #ifdef NSIG_VER2 typedef struct { fourb status; #define DEV_NULL_P (0) /*Not applicable*/ #define DEV_OK_P (1) /*OK*/ #define DEV_ERROR_P (2) /*Error has occured*/ /* The following are only valid for network devices */ #define DEV_REMOTE_P (5) /*Remote computer unavailable*/ #define DEV_IRIS_P (6) /*Remote IRIS unavailable*/ /* This number indicates which process is using the device. */ fourb process; #define PROC_NONE_P (0) /*Noone is using it*/ #define PROC_RTDISP_P (1) /*Real time display*/ #define PROC_INGEST_P (2) /*Ingest*/ #define PROC_INGFIO_P (3) /*Ingest file output*/ #define PROC_REINGEST_P (4) /*Reingest !!!tom */ #define PROC_OUTFMT_P (5) /*Output Formatter*/ #define PROC_PRODUCT_P (6) /*Product generator*/ #define PROC_NETWORK_P (7) /*Network !!!tom */ #define PROC_QUICK_P (8) /*Quick look menu(part of out)*/ #define PROC_TAPE_P (9) /*Tape process*/ #define PROC_NORDRAD_P (10) /*NORDRAD process*/ /* Node name or user name */ char nuser_name[16]; /* Number of characters in the name */ char nchar; /* Process mode, see process_status structure */ fourb imode; #define MODE_NULL (0) #define MODE_STOPPED (1) #define MODE_IDLE (2) #define MODE_RUNNING (3) #define MODE_EXIT (4) #define MODE_QUICK (5) #define MODE_INIT (6) #define MODE_HOLD (7) /* Used only for antenna device */ #define MODE_ANT_NULL (0) #define MODE_ANT_IRIS (1) #define MODE_ANT_LOCAL (2) #define MODE_ANT_MAIN (3) #define MODE_ANT_COMP (4) #define MODE_ANT_SHUT (5) char spare[8]; } NSIG_One_device; #else typedef struct { twob status; twob process; char user_name[15]; char nchar; char spare[10]; } NSIG_One_device; /*============================================================*/ /*============================================================*/ #endif typedef struct { #ifdef NSIG_VER2 /* THIS IS WRONG.... but, does it matter for RSL ???? */ NSIG_Structure_header struct_head; NSIG_One_device dsp_stat[4]; NSIG_One_device ant_stat[4]; NSIG_One_device outdev_stat[12]; char spare[120]; #else NSIG_Structure_header struct_head; NSIG_One_device dsp_stat[4]; NSIG_One_device ant_stat[4]; NSIG_One_device outdev_stat[12]; char spare[120]; #endif } NSIG_Device_status; /*============================================================*/ /*============================================================*/ /* No change for NSIG_VER2 */ typedef struct { fourb startt; /* Start time (seconds within a day) */ fourb stopt; /* Stop time (seconds within a day) */ fourb skipt; /* Desired skip time (seconds) */ fourb time_last; /* Time last run (seconds w/in a day) */ fourb time_used; /* Time used on last run (seconds) */ fourb day_last; /* Relative day of last run. */ twob iflag; /* bit 0=ASAP, bit 1= Mandatory, * bit 2=Late skip, bit 3= Time used has been measured, * bit 4=Stop after running. */ char spare[94]; } NSIG_Task_sched_info; /*============================================================*/ /*============================================================*/ #ifdef NSIG_VER2 typedef struct { twob low_prf; /* Hertz */ twob low_prf_frac; /* Fraction part, scaled by 2**-16 */ twob low_prf_sample_size; twob low_prf_range_averaging; /* In bins */ twob thresh_refl_unfolding; /* Threshold for reflectivity unfolding in 1/100 dB */ twob thresh_vel_unfolding; /* Threshold for velocity unfolding in 1/100 dB */ twob thresh_sw_unfolding; /* Threshold for width unfolding in 1/100 dB */ char spare[18]; } NSIG_Task_dsp_mode_batch; #endif /*============================================================*/ /*============================================================*/ #ifdef NSIG_VER2 typedef struct { fourb mask_word_0; fourb ext_hdr_type; fourb mask_word_1; fourb mask_word_2; fourb mask_word_3; fourb mask_word_4; } NSIG_Dsp_data_mask; #endif /*============================================================*/ /*============================================================*/ /* Task dsp info 3.3.2.2, page III-22 */ typedef struct { #ifdef NSIG_VER2 twob dsp_num; fourb dsp_type; NSIG_Dsp_data_mask data_mask_cur; NSIG_Dsp_data_mask data_mask_orig; NSIG_Task_dsp_mode_batch task_dsp_mode; char spare[52]; #else twob dsp_num; twob dsp_type; fourb data_mask; fourb aux_data_def[32]; #endif fourb prf; fourb pwid; twob prf_mode; twob prf_delay; twob agc_code; twob samp_size; twob gain_con_flag; char filter_name[12]; #ifdef NSIG_VER2 char idop_filter_first; /* Doppler based filter used on first bin */ char ilog_filter_first; /* Z based filter used on first bin */ #else twob f_num; #endif twob atten_gain; #ifdef NSIG_VER2 twob igas_atten; /* 100000 * db/km */ twob clutter_map_flag; twob xmt_phase_seq; fourb ray_hdr_mask; twob time_series_playback; twob spare2; char custom_ray_hdr_name[16]; #define TASK_DSP_INFO_PAD 120 char ipad_end[TASK_DSP_INFO_PAD]; #else char spare[150]; #endif } NSIG_Task_dsp_info; /*============================================================*/ /*============================================================*/ /* task cal info struct: 3.3.2.3, page III-22, rec 2 offset 944 */ /* No change for NSIG_VER2 */ typedef struct { twob slope; /* 00: Reflectivity slope (4096*dB/ A/D Count) */ twob noise; /* 02: Noise threshold (1/16 dB above noise) */ twob clutr_corr; /* 04: Clutter correction threshold (1/16 dB) */ twob sqi; /* 06: (0-1)*256 */ twob power; /* 08: (1/16 dBZ) */ char spare1[8]; /* 10: 8 */ twob cal_ref; /* 18: Calibration reflectivity */ twob z_flag_unc; /* 20: Threshold flags for Unc. reflectivity */ twob z_flag_cor; /* 22: Threshold flags for Cor. reflectivity */ twob v_flag; /* 24: Threshold flags for velocity */ twob w_flag; /* 26: Threshold flags for width */ char spare2[8]; /* 28: 8 */ twob speckle; /* 36: Speckle remover flag. See III-22 */ twob slope_2; /* 38: Refl. slope for second processor */ twob cal_ref_2; /* 40: Calibration reflectivity for 2nd proc */ twob zdr_bias; /* 42: ZDR bias in signed 1/16 dB */ char spare3[276]; /* 44: 276 */ } NSIG_Task_calib_info; /*============================================================*/ /*============================================================*/ /* Task_range_info Structure 3.3.2.4, page III-23 */ typedef struct { fourb rng_first; /* 00: Range to first bin [cm] */ fourb rng_last; /* 04: Range to last bin [cm] */ #ifdef NSIG_VER2 fourb ibin_last; /* Range of last (input) bin in cm */ #else #endif twob num_bins; /* 08: Number of input bins */ twob num_rngbins; /* 10: Number of output range bins */ twob var_bin_spacing; /* 12: Variable range bin spacing (0,1) */ fourb binstep_in; /* 14: Step between input bins */ fourb binstep_out; /* 18: Step between output bins */ twob bin_avg_flag; /* 22: Range bin averaging flag */ /* 0:No Avg, 1:Avg Pairs, ... */ #ifdef NSIG_VER2 char spare[132]; /* 24: 132 */ #else char spare[136]; /* 24: 136 */ #endif } NSIG_Task_range_info; /*============================================================*/ /*============================================================*/ /* Task scan info structure 3.3.2.5, page III-23 */ typedef struct { twob ant_scan_mode; /* 1:PPI, 2:RHI, 3:manual, 4:file */ twob ang_res; /* Desired angular resolution in 1/100 degree. */ #ifdef NSIG_VER2 bang iscan_speed ; #else twob spare1; #endif twob num_swp; /* Number of sweeps to perform. */ bang beg_ang; /* Starting elevation(RHI)/azimuth(PPI) */ bang end_ang; /* Ending elevation(RHI)/azimuth(PPI) */ bang list[40]; /* List of azimuths(RSI)/elevations(PPI) */ #ifdef NSIG_VER2 /* union serv_task_scan_info_u { struct serv_task_rhi_scan_info rhi; struct serv_task_ppi_scan_info ppi; struct serv_task_file_scan_info fil; struct serv_task_manual_scan_info man; } ; */ char spare2[116]; #else char spare3[112]; #endif } NSIG_Task_scan_info; /*============================================================*/ /*============================================================*/ typedef struct { fourb wavelength; /* Wavelength in 1/100 of cm */ char serial_num[16]; /* T/R Serial Number */ fourb xmit_pwr; /* Transmit Power in watts. */ twob flag; /* bit 0: Digital signal simulator in use. * bit 4: Keep bit. */ #ifdef NSIG_VER2 twob ipolar; /* Type of polarization, see dsp_lib.h */ fourb itrunc; /* Truncation height in cm */ char ipad32x18[18]; /* Reserved for polarization description */ #else char spare1[24]; #endif twob display_parm1; /* Real time display parameter #1 */ twob display_parm2; /* Real time display parameter #2 */ /* The following 3 members are not used in Ver 2. */ twob product_flag; /* Real time product flag */ char spare2[2]; fourb truncation_height;/* Truncation height (cm) */ twob nbytes_comments; /* Number of bytes of comments entered. */ char spare3[256]; } NSIG_Task_misc_info; typedef struct { twob major; /* Task major number */ twob minor; /* Task minor number */ char name[12]; /* Name of task configuration file. */ char desc[80]; /* Task description. */ #ifdef NSIG_VER2 fourb ihybrid_count; /* Number of tasks in this hybrid set */ #else #endif twob state; /* Task state: 0=no task, 1=task being modified, * 2=inactive, 3=scheduled, 4=running */ #ifdef NSIG_VER2 char spare[218]; #else char spare[222]; #endif } NSIG_Task_end_data; /*============================================================*/ /*============================================================*/ typedef struct { NSIG_Structure_header struct_head; NSIG_Task_sched_info sched_info; NSIG_Task_dsp_info dsp_info; NSIG_Task_calib_info calib_info; NSIG_Task_range_info range_info; NSIG_Task_scan_info scan_info; NSIG_Task_misc_info misc_info; NSIG_Task_end_data end_data; #ifdef NSIG_VER2 char comments[720]; #else #endif } NSIG_Task_config; /*============================================================*/ /*============================================================*/ typedef struct { NSIG_Structure_header struct_head; NSIG_Product_config prod_config; NSIG_Product_end prod_end; char spare[5504]; } NSIG_Record1; /*============================================================*/ /*============================================================*/ typedef struct { NSIG_Structure_header struct_head; NSIG_Ingest_summary ingest_head; NSIG_Task_config task_config; NSIG_Device_status device_stat; NSIG_Gparam dsp1; NSIG_Gparam dsp2; char spare[1260]; } NSIG_Record2; /*============================================================*/ /*============================================================*/ /* This is the organization of the 2'nd to n'th file on the tape. * This structure is incomplete in that only one data record is * listed. Record 1, Record 2, a data record. As each data record * is ingested, the data replaces the data record part and keeps * the information in Record 1 and 2 unchanged. */ typedef unsigned char NSIG_Data_record[NSIG_BLOCK]; typedef struct { NSIG_Record1 rec1; NSIG_Record2 rec2; NSIG_Data_record data; } NSIG_Product_file; /*============================================================*/ /*============================================================*/ /* This is the first physical file on the TAPE. It is the only * file on the tape that has this organization. All other files * are PRODUCT FILES (NSIG_Product_file). Normally, this is ignored * when reading disk files; there you're only reading PRODUCT FILES. */ typedef struct { NSIG_Structure_header struct_head; char tape_id_name[16]; char site_name[16]; NSIG_Ymds_time ymds; twob drive_num; twob tape_type; char spare[262]; } NSIG_Tape_header_file; /*============================================================*/ /*============================================================*/ /* FUNCTION PROTOTYPES */ FILE *nsig_open(char *file_name); void swap_nsig_record1(NSIG_Record1 *rec1); void swap_nsig_record2(NSIG_Record2 *rec2); void swap_nsig_raw_prod_bhdr(NSIG_Raw_prod_bhdr *rp); void swap_nsig_ingest_data_header(NSIG_Ingest_data_header *ih); /* Sweep reading structure */ typedef struct { NSIG_Ray_header h; unsigned char *range; /* 0..h.num_bins-1 */ } NSIG_Ray; /*============================================================*/ /*============================================================*/ typedef struct { NSIG_Raw_prod_bhdr bhdr; NSIG_Ingest_data_header idh; NSIG_Ray **ray; int nparams; /* For freeing. */ } NSIG_Sweep; /*============================================================*/ /*============================================================*/ /* Each routine in nsig.c is renamed when compiling Ver2 code. * The rename is simple: change nsig_ to nsig2_ */ #ifdef NSIG_VER2 #define nsig_open nsig2_open #define nsig_read_record nsig2_read_record #define nsig_close nsig2_close #define nsig_endianess nsig2_endianess #define NSIG_I2 NSIG2_I2 #define NSIG_I4 NSIG2_I4 #define nsig_free_ray nsig2_free_ray #define nsig_free_sweep nsig2_free_sweep #define nsig_read_chunk nsig2_read_chunk #define nsig_read_ext_header_ver0 nsig2_read_ext_header_ver0 #define nsig_read_ext_header_ver1 nsig2_read_ext_header_ver1 #define nsig_read_ray nsig2_read_ray #define nsig_read_sweep nsig2_read_sweep #define nsig_from_bang nsig2_from_bang #define nsig_from_fourb_ang nsig2_from_fourb_ang #define swap_nsig_structure_header swap_nsig2_structure_header #define swap_nsig_ymds_time swap_nsig2_ymds_time #define swap_nsig_color_scale_def swap_nsig2_color_scale_def #define swap_nsig_product_config swap_nsig2_product_config #define swap_nsig_product_end swap_nsig2_product_end #define swap_nsig_ingest_summary swap_nsig2_ingest_summary #define swap_nsig_task_sched_info swap_nsig2_task_sched_info #define swap_nsig_task_dsp_info swap_nsig2_task_dsp_info #define swap_nsig_task_calib_info swap_nsig2_task_calib_info #define swap_nsig_task_range_info swap_nsig2_task_range_info #define swap_nsig_task_scan_info swap_nsig2_task_scan_info #define swap_nsig_task_misc_info swap_nsig2_task_misc_info #define swap_nsig_task_end_data swap_nsig2_task_end_data #define swap_nsig_task_config swap_nsig2_task_config #define swap_nsig_one_device swap_nsig2_one_device #define swap_nsig_device_status swap_nsig2_device_status #define swap_nsig_gparam swap_nsig2_gparam #define swap_nsig_record1 swap_nsig2_record1 #define swap_nsig_record2 swap_nsig2_record2 #define swap_nsig_raw_prod_bhdr swap_nsig2_raw_prod_bhdr #define swap_nsig_ingest_data_header swap_nsig2_ingest_data_header #define get_extended_header_info get2_extended_header_info #endif void nsig_free_ray(NSIG_Ray *r); void nsig_free_sweep(NSIG_Sweep **s); NSIG_Sweep **nsig_read_sweep(FILE *fp, NSIG_Product_file *prod_file); int nsig_read_record(FILE *fp, char *nsig_rec); int nsig_endianess(NSIG_Record1 *rec1); short NSIG_I2 (twob x); int NSIG_I4 (fourb x); void nsig_close(FILE *fp); float nsig_from_fourb_ang(fourb ang); float nsig_from_bang(bang in); #endif rsl-v1.43/wsr88d_locations.dat0000644000102200007640000001614611542450167013265 0000000000000014929 KABR ABERDEEN SD 45 27 21 -98 24 47 397 3019 KABX ALBUQUERQUE NM 35 8 59 -106 49 26 1789 93773 KAKQ NORFOLK/RICH VA 36 59 2 -77 0 26 34 23047 KAMA AMARILLO TX 35 14 0 -101 42 33 1093 12899 KAMX MIAMI FL 25 36 40 -80 24 46 4 4837 KAPX GAYLORD MI 44 54 26 -84 43 11 446 94987 KARX LA_CROSSE WI 43 49 22 -91 11 28 389 94287 KATX SEATTLE WA 48 11 40 -122 29 45 151 93240 KBBX BEALE_AFB CA 39 29 46 -121 37 54 53 4725 KBGM BINGHAMTON NY 42 11 59 -75 59 5 490 94289 KBHX EUREKA CA 40 29 54 -124 17 31 732 24011 KBIS BISMARCK ND 46 46 15 -100 45 38 505 94046 KBLX BILLINGS MT 45 51 14 -108 36 24 1097 53823 KBMX BIRMINGHAM AL 33 10 20 -86 46 12 197 54765 KBOX BOSTON MA 41 57 21 -71 8 13 36 12919 KBRO BROWNSVILLE TX 25 54 58 -97 25 8 7 14733 KBUF BUFFALO NY 42 56 56 -78 44 12 211 92804 KBYX KEY_WEST FL 24 35 51 -81 42 11 3 13883 KCAE COLUMBIA SC 33 56 55 -81 7 6 70 94625 KCBW HOULTON ME 46 2 22 -67 48 24 227 4101 KCBX BOISE ID 43 29 27 -116 14 8 933 54764 KCCX STATE_COLLEGE PA 40 55 23 -78 0 13 733 14820 KCLE CLEVELAND OH 41 24 47 -81 51 35 233 53845 KCLX CHARLESTON SC 32 39 20 -81 2 31 30 12924 KCRP CORP_CHRISTI TX 27 47 3 -97 30 40 13 54774 KCXX BURLINGTON VT 44 30 40 -73 10 1 97 24018 KCYS CHEYENNE WY 41 9 7 -104 48 22 1868 93235 KDAX SACRAMENTO CA 38 30 4 -121 40 40 9 13985 KDDC DODGE_CITY KS 37 45 39 -99 58 7 789 22015 KDFX LAUGHLIN_AFB TX 29 16 22 -100 16 50 345 93771 KDIX PHILADELPHIA PA 39 56 49 -74 24 39 45 14913 KDLH DULUTH MN 46 50 13 -92 12 35 435 94984 KDMX DES_MOINES IA 41 43 53 -93 43 22 299 93770 KDOX DOVER_AFB DE 38 49 32 -75 26 24 15 4830 KDTX DETROIT MI 42 41 59 -83 28 18 327 94982 KDVN DAVENPORT IA 41 36 42 -90 34 51 230 3987 KDYX DYESS_AFB TX 32 32 18 -99 15 15 462 3983 KEAX KANSAS_CITY MO 38 48 37 -94 15 52 303 53112 KEMX TUCSON AZ 31 53 37 -110 37 49 1586 54766 KENX ALBANY NY 42 35 11 -74 3 50 557 53851 KEOX FORT_RUCKER AL 31 27 38 -85 27 34 132 3020 KEPZ EL_PASO TX 31 52 23 -106 41 53 1251 53110 KESX LAS_VEGAS NV 35 42 4 -114 53 29 1483 53825 KEVX EGLIN_AFB FL 30 33 52 -85 55 17 43 12971 KEWX AUSTIN/S_ANT TX 29 42 14 -98 1 42 193 53114 KEYX EDWARDS_AFB CA 35 5 52 -117 33 39 840 53831 KFCX ROANOKE VA 37 1 28 -80 16 26 874 3981 KFDR ALTUS_AFB OK 34 21 44 -98 58 35 386 3022 KFDX CANNON_AFB NM 34 38 7 -103 37 48 1417 53819 KFFC ATLANTA GA 33 21 49 -84 33 57 262 14944 KFSD SIOUX_FALLS SD 43 35 16 -96 43 46 436 53113 KFSX FLAGSTAFF AZ 34 34 28 -111 11 52 2261 3018 KFTG DENVER CO 39 47 12 -104 32 45 1675 3985 KFWS DALLAS/FTW TX 32 34 23 -97 18 11 208 94008 KGGW GLASGOW MT 48 12 23 -106 37 30 694 3025 KGJX GRAND_JUNCT CO 39 3 44 -108 12 50 3046 23065 KGLD GOODLAND KS 39 21 59 -101 42 2 1113 14898 KGRB GREEN_BAY WI 44 29 54 -88 6 41 208 3992 KGRK FORT_HOOD TX 30 43 19 -97 22 59 164 94860 KGRR GRAND_RAPIDS MI 42 53 38 -85 32 41 237 3870 KGSP GREER SC 34 52 0 -82 13 12 287 53837 KGWX COLUMBUS_AFB MS 33 53 48 -88 19 44 145 54762 KGYX PORTLAND ME 43 53 29 -70 15 24 125 3023 KHDX HOLLOMAN_AFB NM 33 4 35 -106 7 22 1287 3980 KHGX HOUSTON TX 29 28 19 -95 4 45 5 53111 KHNX SAN_JOAQUIN_V CA 36 18 51 -119 37 56 75 53839 KHPX FORT_CAMPBELL KY 36 44 12 -87 17 6 176 53857 KHTX HUNTSVILLE AL 34 55 50 -86 05 00 537 3928 KICT WICHITA KS 37 39 17 -97 26 34 407 13841 KILN CINCINNATI OH 39 25 13 -83 49 18 322 4833 KILX LINCOLN IL 40 9 2 -89 20 13 177 93819 KIND INDIANAPOLIS IN 39 42 27 -86 16 49 241 3984 KINX TULSA OK 36 10 30 -95 33 53 204 23104 KIWA PHOENIX AZ 33 17 21 -111 40 12 412 3940 KJAN JACKSON MS 32 19 4 -90 4 48 91 13889 KJAX JACKSONVILLE FL 30 29 5 -81 42 7 10 53824 KJGX ROBINS_AFB GA 32 40 30 -83 21 4 159 3889 KJKL JACKSON KY 37 35 27 -83 18 47 415 23042 KLBB LUBBOCK TX 33 39 14 -101 48 51 993 3937 KLCH LAKE_CHARLES LA 30 7 31 -93 12 57 4 53813 KLIX NEW_ORLEANS LA 30 20 12 -89 49 32 7 94049 KLNX NORTH_PLATTE NE 41 57 28 -100 34 35 905 4831 KLOT CHICAGO IL 41 36 17 -88 5 5 202 4108 KLRX ELKO NV 40 44 23 -116 48 10 2056 3982 KLSX ST_LOUIS MO 38 41 56 -90 40 58 185 93774 KLTX WILMINGTON NC 33 59 22 -78 25 44 20 53827 KLVX LOUISVILLE KY 37 58 31 -85 56 38 219 93767 KLWX STERLING VA 38 58 31 -77 28 40 83 3952 KLZK LITTLE_ROCK AR 34 50 12 -92 15 44 173 23023 KMAF MIDLAND/ODSSA TX 31 56 36 -102 11 21 874 94296 KMAX MEDFORD OR 42 4 52 -122 43 2 2290 94048 KMBX MINOT_AFB ND 48 23 33 -100 51 54 455 93768 KMHX MOREHEAD_CITY NC 34 46 34 -76 52 34 9 4834 KMKX MILWAUKEE WI 42 58 4 -88 33 2 292 12838 KMLB MELBOURNE FL 28 6 48 -80 39 15 11 13894 KMOB MOBILE AL 30 40 46 -88 14 23 63 94983 KMPX MINNEAPOLIS MN 44 50 56 -93 33 56 288 94850 KMQT MARQUETTE MI 46 31 52 -87 32 54 430 53832 KMRX KNOXVILLE TN 36 10 7 -83 24 6 408 4103 KMSX MISSOULA MT 47 2 28 -113 59 10 2394 4104 KMTX SALT_LAKE_CTY UT 41 15 46 -112 26 52 1969 93236 KMUX SAN_FRANCISCO CA 37 9 18 -121 53 54 1057 94986 KMVX GRAND_FORKS ND 47 31 40 -97 19 32 300 53826 KMXX MAXWELL_AFB AL 32 32 12 -85 47 23 122 53115 KNKX SAN_DIEGO CA 32 55 8 -117 2 31 291 93839 KNQA MEMPHIS TN 35 20 41 -89 52 24 86 94980 KOAX OMAHA NE 41 19 13 -96 22 0 350 53833 KOHX NASHVILLE TN 36 14 50 -86 33 45 176 94703 KOKX NEW_YORK_CITY NY 40 51 56 -72 51 50 26 4106 KOTX SPOKANE WA 47 40 49 -117 37 36 727 3948 KOUN NORMAN OK 35 14 10 -97 27 44 390 3816 KPAH PADUCAH KY 37 4 6 -88 46 19 119 4832 KPBZ PITTSBURGH PA 40 31 54 -80 13 6 361 24155 KPDT PENDLETON OR 45 41 26 -118 51 10 462 3993 KPOE FORT_POLK LA 31 9 20 -92 58 33 124 3021 KPUX PUEBLO CO 38 27 34 -104 10 53 1600 93772 KRAX RALEIGH/DUR NC 35 39 56 -78 29 23 106 53104 KRGX RENO NV 39 45 19 -119 27 44 2530 24061 KRIW RIVERTON WY 43 3 58 -108 28 38 1697 53834 KRLX CHARLESTON WV 38 18 40 -81 43 23 329 54763 KRMX GRIFFISS_AFB NY 43 28 4 -75 27 29 462 94288 KRTX PORTLAND OR 45 42 53 -122 57 56 479 4107 KSFX POCATELLO ID 43 6 21 -112 41 10 1364 13995 KSGF SPRINGFIELD MO 37 14 7 -93 24 2 390 13957 KSHV SHREVEPORT LA 32 27 3 -93 50 29 83 23034 KSJT SAN_ANGELO TX 31 22 17 -100 29 33 576 53117 KSOX SANTA_ANA_MT CA 33 49 4 -117 38 9 923 92801 KTBW TAMPA FL 27 42 20 -82 24 6 12 4102 KTFX GREAT_FALLS MT 47 27 35 -111 23 7 1132 93805 KTLH TALLAHASSEE FL 30 23 51 -84 19 44 19 3979 KTLX OKLAHOMA_CITY OK 35 19 59 -97 16 40 370 3986 KTWX TOPEKA KS 38 59 49 -96 13 57 417 94047 KUDX RAPID_CITY SD 44 7 30 -102 49 47 919 94981 KUEX HASTINGS NE 40 19 15 -98 26 31 602 53856 KVAX MOODY_AFB GA 30 53 25 -83 0 6 54 94234 KVBX VANDENBRG_AFB CA 34 50 17 -120 23 45 376 3995 KVNX VANCE_AFB OK 36 44 27 -98 7 40 369 53101 KVTX LOS_ANGELES CA 34 24 42 -119 10 47 831 53116 KYUX YUMA AZ 32 29 43 -114 39 24 53 26548 PAHG ANCHORAGE AK 60 43 33 -151 21 5 74 25404 PAIH MIDDLETON_IS AK 59 27 41 -146 18 11 20 24690 PAPD FAIRBANKS AK 65 2 6 -147 30 6 790 41417 PGUA ANDERSEN_AFB GU 13 27 16 144 48 30 80 22548 PHKI SOUTH_KAUAI HI 21 53 39 -159 33 8 55 43216 RKSG CMP_HUMPHRYS KOR 36 57 21 127 1 16 16 42219 RODN KADENA OKI 26 18 7 127 54 35 66 33771 KDGX JACKSON MS 32 16 33 -89 58 48 151 53118 KICX CEDAR_CITY UT 37 35 9 -112 51 21 3231 4844 KIWX N_INDIANA IN 41 21 0 -85 42 0 293 53906 KSRX W_ARKANSAS AR 35 16 48 -94 21 0 195 54776 KTYX MONTAGUE NY 43 45 3 -75 40 30 563 0 KVWX EVANSVILLE IN 38 16 12 -87 43 12 190 0 PHKM KOHALA HI 20 7 12 -155 46 12 1162 0 PHMO MOLOKAI HI 21 7 12 -157 10 12 415 0 PHWA HAWAII HI 19 4 48 -155 34 12 421 0 TJUA SAN_JUAN PR 18 7 12 -66 4 48 931 rsl-v1.43/config.h.in0000644000102200007640000000557311747610611011405 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you don't want LASSEN. */ #undef HAVE_LASSEN /* Define to 1 if you have the `df' library (-ldf). */ #undef HAVE_LIBDF /* For EDGE capability. Change this to '#define HAVE_LIBETOR 1', if you have libetor -- the EDGE decoding library. */ #undef HAVE_LIBETOR /* Define to 1 if you have the `implode' library (-limplode). */ #undef HAVE_LIBIMPLODE /* Define to 1 if you have the `jpeg' library (-ljpeg). */ #undef HAVE_LIBJPEG /* Define to 1 if you have the `mfhdf' library (-lmfhdf). */ #undef HAVE_LIBMFHDF /* Define to 1 if you have the `tsdistk' library (-ltsdistk). */ #undef HAVE_LIBTSDISTK /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME /* 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 `strdup' function. */ #undef HAVE_STRDUP /* 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 `strstr' function. */ #undef HAVE_STRSTR /* 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 that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* 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 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned' if does not define. */ #undef size_t rsl-v1.43/radtec_to_radar.c0000644000102200007640000001731607024071545012641 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997, 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include "rsl.h" #ifdef HAVE_LIBIMPLODE #include "radtec.h" extern int radar_verbose_flag; static void fill_ray_header(Ray_header *h, Radtec_header *rh, Radtec_ray_header *rrh) { /* Fill the limited ray header information. */ h->month = rh->month; /* Time for this ray; month (1-12). */ h->day = rh->day; /* Time for this ray; day (1-31). */ h->year = rh->year; /* Time for this ray; year (eg. 1993). */ h->hour = rrh->hour; /* Date for this ray; hour (0-23). */ h->minute = rrh->min;/* Date for this ray; minute (0-59).*/ h->sec = rrh->sec; /* Date for this ray; second + fraction of second. */ h->azimuth = rrh->azim_angle; /* Azimuth angle. (degrees). Must be positive * 0=North, 90=east, -90/270=west. * This angle is the mean azimuth for the whole ray. * Eg. for NSIG the beginning and end azimuths are * averaged. */ h->ray_num = rrh->ray_num; /* Ray no. within elevation scan. */ h->elev = rrh->elev_angle; /* Elevation angle. (degrees). */ h->gate_size = rh->range_bin_size * RSL_SPEED_OF_LIGHT / 1e6; /* Data gate size (meters)*/ h->lat = rh->site_latitude; /* Latitude (degrees) */ h->lon = rh->site_longitude; /* Longitude (degrees) */ h->alt = rh->site_elevation; /* Altitude (m) */ h->nbins = rh->num_range_bins; /* Number of array elements for 'Range'. */ h->beam_width = rh->azim_resolution; /* Beamwidth in degrees. */ #ifdef RADTEC_UNKNOWN h->unam_rng = 0; /* Unambiguous range. (KM). */ h->elev_num = 0; /* Elevation no. within volume scan. */ h->range_bin1 = 0; /* Range to first gate.(meters) */ h-> vel_res = 0; /* Doppler velocity resolution */ h->sweep_rate = 0; /* Sweep rate. Full sweeps/min. */ h->prf = 0; /* Pulse repetition frequency, in Hz. */ h->azim_rate; /* degrees/sec */ h->fix_angle; h->pitch; /* Pitch angle. */ h->roll; /* Roll angle. */ h->heading; /* Heading. */ h->pitch_rate; /* (angle/sec) */ h->roll_rate; /* (angle/sec) */ h->heading_rate; /* (angle/sec) */ h->rvc; /* Radial velocity correction (m/sec) */ h->vel_east; /* Platform velocity to the east (m/sec) */ h->vel_north; /* Platform velocity to the north (m/sec) */ h->vel_up; /* Platform velocity toward up (m/sec) */ h->pulse_count; /* Pulses used in a single dwell time. */ h->pulse_width; /* Pulse width (micro-sec). */ h->frequency; /* Carrier freq. GHz. */ h->wavelength; /* Wavelength. Meters. */ h->nyq_vel; /* Nyquist velocity. m/s */ #endif return; } Radar *RSL_radtec_to_radar(char *infile) { Radar *radar; Volume *volume; Sweep *sweep; Ray *ray; float (*f)(Range x); /* Data conversion function. f(x). */ Range (*invf)(float x); /* Data conversion function. invf(x). */ Radtec_file *rfile; float tmp; int nsweeps, nrays, nbins; int isweep, iray, ibin; float sum_elev; rfile = radtec_read_file(infile); if (radar_verbose_flag) { radtec_print_header(&rfile->h); } /* Have the entire radtec file; headers and data. * Initialize the RSL radar and load it up. * * Handles both RHI and PPI scan types. */ /* Only one field type per file. */ radar = RSL_new_radar(MAX_RADAR_VOLUMES); if (rfile->h.scan_type == 1) { /* PPI */ nrays = (int)(360.0 / rfile->h.azim_resolution + 0.5); nsweeps = (int)(rfile->h.num_rays / nrays + 0.5); } else { /* RHI */ nrays = 1; nsweeps = (int)(rfile->h.num_rays / nrays + 0.5); /* Each sweep will contain one ray for RHI scans. */ } nbins = rfile->h.num_range_bins; if (radar_verbose_flag) { fprintf(stderr,"Expecting %d sweeps.\n", nsweeps); fprintf(stderr,"Expecting %d rays.\n", nrays); fprintf(stderr,"Expecting %d bins.\n", nbins); } if (rfile->h.scan_mode == 0) { /* Log video == Reflectivity. */ f = DZ_F; invf = DZ_INVF; volume = radar->v[DZ_INDEX] = RSL_new_volume(nsweeps); volume->h.type_str = strdup("Reflectivity"); } else { /* Doppler */ f = VR_F; invf = VR_INVF; volume = radar->v[VR_INDEX] = RSL_new_volume(nsweeps); volume->h.type_str = strdup("Velocity"); } volume->h.f = f; volume->h.invf = invf; /* Load the radar header information. */ radar->h.month = rfile->h.month; radar->h.day = rfile->h.day; radar->h.year = rfile->h.year; radar->h.hour = rfile->h.hour; radar->h.minute = rfile->h.min; radar->h.sec = rfile->h.sec; /* Second plus fractional part. */ sprintf(radar->h.radar_type,"radtec"); radar->h.number = rfile->h.version; /* arbitrary number of this radar site */ sprintf(radar->h.name,"radtec"); /* Nexrad site name */ sprintf(radar->h.radar_name,"RADTEC"); /* Radar name. */ sprintf(radar->h.city,"Unknown"); /* nearest city to radar site */ sprintf(radar->h.state,"??"); /* state of radar site */ sprintf(radar->h.country,"???"); /** Latitude deg, min, sec **/ radar->h.latd = (int)rfile->h.site_latitude; tmp = (rfile->h.site_latitude - radar->h.latd) * 60.0; radar->h.latm = (int)tmp; radar->h.lats = (int)((tmp - radar->h.latm) * 60.0); /** Longitude deg, min, sec **/ radar->h.lond = (int)rfile->h.site_longitude; tmp = (rfile->h.site_longitude - radar->h.lond) * 60.0; radar->h.lonm = (int)tmp; radar->h.lons = (int)((tmp - radar->h.lonm) * 60.0); radar->h.height = rfile->h.site_elevation; /* height of site in meters above sea level*/ radar->h.spulse = 0; /* length of short pulse (ns)*/ radar->h.lpulse = 0; /* length of long pulse (ns) */ /* Loop through the RSL number of sweeps and attach the data. */ for (isweep = 0; isweep < nsweeps; isweep++) { sweep = volume->sweep[isweep] = RSL_new_sweep(nrays); sweep->h.f = f; sweep->h.invf = invf; sum_elev = 0; for (iray = 0; iray < nrays; iray++) { ray = sweep->ray[iray] = RSL_new_ray(nbins); ray->h.f = f; ray->h.invf = invf; fill_ray_header(&ray->h, &rfile->h, rfile->ray[iray].h); RSL_fix_time(ray); sum_elev += ray->h.elev; /* Fill the data. */ for (ibin=0; ibin < nbins; ibin++) { /* printf ("ray[%d].dbz[%d] = %f\n", iray, ibin, rfile->ray[iray].dbz[ibin]); */ ray->range[ibin] = invf(rfile->ray[iray].dbz[ibin]); } } sweep->h.elev = sum_elev / nrays; sweep->h.beam_width = rfile->h.azim_resolution; /* This is in the ray header too. */ sweep->h.vert_half_bw = sweep->h.beam_width/2; /* Vertical beam width divided by 2 */ sweep->h.horz_half_bw = sweep->h.beam_width/2; /* Horizontal beam width divided by 2 */ } radtec_free_file(rfile); rfile = NULL; return radar; } #else Radar *RSL_radtec_to_radar(char *infile) { fprintf(stderr, "RADTEC is not installed in this version of RSL.\n"); fprintf(stderr, "The library libimplode.a (or .so) was not found during\n"); fprintf(stderr, "the RSL configuration.\n"); return NULL; } #endif rsl-v1.43/rapic_to_radar.c0000644000102200007640000000113607021115215012454 00000000000000#include "rsl.h" #include extern Radar *rapic_radar; extern int rapicparse(void); Radar *RSL_rapic_to_radar(char *infile) { /* Attach infile to stdin and call the parser. */ FILE *fp; Radar *radar; int save_fd; radar = NULL; if (infile == NULL) { save_fd = dup(0); fp = fdopen(save_fd, "r"); } else { if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return radar; } } fp = uncompress_pipe(fp); /* Transparently gunzip. */ close(0); dup(fileno(fp)); /* Redirect stdin. */ rapicparse(); radar = rapic_radar; rsl_pclose(fp); return radar; } rsl-v1.43/install-sh0000755000102200007640000001273607022643702011363 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 rsl-v1.43/rapic.c0000644000102200007640000017647611600461213010625 00000000000000/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse rapicparse #define yylex rapiclex #define yyerror rapicerror #define yylval rapiclval #define yychar rapicchar #define yydebug rapicdebug #define yynerrs rapicnerrs /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { IMAGE = 258, IMAGESCANS = 259, IMAGESIZE = 260, IMAGEEND = 261, SCAN = 262, IMAGEHEADEREND = 263, NUMBER = 264, ALPHA = 265, FLOATNUMBER = 266, BRACKETNUM = 267, COUNTRY = 268, NAME = 269, STNID = 270, LATITUDE = 271, LONGITUDE = 272, HEIGHT = 273, DATE = 274, TIME = 275, TIMESTAMP = 276, VERS = 277, FREQUENCY = 278, PRF = 279, PULSELENGTH = 280, RNGRES = 281, ANGRES = 282, ANGLERATE = 283, CLEARAIR = 284, ON = 285, OFF = 286, VIDRES = 287, STARTRNG = 288, ENDRNG = 289, PRODUCT = 290, PASS = 291, IMGFMT = 292, ELEV = 293, VIDEO = 294, VELLVL = 295, NYQUIST = 296, UNFOLDING = 297, AT = 298, VOLUMETRIC = 299, NORMAL = 300, OF = 301, REFL = 302, VEL = 303, UNCORREFL = 304, ZDR = 305, WID = 306, NONE = 307, RAYDATA = 308, ENDRADARIMAGE = 309 }; #endif /* Tokens. */ #define IMAGE 258 #define IMAGESCANS 259 #define IMAGESIZE 260 #define IMAGEEND 261 #define SCAN 262 #define IMAGEHEADEREND 263 #define NUMBER 264 #define ALPHA 265 #define FLOATNUMBER 266 #define BRACKETNUM 267 #define COUNTRY 268 #define NAME 269 #define STNID 270 #define LATITUDE 271 #define LONGITUDE 272 #define HEIGHT 273 #define DATE 274 #define TIME 275 #define TIMESTAMP 276 #define VERS 277 #define FREQUENCY 278 #define PRF 279 #define PULSELENGTH 280 #define RNGRES 281 #define ANGRES 282 #define ANGLERATE 283 #define CLEARAIR 284 #define ON 285 #define OFF 286 #define VIDRES 287 #define STARTRNG 288 #define ENDRNG 289 #define PRODUCT 290 #define PASS 291 #define IMGFMT 292 #define ELEV 293 #define VIDEO 294 #define VELLVL 295 #define NYQUIST 296 #define UNFOLDING 297 #define AT 298 #define VOLUMETRIC 299 #define NORMAL 300 #define OF 301 #define REFL 302 #define VEL 303 #define UNCORREFL 304 #define ZDR 305 #define WID 306 #define NONE 307 #define RAYDATA 308 #define ENDRADARIMAGE 309 /* Copy the first part of user declarations. */ #line 23 "rapic.y" #define USE_RSL_VARS #include "rapic_routines.h" #include "rsl.h" #include #include #include int rapicerror(char *s); int rapicwrap(char *s); int rapicwrap(char *s); int yywrap(char *s); int rapiclex(void); int nsweep = 0; float angres; Radar *radar, *rapic_radar = NULL; Volume *volume; Sweep *sweep; Ray *ray; /* Rapic format declarations. */ Rapic_sweep_header rh; Rapic_sweep *rs; unsigned char outbuf[2000000]; int outbytes; float azim, elev; float save_elev; int delta_time; int nray = 0; int ifield; int ivolume, isweep, iray; int station_id; int sweepcount[5]; extern int radar_verbose_flag; float rapic_nyquist; /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 326 "rapic.y" { Charlen token; } /* Line 193 of yacc.c. */ #line 257 "rapic.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */ #line 270 "rapic.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int i) #else static int YYID (i) int i; #endif { return i; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 17 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 194 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 56 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 53 /* YYNRULES -- Number of rules. */ #define YYNRULES 100 /* YYNRULES -- Number of states. */ #define YYNSTATES 152 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 309 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 7, 9, 12, 16, 18, 22, 25, 27, 30, 31, 35, 38, 41, 43, 55, 57, 60, 61, 63, 65, 68, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 133, 135, 138, 141, 144, 147, 150, 153, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 57, 0, -1, 62, 58, 61, -1, 59, -1, 58, 59, -1, 60, 66, 54, -1, 68, -1, 6, 72, 74, -1, 63, 8, -1, 64, -1, 63, 64, -1, -1, 3, 72, 74, -1, 4, 71, -1, 5, 71, -1, 65, -1, 7, 73, 55, 72, 75, 76, 77, 78, 76, 79, 80, -1, 67, -1, 66, 67, -1, -1, 53, -1, 69, -1, 68, 69, -1, -1, 14, 83, -1, 13, 82, -1, 15, 84, -1, 16, 85, -1, 17, 86, -1, 18, 87, -1, 19, 81, -1, 20, 88, -1, 21, 89, -1, 22, 90, -1, 23, 91, -1, 24, 92, -1, 25, 93, -1, 26, 94, -1, 28, 96, -1, 29, 97, -1, 27, 95, -1, 32, 98, -1, 33, 99, -1, 34, 99, -1, 35, 100, 12, -1, 35, -1, 36, 101, -1, 38, 77, -1, 40, 106, -1, 41, 107, -1, 39, 105, -1, 37, 104, -1, 42, 108, -1, 71, -1, 11, -1, 9, -1, 71, -1, 71, -1, 71, -1, 71, -1, 70, -1, 10, -1, 70, -1, 71, -1, 71, -1, 71, -1, 71, -1, 71, -1, 10, -1, 71, -1, 70, -1, 70, -1, 70, -1, 70, -1, 71, -1, 70, -1, 71, -1, 71, -1, 70, -1, 71, -1, 70, -1, 70, -1, 30, -1, 31, -1, 71, -1, 71, -1, 44, -1, 45, -1, 102, 46, 103, -1, 71, -1, 71, -1, 10, -1, 47, -1, 48, -1, 49, -1, 50, -1, 51, -1, 70, -1, 70, -1, 52, -1, 71, 55, 71, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 334, 334, 346, 347, 349, 359, 372, 374, 413, 414, 415, 418, 429, 430, 437, 440, 450, 451, 452, 455, 507, 508, 509, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 545, 546, 547, 550, 551, 553, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 567, 568, 569, 570, 571, 572, 573, 575, 576, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 591, 592, 593, 594, 596, 597, 598, 599, 600, 602, 603, 605, 606 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "IMAGE", "IMAGESCANS", "IMAGESIZE", "IMAGEEND", "SCAN", "IMAGEHEADEREND", "NUMBER", "ALPHA", "FLOATNUMBER", "BRACKETNUM", "COUNTRY", "NAME", "STNID", "LATITUDE", "LONGITUDE", "HEIGHT", "DATE", "TIME", "TIMESTAMP", "VERS", "FREQUENCY", "PRF", "PULSELENGTH", "RNGRES", "ANGRES", "ANGLERATE", "CLEARAIR", "ON", "OFF", "VIDRES", "STARTRNG", "ENDRNG", "PRODUCT", "PASS", "IMGFMT", "ELEV", "VIDEO", "VELLVL", "NYQUIST", "UNFOLDING", "AT", "VOLUMETRIC", "NORMAL", "OF", "REFL", "VEL", "UNCORREFL", "ZDR", "WID", "NONE", "RAYDATA", "ENDRADARIMAGE", "':'", "$accept", "rapic_recognized", "sweeps", "sweep", "sweepheader", "imageend", "complete_header", "imageheader", "imageheader_item", "scanlist", "rays", "ray", "scanheader", "scanheaditem", "real", "number", "seqno", "scanno", "imgno", "datetime", "dc", "elev", "fieldno", "offset", "size", "datno", "code", "namestr", "idno", "lat", "lon", "alt", "hhmm", "yyyymoddhhmmss", "versionNumber", "freq", "prf", "len", "gatewidth", "angle", "anglerate", "clearair", "res", "rng", "typeid", "noofnscans", "no", "nscans", "type", "field", "level", "nyq", "ratio", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 58 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 56, 57, 58, 58, 59, 60, 61, 62, 63, 63, 63, 64, 64, 64, 64, 65, 66, 66, 66, 67, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 97, 98, 99, 100, 100, 101, 102, 103, 104, 105, 105, 105, 105, 105, 106, 107, 108, 108 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 3, 1, 2, 3, 1, 3, 2, 1, 2, 0, 3, 2, 2, 1, 11, 1, 2, 0, 1, 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 11, 0, 0, 0, 0, 0, 23, 0, 9, 15, 55, 56, 0, 13, 14, 57, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 23, 3, 19, 6, 21, 8, 10, 58, 12, 0, 67, 25, 68, 24, 69, 26, 54, 70, 53, 27, 71, 28, 72, 29, 66, 30, 73, 31, 74, 32, 75, 33, 76, 34, 77, 35, 78, 36, 79, 37, 80, 40, 81, 38, 82, 83, 39, 84, 41, 85, 42, 43, 86, 87, 0, 89, 46, 0, 91, 51, 62, 47, 92, 93, 94, 95, 96, 50, 97, 48, 98, 49, 99, 0, 52, 0, 4, 2, 20, 0, 17, 22, 0, 44, 0, 0, 0, 5, 18, 59, 0, 90, 88, 100, 7, 61, 60, 0, 0, 63, 0, 0, 64, 0, 65, 16 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 5, 46, 47, 48, 123, 6, 7, 8, 9, 125, 126, 49, 50, 106, 64, 12, 16, 54, 136, 143, 107, 146, 149, 151, 71, 57, 59, 61, 65, 67, 69, 73, 75, 77, 79, 81, 83, 85, 87, 89, 92, 94, 96, 100, 102, 103, 138, 105, 113, 115, 117, 120 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -65 static const yytype_int16 yypact[] = { 11, 13, 13, 13, 13, 24, 152, 5, -65, -65, -65, -65, 13, -65, -65, -65, -29, -65, 13, 19, 13, -4, -4, -4, 13, -4, 13, -4, 13, 13, -4, 13, -4, -4, -10, 13, 13, 13, 2, 13, 27, -4, 8, -4, -4, -3, 58, -65, -11, 152, -65, -65, -65, -65, -65, 13, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 40, -65, -65, 7, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 14, -65, 13, -65, -65, -65, 12, -65, -65, 13, -65, 13, 13, 13, -65, -65, -65, 22, -65, -65, -65, -65, -65, -65, -4, 13, -65, 22, 13, -65, 13, -65, -65 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -65, -65, -65, 17, -65, -65, -65, -65, 53, -65, -65, -58, -65, 39, 18, -1, -51, -65, -64, -65, -57, -42, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, 65, -65, -65, -65, -65, -65, -65, -65, -65, -65 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 11, 13, 14, 15, 128, 10, 10, 62, 1, 2, 3, 53, 4, 51, 1, 2, 3, 56, 4, 60, 90, 91, 10, 70, 17, 74, 55, 78, 80, 58, 84, 10, 141, 62, 93, 95, 95, 104, 101, 63, 66, 68, 124, 72, 119, 76, 98, 99, 82, 118, 86, 88, 129, 130, 11, 108, 109, 110, 111, 112, 52, 114, 116, 122, 121, 124, 133, 134, 140, 131, 132, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 127, 147, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 144, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 135, 0, 137, 139, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 0, 0, 148, 0, 150, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }; static const yytype_int16 yycheck[] = { 1, 2, 3, 4, 55, 9, 9, 11, 3, 4, 5, 12, 7, 8, 3, 4, 5, 18, 7, 20, 30, 31, 9, 24, 0, 26, 55, 28, 29, 10, 31, 9, 10, 11, 35, 36, 37, 10, 39, 21, 22, 23, 53, 25, 45, 27, 44, 45, 30, 52, 32, 33, 12, 46, 55, 47, 48, 49, 50, 51, 7, 43, 44, 46, 6, 53, 54, 125, 132, 55, 121, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 49, 146, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 143, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, -1, -1, -1, -1, -1, -1, 128, -1, 130, 131, 132, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 144, -1, -1, 147, -1, 149, -1, -1, -1, -1, -1, 136, -1, -1, -1, -1, -1, -1, -1, -1, -1, 146, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 7, 57, 62, 63, 64, 65, 9, 71, 72, 71, 71, 71, 73, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 58, 59, 60, 68, 69, 8, 64, 71, 74, 55, 71, 82, 10, 83, 71, 84, 11, 70, 71, 85, 70, 86, 70, 87, 71, 81, 70, 88, 71, 89, 70, 90, 71, 91, 71, 92, 70, 93, 71, 94, 70, 95, 70, 96, 30, 31, 97, 71, 98, 71, 99, 99, 44, 45, 100, 71, 101, 102, 10, 104, 70, 77, 47, 48, 49, 50, 51, 105, 70, 106, 70, 107, 52, 71, 108, 6, 59, 61, 53, 66, 67, 69, 72, 12, 46, 55, 72, 54, 67, 71, 75, 71, 103, 71, 74, 10, 70, 76, 77, 71, 78, 76, 71, 79, 71, 80 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) yytype_int16 *bottom; yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The look-ahead symbol. */ int yychar; /* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss = yyssa; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a look-ahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 335 "rapic.y" { if (radar_verbose_flag) fprintf(stderr, "SUCCESSFUL parse\n"); sprintf(radar->h.name, "%s", rh.namestr); sprintf(radar->h.radar_name, "%s", rh.namestr); radar = fill_header(radar); radar = RSL_prune_radar(radar); rapic_radar = radar; YYACCEPT; } break; case 5: #line 350 "rapic.y" { /* Attach the sweep to the volume. */ if (radar_verbose_flag) fprintf(stderr, "Attach the sweep %d to the volume %d.\n", isweep, ivolume); radar->v[ivolume]->sweep[isweep] = sweep; radar->v[ivolume]->h.f = sweep->h.f; radar->v[ivolume]->h.invf = sweep->h.invf; } break; case 6: #line 360 "rapic.y" { /* float c = RSL_SPEED_OF_LIGHT; */ if (rh.angle_resolution != 0) sweep = RSL_new_sweep((int)(360.0/rh.angle_resolution+0.5)); if (fabs(rh.elev - save_elev) > .5) { /* New sweep elevation. */ isweep++; save_elev = rh.elev; } nray = 0; /* rapic_nyquist = c*((float)rh.prf/10.)/(4.*(float)rh.freq*100000.0); */ } break; case 8: #line 375 "rapic.y" { if (radar_verbose_flag) fprintf(stderr, "sweepcount[0] = %d\n", sweepcount[0]); if (sweepcount[0] > 0) { radar->v[DZ_INDEX] = RSL_new_volume(sweepcount[0]); radar->v[DZ_INDEX]->h.type_str = strdup("Reflectivity"); } if (radar_verbose_flag) fprintf(stderr, "sweepcount[1] = %d\n", sweepcount[1]); if (sweepcount[1] > 0) { volume = radar->v[VR_INDEX] = RSL_new_volume(sweepcount[1]); volume->h.type_str = strdup("Velocity"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[2] = %d\n", sweepcount[2]); if (sweepcount[2] > 0) { radar->v[SW_INDEX] = RSL_new_volume(sweepcount[2]); volume->h.type_str = strdup("Spectral Width"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[3] = %d\n", sweepcount[3]); if (sweepcount[3] > 0) { radar->v[ZD_INDEX] = RSL_new_volume(sweepcount[3]); volume->h.type_str = strdup("Reflectivity Depolarization Ratio"); volume->h.calibr_const = 0.0; } if (radar_verbose_flag) fprintf(stderr, "sweepcount[4] = %d\n", sweepcount[4]); if (sweepcount[4] > 0) { radar->v[ZT_INDEX] = RSL_new_volume(sweepcount[4]); volume->h.type_str = strdup("Total Reflectivity"); volume->h.calibr_const = 0.0; } isweep = -1; /* It keeps track of the sweep number across all field * types; volumes. It is immediately bumped to 0 when * the sweepheader is parsed. */ save_elev = 99999; } break; case 12: #line 419 "rapic.y" { radar = RSL_new_radar(MAX_RADAR_VOLUMES); sweepcount[0] = 0; sweepcount[1] = 0; sweepcount[2] = 0; sweepcount[3] = 0; sweepcount[4] = 0; radar->h.number = atoi((yyvsp[(2) - (3)].token.s)); } break; case 14: #line 431 "rapic.y" { if (atoi((yyvsp[(2) - (2)].token.s)) <= 0) { fprintf(stderr, "RAPIC: /IMAGESIZE == %d. RAPIC ingest returning NULL.\n", atoi((yyvsp[(2) - (2)].token.s))); YYERROR; } } break; case 16: #line 441 "rapic.y" { ifield = atoi((yyvsp[(8) - (11)].token.s)); sweepcount[ifield]++; } break; case 20: #line 456 "rapic.y" { /* fprintf(stderr, "YACC len=%d text=<", yylval.token.len); */ /* binprint(yylval.token.s, yylval.token.len); */ /* fprintf(stderr, ">\n"); */ /* Quiet the compilier, because I only use the rsl_f_list and rsl_invf_list. */ RSL_ftype[0] = RSL_ftype[0]; /* Use yylval.token.s and yylval.token.len */ memset(outbuf, '\0', sizeof(outbuf)); rapic_decode((unsigned char *)yylval.token.s, yylval.token.len, outbuf, &outbytes, &azim, &elev, &delta_time); /* fprintf(stderr, "RAYDATA: ray %d, ivol %d, isweep %d, azim %f, elev %f, dtime %d, size=%d\n", nray, ivolume, isweep, azim, elev, delta_time, outbytes); */ ray = RSL_new_ray(outbytes); rapic_load_ray_header(rh, nray, isweep, elev, azim, &ray->h); /* Mostly from the scanheader (rh). */ ray->h.azimuth = azim; /* if (39h.elev = elev; ray->h.sec += delta_time; ray->h.f = RSL_f_list[ivolume]; /* Data conversion function. f(x). */ ray->h.invf = RSL_invf_list[ivolume]; /* invf(x). */ rapic_fix_time(ray); rapic_load_ray_data(outbuf, outbytes, ivolume, ray); #define DODO #undef DODO #ifdef DODO if (ray->h.ray_num == 0 && ivolume == 1 && isweep == 0) { int i; fprintf(stderr, "RAYDATA: ray %d, ivol %d, isweep %d, azim %f, elev %f, dtime %d, size=%d\n", nray, ivolume, isweep, azim, elev, delta_time, outbytes); for (i=0; ih.nbins; i++) { fprintf(stderr,"YACCray->range[%d] = %d %f\n", i, (int)ray->range[i], ray->h.f(ray->range[i])); } } #endif /* Attach the ray to the sweep. */ sweep->ray[nray] = ray; sweep->h.beam_width = ray->h.beam_width; sweep->h.vert_half_bw = sweep->h.beam_width / 2.0; sweep->h.horz_half_bw = sweep->h.beam_width / 2.0; sweep->h.sweep_num = isweep; sweep->h.elev = ray->h.elev; sweep->h.f = ray->h.f; sweep->h.invf = ray->h.invf; nray++; /* } */ } break; case 24: #line 515 "rapic.y" { memmove(rh.namestr,(yyvsp[(2) - (2)].token.s),(yyvsp[(2) - (2)].token.len)); } break; case 25: #line 516 "rapic.y" { rh.country = atoi((yyvsp[(2) - (2)].token.s)); } break; case 26: #line 517 "rapic.y" { rh.station_id_no = atoi((yyvsp[(2) - (2)].token.s)); } break; case 27: #line 518 "rapic.y" { rh.lat = atof((yyvsp[(2) - (2)].token.s)); } break; case 28: #line 519 "rapic.y" { rh.lon = atof((yyvsp[(2) - (2)].token.s)); } break; case 29: #line 520 "rapic.y" { rh.height = atof((yyvsp[(2) - (2)].token.s)); } break; case 30: #line 521 "rapic.y" { rh.datno = atoi((yyvsp[(2) - (2)].token.s)); } break; case 31: #line 522 "rapic.y" { rh.hhmm = atof((yyvsp[(2) - (2)].token.s)); } break; case 32: #line 523 "rapic.y" { memmove(rh.yyyymoddhhmmss,(yyvsp[(2) - (2)].token.s),(yyvsp[(2) - (2)].token.len)); } break; case 33: #line 524 "rapic.y" { rh.versionNumber = atof((yyvsp[(2) - (2)].token.s)); } break; case 34: #line 525 "rapic.y" { rh.freq = atoi((yyvsp[(2) - (2)].token.s)); } break; case 35: #line 526 "rapic.y" { rh.prf = atoi((yyvsp[(2) - (2)].token.s)); } break; case 36: #line 527 "rapic.y" { rh.pulselen = atof((yyvsp[(2) - (2)].token.s)); } break; case 37: #line 528 "rapic.y" { rh.range_resolution = atoi((yyvsp[(2) - (2)].token.s)); } break; case 38: #line 529 "rapic.y" { rh.anglerate = atof((yyvsp[(2) - (2)].token.s)); } break; case 39: #line 530 "rapic.y" { memmove(rh.clearair,(yyvsp[(2) - (2)].token.s),(yyvsp[(2) - (2)].token.len));} break; case 40: #line 531 "rapic.y" { rh.angle_resolution = atof((yyvsp[(2) - (2)].token.s)); } break; case 41: #line 532 "rapic.y" { rh.video_resolution = atoi((yyvsp[(2) - (2)].token.s)); } break; case 42: #line 533 "rapic.y" { rh.start_range = atoi((yyvsp[(2) - (2)].token.s)); } break; case 43: #line 534 "rapic.y" { rh.end_range = atoi((yyvsp[(2) - (2)].token.s)); } break; case 44: #line 535 "rapic.y" { memmove(rh.product_type,(yyvsp[(2) - (3)].token.s),(yyvsp[(2) - (3)].token.len)); } break; case 47: #line 538 "rapic.y" { rh.elev = atof((yyvsp[(2) - (2)].token.s)); } break; case 48: #line 539 "rapic.y" { rh.vellvl = atof((yyvsp[(2) - (2)].token.s)); } break; case 49: #line 541 "rapic.y" { rh.nyquist = atof((yyvsp[(2) - (2)].token.s)); rapic_nyquist = rh.nyquist; } break; case 50: #line 545 "rapic.y" { memmove(rh.video,(yyvsp[(2) - (2)].token.s),(yyvsp[(2) - (2)].token.len)); } break; case 51: #line 546 "rapic.y" { memmove(rh.imgfmt,(yyvsp[(2) - (2)].token.s),(yyvsp[(2) - (2)].token.len)); } break; case 89: #line 592 "rapic.y" {rh.scannum = atoi((yyvsp[(1) - (1)].token.s));} break; case 90: #line 593 "rapic.y" {rh.ofscans = atoi((yyvsp[(1) - (1)].token.s));} break; case 92: #line 596 "rapic.y" {ivolume = DZ_INDEX; volume = radar->v[ivolume];} break; case 93: #line 597 "rapic.y" {ivolume = VR_INDEX; volume = radar->v[ivolume];} break; case 94: #line 598 "rapic.y" {ivolume = ZT_INDEX; volume = radar->v[ivolume];} break; case 95: #line 599 "rapic.y" {ivolume = ZD_INDEX; volume = radar->v[ivolume];} break; case 96: #line 600 "rapic.y" {ivolume = SW_INDEX; volume = radar->v[ivolume];} break; case 99: #line 605 "rapic.y" {rh.ratio1 = 0; rh.ratio2 = 0;} break; case 100: #line 606 "rapic.y" {rh.ratio1 = atoi((yyvsp[(1) - (3)].token.s)); rh.ratio2 = atoi((yyvsp[(3) - (3)].token.s));} break; /* Line 1267 of yacc.c. */ #line 1976 "rapic.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } #line 610 "rapic.y" int rapicerror(char *s) { fprintf(stderr, "RAPIC ERROR: <%s> on token <", s); binprint(yylval.token.s, yylval.token.len); fprintf(stderr, ">\n"); return 1; } int rapicwrap(char *s) { yywrap(s); return 1; } rsl-v1.43/interp.c0000644000102200007640000002763207634132711011027 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996 Dennis F. Flanigan Jr. of Applied Research Corporation, Landover, Maryland, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Interpolation functions * * Dennis Flanigan, Jr. * * 7/7/95 * Finished testing interpolation routine. * * 7/6/95 * Finished up bilinear interpolation routine. * Routine calculates values using four surrounding * values with the same slant range. * * 6/29/95 * Added bilinear interpolation value routine. Rewrote * get_surrounding sweeps so that it returns Sweeps instead of * Sweep indexes. * * 6/28/95 * Added internal ray searching routine. Replaces * RSL_get_next_closest_ray. * * 6/25/95 * Added internal sweep searching routine designed for use * by interpolation routines. Replaced RSL_get_next_closest_sweep. * * 6/23/95 * This file was created. Started adding internal routines * needed for calculating distences between two points * in space. */ #include #include #include "rsl.h" #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif extern double hypot(double, double); /***************************************************/ /* */ /* get_xyz_coord */ /* */ /* */ /***************************************************/ void get_xyz_coord(double *x,double *y,double *z, double range,double azim,double elev) { /* Return x,y,z coordinates given range, azimuth angle and * elevation angle. Memory allocation for x,y and z are * not provided by this routine! */ double azim_rad,elev_rad; # define M_PI 3.14159265358979323846 azim_rad = azim * M_PI / 180.0; elev_rad = elev * M_PI / 180.0; *x = cos(elev_rad) * cos(azim_rad) * range; *y = cos(elev_rad) * sin(azim_rad) * range; *z = sin(elev_rad) * range; } /***************************************************/ /* */ /* get_dist */ /* */ /* */ /***************************************************/ float get_dist(float r1,float a1,float e1, float r2,float a2,float e2) { /* Give two points described by range, azimuth angle * and elevation angle, return the distence between * the two. */ double x1,y1,z1,x2,y2,z2; get_xyz_coord(&x1,&y1,&z1,(double)r1,(double)a1,(double)e1); get_xyz_coord(&x2,&y2,&z2,(double)r2,(double)a2,(double)e2); return (float) sqrt(pow(x1 - x2,2) + pow(y1 - y2,2) + pow(z1 - z2,2)); } /***************************************************/ /* */ /* get_surrounding_sweeps */ /* */ /* */ /***************************************************/ void get_surrounding_sweep(Sweep **below,Sweep **above, Volume *v, float elev) { /* Return the pointers of the sweeps that are above and * and below the elevation angle in the parameter list. * * Assume at least one non-NULL sweep exist in Volume. * * A value of NULL is set to above or below in cases * where there is no sweep above or below. */ int a; /* look for above index first */ a = 0; while(a < v->h.nsweeps) { if(v->sweep[a] != NULL) { if(v->sweep[a]->h.elev >= elev) { *above = v->sweep[a]; break; } } a++; } /* Was above ever set ? * If not, set above to counter. */ if(a == v->h.nsweeps) { *above = NULL; } /* Look for index just below elev */ a--; while(a >= 0) { if(v->sweep[a] != NULL) { if(v->sweep[a]->h.elev <= elev) { *below = v->sweep[a]; break; } } a--; } /* Was a below found ? */ if (a == -1) { *below = NULL; } /* Bye */ } /****************************************** * * * dir_angle_diff * * * * Dennis Flanigan,Jr. 4/29/95 * ******************************************/ double dir_angle_diff(float x,float y) { /* returns difference between angles x and y. Returns * positive value if y > x, negitive value if * y < x. * */ double d; d = (double)(y - x); while (d >= 180) d = -1 * (360 - d); while (d < -180) d = (360 + d); return d; } /***************************************************/ /* */ /* get_surrounding_rays */ /* */ /* */ /***************************************************/ void get_surrounding_ray(Ray **ccwise,Ray **cwise,Sweep *s, float ray_angle) { /* Return the pointers to the rays that are counterclockwise * and clockwise to the ray_angle in the parameter list. * Memory space for the variables ccwise and cwise * is not allocated by this routine. * * Assume at least two rays exist and that a hash * table has been created. * * Will need to add test for first ray and last * ray if this routine is going to be used for * RHI scans. */ int hindex; double close_diff; Hash_table *hash_table; Azimuth_hash *closest; /* Find hash index close to hindex we want. This will * used as a starting point for a search to the closest * ray. */ hash_table = hash_table_for_sweep(s); if (hash_table == NULL) return; /* Nada. */ hindex = hash_bin(hash_table,ray_angle); /* Find hash entry with closest Ray */ closest = the_closest_hash(hash_table->indexes[hindex],ray_angle); close_diff = dir_angle_diff(ray_angle,closest->ray->h.azimuth); if(close_diff < 0) { /* Closest ray is counterclockwise to ray_angle */ *ccwise = closest->ray; *cwise = closest->ray_high->ray; } else { /* Closest ray is clockwise to ray_angle. */ *cwise = closest->ray; *ccwise = closest->ray_low->ray; } } /***************************************************/ /* */ /* from_dB, to_dB */ /* */ /***************************************************/ double from_dB(double db) { return pow(10,db/10.0); } double to_dB(double value) { return 10.0 * log10(value); } /***************************************************/ /* */ /* get_linear_value_from_sweep */ /* */ /***************************************************/ double get_linear_value_from_sweep(Sweep *sweep,float srange,float azim, float limit) { float ccw_db_value,cw_db_value; double ccw_value,cw_value,value; double delta_angle; Ray *ccw_ray,*cw_ray; get_surrounding_ray(&ccw_ray,&cw_ray,sweep,azim); /* Assume that ccw_ray and cw_ray will be non_NULL */ if((azim - ccw_ray->h.azimuth) > limit) { ccw_value = -1; } else { ccw_db_value = RSL_get_value_from_ray(ccw_ray,srange); /* Check to make sure this is a valid value */ if (ccw_db_value == BADVAL) { ccw_value = 0; } else { ccw_value = from_dB(ccw_db_value); } } if((cw_ray->h.azimuth - azim) > limit) { cw_value = -1; } else { cw_db_value = RSL_get_value_from_ray(cw_ray,srange); /* Check to make sure this is a valid value */ if (cw_db_value == BADVAL) { cw_value = 0; } else { cw_value = from_dB(cw_db_value); } } if((cw_value != -1) && (ccw_value != -1)) { /* Both the clockwise ray and the counterclockwise * ray is valid. */ delta_angle = angle_diff(ccw_ray->h.azimuth,cw_ray->h.azimuth); value=((angle_diff(azim,cw_ray->h.azimuth)/delta_angle)*ccw_value) + ((angle_diff(azim,ccw_ray->h.azimuth)/delta_angle) * cw_value); } else if((cw_value == -1) && (ccw_value == -1)) { /* Neither ray is valid. */ value = -1; } else if(cw_value != -1) { /* cw_ray is only ray that is within limit. */ value = cw_value; } else { /* ccw_ray is only ray that is within limit. */ value = ccw_value; } return value; } /***************************************************/ /* */ /* RSL_get_linear_value */ /* */ /* */ /***************************************************/ float RSL_get_linear_value(Volume *v,float srange,float azim, float elev,float limit) { /* Compute bilinear value from four surrounding values * in Volume v. The four surrounding values * are at a constant range. * * Limit is an angle used only to reject values * in the azimuth plane. */ float db_value; double value = 0; double up_value, down_value; double delta_angle; Sweep *up_sweep,*down_sweep; get_surrounding_sweep(&down_sweep,&up_sweep,v,elev); /* Calculate interpolated value in sweep above * requested point. */ if(up_sweep == NULL) { up_value = -1; } else { up_value = get_linear_value_from_sweep(up_sweep,srange,azim,limit); } /* Calculate interpolated value in sweep below requested point. */ if(down_sweep == NULL) { down_value = -1; } else { down_value = get_linear_value_from_sweep(down_sweep,srange,azim,limit); } /* Using the interpolated values calculated at the elevation * angles in the above and below sweeps, interpolate a value * for the elvation angle at the requested point. */ if((up_value != -1) && (down_value != -1)) { delta_angle = angle_diff(up_sweep->h.elev,down_sweep->h.elev); value =((angle_diff(elev,up_sweep->h.elev)/delta_angle) * down_value) + ((angle_diff(elev,down_sweep->h.elev)/delta_angle) * up_value); } else if((up_value == -1) && (down_value == -1)) { value = -1; } else if(up_value != -1) { value = up_value; } else { value = down_value; } /* Convert back to dB value and return. */ if(value > 0) { db_value = (float)to_dB(value); return db_value; } else { return BADVAL; } } rsl-v1.43/radtec.c0000644000102200007640000002235107023564355010766 00000000000000/* * General RADTEC ingest code. * * By John H. Merritt * * May 21, 1998 */ /* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBIMPLODE #include #include #include "radtec.h" #include static int nray_headers_expected = 0; static int nrays_expected = 0; Radtec_ray_header *ray_header_array; Radtec_ray *ray_array; void radtec_print_header(Radtec_header *h) { printf("version = %d\n", h->version); printf("scan_type = %d\n", h->scan_type); printf("scan_mode = %d\n", h->scan_mode); printf("seqno = %d\n", h->seqno); printf("month = %d\n", h->month); printf("day = %d\n", h->day); printf("year = %d\n", h->year); printf("hour = %d\n", h->hour); printf("min = %d\n", h->min); printf("sec = %d\n", h->sec); printf("az_el = %f\n", h->az_el); printf("azim_resolution = %f\n", h->azim_resolution); printf("azim_offset = %f\n", h->azim_offset); printf("elev_resolution = %f\n", h->elev_resolution); printf("elev_offset = %f\n", h->elev_offset); printf("site_elevation = %f\n", h->site_elevation); printf("site_latitude = %f\n", h->site_latitude); printf("site_longitude = %f\n", h->site_longitude); printf("skip = %f\n", h->skip); printf("range_bin_size = %f\n", h->range_bin_size); printf("num_range_bins = %d\n", h->num_range_bins); printf("num_integrations = %d\n", h->num_integrations); printf("num_rays = %d\n", h->num_rays); } void radtec_print_ray_header(Radtec_ray_header *h) { fprintf(stderr, "ray_num = %d\n", h->ray_num); fprintf(stderr, "azim_angle = %f\n", h->azim_angle); fprintf(stderr, "elev_angle = %f\n", h->elev_angle); fprintf(stderr, "hour = %d\n", h->hour); fprintf(stderr, "min = %d\n", h->min); fprintf(stderr, "sec = %d\n", h->sec); fprintf(stderr, "\n"); } struct PassedParam { unsigned int CmpPhase; FILE *InFile; FILE *OutFile; unsigned long CRC; }; /*------------------------------------------------------------------- Routine to supply data to the implode() or explode() routines. When this routine returns 0 bytes read, the implode() or explode() routines will terminate. Also calculate the CRC-32 on the original uncompressed data during the implode() call. */ #define explode _explode #define implode _implode #define crc32 _crc32 int total_bytes_read = 0; int total_bytes_written = 0; unsigned int ReadFile(char *Buff, unsigned int *Size, void *Param) { size_t Read; struct PassedParam *Par = (struct PassedParam *)Param; Read = fread(Buff, 1, *Size, Par->InFile); total_bytes_read += *Size; if (Par->CmpPhase) Par->CRC = crc32(Buff, (unsigned int *)&Read, &Par->CRC); return (unsigned int)Read; } /*------------------------------------------------------------------- Routine to write compressed data output from implode() or uncompressed data from explode(). Also calculate the CRC on the uncompressed data during the explode() call. */ void radtec_load_rsl_ray_data(char *Buff, unsigned int *Size, void *Param) { struct PassedParam *Par = (struct PassedParam *)Param; Radtec_ray_header ray_header; static int i = 0; static int nray_headers_seen = 0; static int nrays_seen = 0; int ray_size; static int bytes_remaining = 0; /* fwrite(Buff, 1, *Size, Par->OutFile); */ /* Buff -- Contains the data. * *Size -- Contains the length of data. * Par -- Contains CRC, and FILE* information. */ if (!Par->CmpPhase) Par->CRC = crc32(Buff, Size, &Par->CRC); total_bytes_written += *Size; while(i<*Size && nray_headers_seen < nray_headers_expected) { /* Because of word alignment problems, use this painful memcpy approach. */ memcpy(&ray_header.ray_num, &Buff[i], sizeof(short)); i+=sizeof(short); memcpy(&ray_header.azim_angle, &Buff[i], sizeof(float)); i+=sizeof(float); memcpy(&ray_header.elev_angle, &Buff[i], sizeof(float)); i+=sizeof(float); memcpy(&ray_header.hour, &Buff[i], sizeof(short)); i+=sizeof(short); memcpy(&ray_header.min, &Buff[i], sizeof(short)); i+=sizeof(short); memcpy(&ray_header.sec, &Buff[i], sizeof(short)); i+=sizeof(short); i+=4; /* Fill to 20 bytes. */ #define RSL_DEBUG #undef RSL_DEBUG #ifdef RSL_DEBUG radtec_print_ray_header(&ray_header); #endif ray_header_array[nray_headers_seen] = ray_header; nray_headers_seen++; } /* Ok, whenever 'i' exceeds *Size, we must return to the explode routine * so that we get another buffer 'Buff'. This new 'Buff' will pick * up where explode left off, and therefore, we must also pick up where * we left off. */ if (i >= *Size) { i = 0; #ifdef RSL_DEBUG fprintf(stderr, "Need another Buff for ray headers.\n"); #endif return; } /* Getting to this point means that i < *Size and we have seen * all the expected number of ray headers. Now, we must collect * the expected number of rays (the data). */ ray_size = sizeof(Radtec_ray); while(i<*Size && nrays_seen < nrays_expected) { #ifdef RSL_DEBUG fprintf(stderr, "WHILE i=%d, i+ray_size=%d\n", i, i+ray_size); #endif if (i+ray_size > *Size) { /* Possible over flow. */ /* Load what we can. */ memcpy(&ray_array[nrays_seen].dbz, &Buff[i], *Size-i); bytes_remaining = ray_size - *Size + i; #ifdef RSL_DEBUG fprintf(stderr, "Buffer overflow : i=%d ray_size=%d loading %d bytes_remaining=%d\n", i, ray_size, *Size-i, bytes_remaining); #endif i=*Size; break; } else { if (bytes_remaining > 0) { #ifdef RSL_DEBUG fprintf(stderr,"Load remaining: i=%d ray_size=%d bytes_remaining=%d\n", i, ray_size, bytes_remaining); #endif memcpy(&ray_array[nrays_seen].dbz[(ray_size-bytes_remaining)/4], &Buff[i], bytes_remaining); i+=bytes_remaining; bytes_remaining = 0; } else { #ifdef RSL_DEBUG fprintf(stderr, "Load full buff: i=%d ray_size=%d bytes_remaining=%d\n", i, ray_size, bytes_remaining); #endif memcpy(&ray_array[nrays_seen].dbz, &Buff[i], ray_size); i+=ray_size; } } ray_array[nrays_seen].h = &ray_header_array[nrays_seen]; nrays_seen++; #ifdef RSL_DEBUG fprintf(stderr, "Ray data # %d, sizeof(Radtec_ray)=%d, i=%d\n", nrays_seen, sizeof(Radtec_ray), i); #endif } if (i >= *Size) { i = 0; #ifdef RSL_DEBUG fprintf(stderr, "Need another Buff for ray data. i=%d *Size=%d\n", i, *Size); #endif return; } } Radtec_file *radtec_read_file(char *infile) { FILE *fp; Radtec_file *rfile; char *WorkBuff; /* buffer for compression tables */ unsigned int Error; struct PassedParam Param; /* Parameters passed to callback functions */ if (infile == NULL) { fp = stdin; } else { if((fp = fopen(infile, "r")) == NULL) { perror(infile); return NULL; } } rfile = (Radtec_file *)calloc(1, sizeof(Radtec_file)); if (rfile == NULL) { perror("calloc Radtec_file"); return NULL; } fread(&rfile->h, sizeof(Radtec_header), 1, fp); /* Initialize the global for the unpacking routine. The unpacking * routine is a callback for 'explode'; the second argument. */ nray_headers_expected = rfile->h.num_rays; nrays_expected = rfile->h.num_rays; /* Allocate space for all the headers and rays expected. */ ray_header_array = (Radtec_ray_header *)calloc(rfile->h.num_rays, sizeof(Radtec_ray_header)); if (ray_header_array == NULL) { perror("calloc Radtec_ray_header"); return NULL; } ray_array = (Radtec_ray *)calloc(rfile->h.num_rays, sizeof(Radtec_ray)); if (ray_array == NULL) { perror("calloc Radtec_ray"); return NULL; } /* -------------- PKWARE ----------- */ WorkBuff = (char *)malloc(EXP_BUFFER_SIZE); if (WorkBuff == NULL) { perror("RADETC, unable to allocate work buffer."); return NULL; } Param.InFile = fp; Param.OutFile = NULL; /* Initialize CRC */ Param.CmpPhase = 0; Param.CRC = (unsigned long) -1; Error = explode(ReadFile, radtec_load_rsl_ray_data, WorkBuff, &Param); Param.CRC = ~Param.CRC; free(WorkBuff); fclose(Param.InFile); fclose(Param.OutFile); if (Error != 0) { fprintf(stderr, "RADTEC: uncompression completed - Error %d\n", Error); fprintf(stderr, "RADTEC: Total bytes read = %d\n", total_bytes_read); fprintf(stderr, "RADTEC: Total bytes written = %d\n", total_bytes_written); } /* -------------- PKWARE ----------- */ rfile->ray = ray_array; return rfile; } void radtec_free_file(Radtec_file *rfile) { free(rfile->ray); free(rfile); } #endif rsl-v1.43/Makefile.am0000644000102200007640000000446211747562744011427 00000000000000## Process w/ automake. Or, autoreconf; make ## AUTOMAKE_OPTIONS = foreign SUBDIRS = . colors doc examples INCLUDES = -I. -I$(srcdir) -I$(prefix)/include -I$(prefix)/toolkit/include includedir = $(prefix)/include colordir = $(libdir)/colors lib_LTLIBRARIES = librsl.la librsl_la_LDFLAGS = -version-info 1:43 librsl_la_SOURCES = \ $(rapic_c) $(radtec_c)\ dorade.c dorade_print.c dorade_to_radar.c\ lassen.c lassen_to_radar.c \ radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \ range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \ carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \ ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \ mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \ gzip.c prune.c reverse.c fix_headers.c \ nsig_to_radar.c nsig.c nsig2_to_radar.c \ africa_to_radar.c africa.c \ radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \ radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers) librsl_la_DEPENDENCIES = $(build_headers) build_headers = rsl.h wsr88d.h toolkit_1BC-51_appl.h headers = africa.h dorade.h lassen.h \ mcgill.h nsig.h radtec.h rainbow.h \ rapic_routines.h toga.h \ $(build_headers) rapic_c = rapic_to_radar.c rapic.y rapic-lex.l rapic_routines.c radtec_c = radtec_to_radar.c radtec.c rsl.h: Makefile @for h in $(build_headers); do \ echo -n "Checking substitutions in header file $$h ... "; \ cp $$h $$h.in; \ sed -e 's/RSL_VERSION_STR.*/RSL_VERSION_STR \"$(VERSION)\"/' \ -e 's|#define COLORDIR.*|#define COLORDIR \"$(colordir)\"|' \ -e 's|#define WSR88D_SITE_INFO_FILE.*|#define WSR88D_SITE_INFO_FILE \"$(libdir)/wsr88d_locations.dat\"|' \ < $$h.in > $$h.new; \ if cmp -s $$h $$h.new; then \ rm $$h.new; \ echo "$$h remains untouched."; \ else \ mv $$h.new $$h; \ echo "substitutions made in $$h."; \ fi; \ rm -f $$h.in; \ done PREFIX = rapic LFLAGS = -P$(PREFIX) YFLAGS = -d -p $(PREFIX) LEX_OUTPUT_ROOT = lex.$(PREFIX) install-exec-hook: $(INSTALL) -d $(includedir) $(INSTALL) -m 644 rsl.h $(includedir) $(INSTALL) -m 644 toolkit_1BC-51_appl.h $(includedir) $(INSTALL) -m 644 wsr88d_locations.dat $(libdir) EXTRA_DIST = CHANGES Copyright GPL LGPL wsr88d_locations.dat rapic.h DISTCLEANFILES = rapic.c rapic-lex.c rsl-v1.43/uf_to_radar.c0000644000102200007640000005171111565061206012004 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include /* This allows us to use RSL_ftype, RSL_f_list, RSL_invf_list from rsl.h. */ #define USE_RSL_VARS #include "rsl.h" extern int radar_verbose_flag; /* Changed old buffer size (16384) for larger dualpol files. BLK 5/18/2011 */ typedef short UF_buffer[20000]; /* Some UF files are bigger than 4096 * that the UF doc's specify. */ #define UF_MORE 0 #define UF_DONE 1 static float (*f)(Range x); static Range (*invf)(float x); Volume *reset_nsweeps_in_volume(Volume *volume) { int i; if (volume == NULL) return NULL; for (i=volume->h.nsweeps; i>0; i--) if (volume->sweep[i-1] != NULL) { volume->h.nsweeps = i; break; } return volume; } Radar *reset_nsweeps_in_all_volumes(Radar *radar) { int i; if (radar == NULL) return NULL; for (i=0; ih.nvolumes; i++) radar->v[i] = reset_nsweeps_in_volume(radar->v[i]); return radar; } Volume *copy_sweeps_into_volume(Volume *new_volume, Volume *old_volume) { int i; int nsweeps; if (old_volume == NULL) return new_volume; if (new_volume == NULL) return new_volume; nsweeps = new_volume->h.nsweeps; /* Save before copying old header. */ new_volume->h = old_volume->h; new_volume->h.nsweeps = nsweeps; for (i=0; ih.nsweeps; i++) new_volume->sweep[i] = old_volume->sweep[i]; /* Just copy pointers. */ /* Free the old sweep array, not the pointers to sweeps. */ free(old_volume->sweep); return new_volume; } void swap2(short *buf, int n) { short *end_addr; end_addr = buf + n; while (buf < end_addr) { swap_2_bytes(buf); buf++; } } /********************************************************************/ /*********************************************************************/ /* */ /* uf_into_radar */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* August 26, 1994 */ /*********************************************************************/ int uf_into_radar(UF_buffer uf, Radar **the_radar) { /* Missing data flag : -32768 when a signed short. */ #define UF_NO_DATA 0X8000 /* Any convensions may be observed, however, Radial Velocity must be VE. */ /* Typically: * DM = Reflectivity (dB(mW)). * DZ = Reflectivity (dBZ). * VR = Radial Velocity. * CZ = Corrected Reflectivity. (Quality controlled: AP removed, etc.) * SW = Spectrum Width. * DR = Differential Reflectivity. * XZ = X-band Reflectivity. * * These fields may appear in any order in the UF file. * * RETURN: * UF_DONE if we're done with the UF ingest. * UF_MORE if we need more UF data. */ /* These are pointers to various locations within the UF buffer 'uf'. * They are used to index the different components of the UF structure in * a manor consistant with the UF documentation. For instance, uf_ma[1] * will be equivalenced to the second word (2 bytes/each) of the UF * buffer. */ short *uf_ma; /* Mandatory header block. */ short *uf_lu; /* Local Use header block. */ short *uf_dh; /* Data header. */ short *uf_fh; /* Field header. */ short *uf_data; /* Data. */ /* The length of each header. */ int len_data, len_lu; int current_fh_index; float scale_factor; int nfields, isweep, ifield, iray, i, j, m; static int pulled_time_from_first_ray = 0; static int need_scan_mode = 1; char *field_type; /* For printing the field type upon error. */ short proj_name[4]; Ray *ray; Sweep *sweep; Radar *radar; float x; short missing_data; Volume *new_volume; int nbins; extern int rsl_qfield[]; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; radar = *the_radar; /* * The organization of the Radar structure is by volumes, then sweeps, then * rays, then gates. This is different from the UF file organization. * The UF format is sweeps, rays, then gates for all field types (volumes). */ /* Set up all the UF pointers. */ uf_ma = uf; uf_lu = uf + uf_ma[3] - 1; uf_dh = uf + uf_ma[4] - 1; nfields = uf_dh[0]; isweep = uf_ma[9] - 1; if (rsl_qsweep != NULL) { if (isweep > rsl_qsweep_max) return UF_DONE; if (rsl_qsweep[isweep] == 0) return UF_MORE; } /* Here is a sticky part. We must make sure that if we encounter any * additional fields that were not previously present, that we are able * to load them. This will require us to copy the entire radar structure * and whack off the old one. But, we must be sure that it really is a * new field. This is not so trivial as a couple of lines of code; I will * have to think about this a little bit more. See STICKYSOLVED below. */ #ifdef STICKYSOLVED if (radar == NULL) radar = RSL_new_radar(nfields); /* Sticky solution here. */ #else if (radar == NULL) { radar = RSL_new_radar(MAX_RADAR_VOLUMES); *the_radar = radar; pulled_time_from_first_ray = 0; for (i=0; iv[i] = RSL_new_volume(20); } #endif if (need_scan_mode) { /* PPI and RHI are enum constants defined in rsl.h */ if (uf_ma[34] == 1) radar->h.scan_mode = PPI; else if (uf_ma[34] == 3) radar->h.scan_mode = RHI; else { fprintf(stderr,"Warning: UF sweep mode = %d\n", uf_ma[34]); fprintf(stderr," Expected 1 or 3 (PPI or RHI)\n"); fprintf(stderr," Setting radar->h.scan_mode to PPI\n"); radar->h.scan_mode = PPI; } need_scan_mode = 0; } /* For LITTLE ENDIAN: * WE "UNSWAP" character strings. Because there are so few of them, * it is easier to catch them here. The entire UF buffer is swapped prior * to entry to here, therefore, undo-ing these swaps; sets the * character strings right. */ for (i=0; iv[ifield] == NULL) continue; /* Nope. */ if (isweep >= radar->v[ifield]->h.nsweeps) { /* Exceeded sweep limit. * Allocate more sweeps. * Copy all previous sweeps. */ if (radar_verbose_flag) fprintf(stderr,"Exceeded sweep allocation of %d. Adding 20 more.\n", isweep); new_volume = RSL_new_volume(radar->v[ifield]->h.nsweeps+20); new_volume = copy_sweeps_into_volume(new_volume, radar->v[ifield]); radar->v[ifield] = new_volume; } if (radar->v[ifield]->sweep[isweep] == NULL) { if (radar_verbose_flag) fprintf(stderr,"Allocating new sweep for field %d, isweep %d\n", ifield, isweep); radar->v[ifield]->sweep[isweep] = RSL_new_sweep(1000); radar->v[ifield]->sweep[isweep]->h.nrays = 0; /* Increment this for each * ray encountered. */ radar->v[ifield]->h.f = f; radar->v[ifield]->h.invf = invf; radar->v[ifield]->sweep[isweep]->h.f = f; radar->v[ifield]->sweep[isweep]->h.invf = invf; radar->v[ifield]->sweep[isweep]->h.sweep_num = uf_ma[9]; radar->v[ifield]->sweep[isweep]->h.elev = uf_ma[35] / 64.0; } current_fh_index = uf_dh[4+2*i]; uf_fh = uf + current_fh_index - 1; sweep = radar->v[ifield]->sweep[isweep]; iray = sweep->h.nrays; nbins = uf_fh[5]; radar->v[ifield]->sweep[isweep]->ray[iray] = RSL_new_ray(nbins); ray = radar->v[ifield]->sweep[isweep]->ray[iray]; sweep->h.nrays += 1; if (ray) { /* * ---- Beginning of MANDATORY HEADER BLOCK. */ ray->h.ray_num = uf_ma[7]; if (little_endian()) swap2(&uf_ma[10], 8); memcpy(radar->h.radar_name, &uf_ma[10], 8); if (little_endian()) swap2(&uf_ma[10], 8/2); memcpy(radar->h.name, &uf_ma[14], 8); if (little_endian()) swap2(&uf_ma[14], 8/2); /* All components of lat/lon are the same sign. If not, then * what ever wrote the UF was in error. A simple RSL program * can repair the damage, however, not here. */ ray->h.lat = uf_ma[18] + uf_ma[19]/60.0 + uf_ma[20]/64.0/3600; ray->h.lon = uf_ma[21] + uf_ma[22]/60.0 + uf_ma[23]/64.0/3600; ray->h.alt = uf_ma[24]; ray->h.year = uf_ma[25]; if (ray->h.year < 1900) { ray->h.year += 1900; if (ray->h.year < 1980) ray->h.year += 100; /* Year >= 2000. */ } ray->h.month = uf_ma[26]; ray->h.day = uf_ma[27]; ray->h.hour = uf_ma[28]; ray->h.minute = uf_ma[29]; ray->h.sec = uf_ma[30]; ray->h.azimuth = uf_ma[32] / 64.0; /* If Local Use Header is present and contains azimuth, use that * azimuth for VR and SW. This is for WSR-88D, which runs separate * scans for DZ and VR/SW at the lower elevations, which means DZ * VR/SW and have different azimuths in the "same" ray. */ len_lu = uf_ma[4] - uf_ma[3]; if (len_lu == 2 && (ifield == VR_INDEX || ifield == SW_INDEX)) { if (strncmp((char *)uf_lu,"ZA",2) == 0 || strncmp((char *)uf_lu,"AZ",2) == 0) ray->h.azimuth = uf_lu[1] / 64.0; } if (ray->h.azimuth < 0.) ray->h.azimuth += 360.; /* make it 0 to 360. */ ray->h.elev = uf_ma[33] / 64.0; ray->h.elev_num = sweep->h.sweep_num; ray->h.fix_angle = sweep->h.elev = uf_ma[35] / 64.0; ray->h.azim_rate = uf_ma[36] / 64.0; ray->h.sweep_rate = ray->h.azim_rate * (60.0/360.0); missing_data = uf_ma[44]; if (pulled_time_from_first_ray == 0) { radar->h.height = uf_ma[24]; radar->h.latd = uf_ma[18]; radar->h.latm = uf_ma[19]; radar->h.lats = uf_ma[20] / 64.0; radar->h.lond = uf_ma[21]; radar->h.lonm = uf_ma[22]; radar->h.lons = uf_ma[23] / 64.0; radar->h.year = ray->h.year; radar->h.month = ray->h.month; radar->h.day = ray->h.day; radar->h.hour = ray->h.hour; radar->h.minute = ray->h.minute; radar->h.sec = ray->h.sec; strcpy(radar->h.radar_type, "uf"); pulled_time_from_first_ray = 1; } /* * ---- End of MANDATORY HEADER BLOCK. */ /* ---- Optional header used for MCTEX files. */ /* If this is a MCTEX file, the first 4 words following the mandatory header contain the string 'MCTEX'. */ memcpy(proj_name, (short *)(uf + uf_ma[2] - 1), 8); if (little_endian()) swap2(proj_name, 4); /* ---- Local Use Header (if present) was checked during Mandatory * Header processing above. */ /* ---- Begining of FIELD HEADER. */ uf_fh = uf+current_fh_index - 1; scale_factor = uf_fh[1]; ray->h.range_bin1 = uf_fh[2] * 1000.0 + uf_fh[3]; ray->h.gate_size = uf_fh[4]; ray->h.nbins = uf_fh[5]; ray->h.pulse_width = uf_fh[6]/(RSL_SPEED_OF_LIGHT/1.0e6); if (strncmp((char *)proj_name, "MCTEX", 5) == 0) /* MCTEX? */ { /* The beamwidth values are not correct in Mctex UF files. */ ray->h.beam_width = 1.0; sweep->h.beam_width = ray->h.beam_width; sweep->h.horz_half_bw = ray->h.beam_width/2.0; sweep->h.vert_half_bw = ray->h.beam_width/2.0; } else /* Not MCTEX */ { ray->h.beam_width = uf_fh[7] / 64.0; sweep->h.beam_width = uf_fh[7] / 64.0; sweep->h.horz_half_bw = uf_fh[7] / 128.0; /* DFF 4/4/95 */ sweep->h.vert_half_bw = uf_fh[8] / 128.0; /* DFF 4/4/95 */ } /* fprintf (stderr, "uf_fh[7] = %d, [8] = %d\n", (int)uf_fh[7], (int)uf_fh[8]); */ if((int)uf_fh[7] == -32768) { ray->h.beam_width = 1; sweep->h.beam_width = 1; sweep->h.horz_half_bw = .5; sweep->h.vert_half_bw = .5; } ray->h.frequency = uf_fh[9] / 64.0; ray->h.wavelength = uf_fh[11] / 64.0 / 100.0; /* cm to m. */ ray->h.pulse_count = uf_fh[12]; if (ifield == DZ_INDEX || ifield == ZT_INDEX) { radar->v[ifield]->h.calibr_const = uf_fh[16] / 100.0; /* uf value scaled by 100 */ } else { radar->v[ifield]->h.calibr_const = 0.0; } if (uf_fh[17] == (short)UF_NO_DATA) x = 0; else x = uf_fh[17] / 1000000.0; /* PRT in seconds. */ if (x != 0) { ray->h.prf = 1/x; ray->h.unam_rng = RSL_SPEED_OF_LIGHT / (2.0 * ray->h.prf * 1000.0); } else { ray->h.prf = 0.0; ray->h.unam_rng = 0.0; } if (VR_INDEX == ifield || VE_INDEX == ifield) { ray->h.nyq_vel = uf_fh[19] / scale_factor; } /* ---- End of FIELD HEADER. */ ray->h.f = f; ray->h.invf = invf; /* ---- Begining of FIELD DATA. */ uf_data = uf+uf_fh[0] - 1; len_data = ray->h.nbins; /* Known because of RSL_new_ray. */ for (m=0; mrange[m] = invf(BADVAL); /* BADVAL */ else { if(uf_data[m] == missing_data) ray->range[m] = invf(NOECHO); /* NOECHO */ else ray->range[m] = invf((float)uf_data[m]/scale_factor); } } } } return UF_MORE; } /*********************************************************************/ /* */ /* swap_uf_buffer */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* October 4, 1994 */ /*********************************************************************/ void swap_uf_buffer(UF_buffer uf) { short *addr_end; addr_end = uf + sizeof(UF_buffer)/sizeof(short); while (uf < addr_end) swap_2_bytes(uf++); } enum UF_type {NOT_UF, TRUE_UF, TWO_BYTE_UF, FOUR_BYTE_UF}; /*********************************************************************/ /* */ /* RSL_uf_to_radar_fp */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* September 22, 1995 */ /*********************************************************************/ Radar *RSL_uf_to_radar_fp(FILE *fp) { union { char buf[6]; short sword; int word; } magic; Radar *radar; int nbytes; short sbytes; UF_buffer uf; enum UF_type uf_type; #define NEW_BUFSIZ 16384 radar = NULL; /* setvbuf(fp,NULL,_IOFBF,(size_t)NEW_BUFSIZ); * Faster i/o? */ if (fread(magic.buf, sizeof(char), 6, fp) <= 0) return NULL; /* * Check for fortran record length delimeters, NCAR kludge. */ if (strncmp("UF", magic.buf, 2) == 0) uf_type = TRUE_UF; else if (strncmp("UF", &magic.buf[2], 2) == 0) uf_type = TWO_BYTE_UF; else if (strncmp("UF", &magic.buf[4], 2) == 0) uf_type = FOUR_BYTE_UF; else uf_type = NOT_UF; switch (uf_type) { case FOUR_BYTE_UF: if (radar_verbose_flag) fprintf(stderr,"UF file with 4 byte FORTRAN record delimeters.\n"); /* Handle first record specially, since we needed magic information. */ nbytes = magic.word; if (little_endian()) swap_4_bytes(&nbytes); memcpy(uf, &magic.buf[4], 2); (void)fread(&uf[1], sizeof(char), nbytes-2, fp); if (little_endian()) swap_uf_buffer(uf); (void)fread(&nbytes, sizeof(int), 1, fp); if (uf_into_radar(uf, &radar) == UF_DONE) break; /* Now the rest of the file. */ while(fread(&nbytes, sizeof(int), 1, fp) > 0) { if (little_endian()) swap_4_bytes(&nbytes); (void)fread(uf, sizeof(char), nbytes, fp); if (little_endian()) swap_uf_buffer(uf); (void)fread(&nbytes, sizeof(int), 1, fp); if (uf_into_radar(uf, &radar) == UF_DONE) break; } break; case TWO_BYTE_UF: if (radar_verbose_flag) fprintf(stderr,"UF file with 2 byte FORTRAN record delimeters.\n"); /* Handle first record specially, since we needed magic information. */ sbytes = magic.sword; if (little_endian()) swap_2_bytes(&sbytes); memcpy(uf, &magic.buf[2], 4); (void)fread(&uf[2], sizeof(char), sbytes-4, fp); if (little_endian()) swap_uf_buffer(uf); (void)fread(&sbytes, sizeof(short), 1, fp); uf_into_radar(uf, &radar); /* Now the rest of the file. */ while(fread(&sbytes, sizeof(short), 1, fp) > 0) { if (little_endian()) swap_2_bytes(&sbytes); (void)fread(uf, sizeof(char), sbytes, fp); if (little_endian()) swap_uf_buffer(uf); (void)fread(&sbytes, sizeof(short), 1, fp); if (uf_into_radar(uf, &radar) == UF_DONE) break; } break; case TRUE_UF: if (radar_verbose_flag) fprintf(stderr,"UF file with no FORTRAN record delimeters. Good.\n"); /* Handle first record specially, since we needed magic information. */ memcpy(&sbytes, &magic.buf[2], 2); /* Record length is in word #2. */ if (little_endian()) swap_2_bytes(&sbytes); /* # of 2 byte words. */ memcpy(uf, &magic.buf[0], 6); (void)fread(&uf[3], sizeof(short), sbytes-3, fp); if (little_endian()) swap_uf_buffer(uf); uf_into_radar(uf, &radar); /* Now the rest of the file. */ while(fread(uf, sizeof(short), 2, fp) > 0) { memcpy(&sbytes, &uf[1], 2); /* Record length is in word #2. */ if (little_endian()) swap_2_bytes(&sbytes); (void)fread(&uf[2], sizeof(short), sbytes-2, fp); /* Have words 1,2. */ if (little_endian()) swap_uf_buffer(uf); if (uf_into_radar(uf, &radar) == UF_DONE) break; } break; case NOT_UF: return NULL; break; } radar = reset_nsweeps_in_all_volumes(radar); radar = RSL_prune_radar(radar); return radar; } /*********************************************************************/ /* */ /* RSL_uf_to_radar */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* September 22, 1995 */ /*********************************************************************/ Radar *RSL_uf_to_radar(char *infile) { /* * This routine ingests a UF file and fills the Radar structure. * This routine allocates space via the system routine malloc. * * If *infile is NULL, read from stdin. */ FILE *fp; Radar *radar; radar = NULL; if (infile == NULL) { int save_fd; save_fd = dup(0); fp = fdopen(save_fd, "r"); } else if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return radar; } fp = uncompress_pipe(fp); /* Transparently gunzip. */ radar = RSL_uf_to_radar_fp(fp); rsl_pclose(fp); return radar; } rsl-v1.43/mkinstalldirs0000644000102200007640000000132507022643702012152 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1 1999/12/06 05:21:06 merritt 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 rsl-v1.43/ray_indexes.c0000644000102200007640000001737707634132711012045 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Creates an array that is located in each sweep structure that is * a hash for quick azimuth angle lookups. These routines in concert * with rewrites of the 'RSL_get_value...' routines dramatically speed * up the RSL. * * The following routines are affected by this change. Just so you don't * think I'm absentminded, I list what might be affected and illustrate that * they're not. * * Routine Affected? * --------------- ------------ * RSL_copy_sweep No. * RSL_clear_sweep No. * RSL_read_radar No. * RSL_write_radar No. * RSL_uf_to_radar No. * RSL_nsig_to_radar No. * RSL_toga_to_radar No. * RSL_lassen_to_radar No. * RSL_new_sweep Yes. * RSL_get_value_from_ray Yes. * RSL_get... No. * * By: John Merritt * Space Applications Corporation * October 10, 1995 * */ #include #include #include #include "rsl.h" extern int radar_verbose_flag; /*********************************************************************/ /* */ /* set_high_and_low_pointers */ /* */ /* By Dennis Flanigan */ /* 5/2/95 */ /*********************************************************************/ static void set_high_and_low_pointers(Hash_table *table) { /* This function modifies its argument. */ Azimuth_hash *last,*current,*ray_prev_ind; Azimuth_hash *one,*two,*three,*four,*very_first,*very_last; int not_sorted_flag; int i; /* Set ray_high,ray_low pointers in hash data structures. */ if (table == NULL) return; very_first = NULL; very_last = NULL; last = NULL; current = NULL; ray_prev_ind = NULL; for(i = 0; i < table->nindexes;i++) { if(table->indexes[i] != NULL) { if(ray_prev_ind != NULL) { /* Connect last ray in last index to first ray in * this index. */ ray_prev_ind->ray_high = table->indexes[i]; table->indexes[i]->ray_low = ray_prev_ind; } /* Connect all entries in this indexes. Don't worry * about ray angle order right now. */ current = table->indexes[i]; while(current->next) { last = current; current = current->next; last->ray_high = current; current->ray_low = last; } /* Set ray_high and ray_low so that entries are "sorted" */ not_sorted_flag = 1; /* TRUE */ while(not_sorted_flag) { current = table->indexes[i]; not_sorted_flag = 0; /* FALSE */ while(current->next) { /* last = current; */ current = current->next; if(current->ray_low != NULL) { /* Someday want to test ray_angle */ if(current->ray_low->ray->h.azimuth > current->ray->h.azimuth) { /* Need to switch the ray_high and ray_low * pointers so that order is one three two four. */ not_sorted_flag = 1; /* TRUE */ one = current->ray_low->ray_low; two = current->ray_low; three = current; four = current->ray_high; if(one != NULL) one->ray_high = three; two->ray_low = three; two->ray_high = four; three->ray_low = one; three->ray_high = two; if(four != NULL) four->ray_low = two; } } } } /* Save highest ray angle entry in index so that it may * be connected to first entry of next index. The * very_last pointer will be used to set very_first * pointer. */ current = table->indexes[i]; while(current->ray_high) current = current->ray_high; ray_prev_ind = current; very_last = current; /* If this is first non-NULL hash index, save lowest * ray angle. */ if(very_first == NULL) { current = table->indexes[i]; while(current->ray_low) current = current->ray_low; very_first = current; } } } /* Tie the first and last azimuth_hash's together. * (Future If PPI_SWEEP statement....) */ very_first->ray_low = very_last; very_last->ray_high = very_first; } static Azimuth_hash *hash_add_node(Azimuth_hash *node, void *ray) { Azimuth_hash *new_node; new_node = (Azimuth_hash *)calloc(1, sizeof(Azimuth_hash)); if (new_node == NULL) perror("hash_add_node"); else { new_node->ray = ray; new_node->next = node; } return new_node; } Hash_table *construct_sweep_hash_table(Sweep *s) { Hash_table *hash_table; int i, iazim; Ray *ray; float res; if (s == NULL) return NULL; hash_table = (Hash_table *) calloc(1, sizeof(Hash_table)); hash_table->nindexes = s->h.nrays; if (hash_table->nindexes < 0) { fprintf(stderr, "Unable to construct sweep hash table because nrays = %d\n", s->h.nrays); fprintf(stderr, "FATAL error... unable to continue.\n"); exit(-1); } res = 360.0 / hash_table->nindexes; /* Check that this makes sense with beam width. */ if ((res > 2*s->h.beam_width) && (s->h.beam_width != 0)) { /* Problem. Too few rays so force a * reasonable hash table size */ hash_table->nindexes = 360.0 / s->h.beam_width; res = s->h.beam_width; } hash_table->indexes = (Azimuth_hash **)calloc(hash_table->nindexes, sizeof(Azimuth_hash *)); if (hash_table->indexes == NULL) { if (radar_verbose_flag) perror("construct_sweep_hash_table"); return hash_table; } for (i=0; ih.nrays; i++) { ray = s->ray[i]; if (ray == NULL) continue; iazim = (int)(ray->h.azimuth/res + res/2.0); /* Centered on bin. */ if (iazim >= hash_table->nindexes) iazim -= hash_table->nindexes ; /* fprintf(stderr,"ray# %d, azim %f, iazim %d\n", ray->h.ray_num, ray->h.azimuth, iazim); */ if (iazim > hash_table->nindexes || iazim < 0) { if (radar_verbose_flag){ fprintf(stderr,"ERROR: "); fprintf(stderr,"ray# %d, azim %f, iazim %d, nrays %d, nindexes %d\n", ray->h.ray_num, ray->h.azimuth, iazim, s->h.nrays, hash_table->nindexes); } } else hash_table->indexes[iazim] = hash_add_node(hash_table->indexes[iazim], ray); } set_high_and_low_pointers(hash_table); return hash_table; } rsl-v1.43/dorade_to_radar.c0000644000102200007640000004334011565520526012634 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996-1999 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #define USE_RSL_VARS #include "rsl.h" #include "dorade.h" extern int radar_verbose_flag; /********************************************************************/ /* */ /* find_rsl_field_index */ /* */ /********************************************************************/ int find_rsl_field_index(char *dorade_field_name) { /* * Dorade: VE, DM, SW, DBZ, ZDR, PHI, RHO, LDR, DX, CH, AH, CV, AV * RSL: VR, DM, SW, DZ, ZD, PH, RH, LR, *DX, *CH, *AH, *CV, *AV. */ if (strncasecmp(dorade_field_name, "ve", 2) == 0) return VR_INDEX; if (strncasecmp(dorade_field_name, "vr", 2) == 0) return VR_INDEX; if (strncasecmp(dorade_field_name, "dm", 2) == 0) return DM_INDEX; if (strncasecmp(dorade_field_name, "sw", 2) == 0) return SW_INDEX; if (strncasecmp(dorade_field_name, "dbz", 3) == 0) return DZ_INDEX; if (strncasecmp(dorade_field_name, "zdr", 3) == 0) return ZD_INDEX; if (strncasecmp(dorade_field_name, "phi", 3) == 0) return PH_INDEX; if (strncasecmp(dorade_field_name, "rho", 3) == 0) return RH_INDEX; if (strncasecmp(dorade_field_name, "ldr", 3) == 0) return LR_INDEX; if (strncasecmp(dorade_field_name, "dx", 2) == 0) return DX_INDEX; if (strncasecmp(dorade_field_name, "ch", 2) == 0) return CH_INDEX; if (strncasecmp(dorade_field_name, "ah", 2) == 0) return AH_INDEX; if (strncasecmp(dorade_field_name, "cv", 2) == 0) return CV_INDEX; if (strncasecmp(dorade_field_name, "av", 2) == 0) return AV_INDEX; if (strncasecmp(dorade_field_name, "vs", 2) == 0) return VS_INDEX; if (strncasecmp(dorade_field_name, "vl", 2) == 0) return VL_INDEX; if (strncasecmp(dorade_field_name, "vg", 2) == 0) return VG_INDEX; if (strncasecmp(dorade_field_name, "vt", 2) == 0) return VT_INDEX; if (strncasecmp(dorade_field_name, "ncp", 2) == 0) return NP_INDEX; return -1; } void prt_skipped_field_msg(char *dorade_field_name) { char prtname[9]; int i, already_printed; #define MAXFIELDS 20 static int nskipped = 0; static char skipped_list[MAXFIELDS][9]; /* Make sure name is a properly formed string. */ strncpy(prtname, dorade_field_name, 8); prtname[8] = '\0'; /* We don't want to repeat messages for the same field, so keep a list of * fields already printed. */ already_printed = 0; i = 0; while (!already_printed && i < nskipped) { if (strncmp(prtname, skipped_list[i], 2) == 0) already_printed = 1; i++; } if (!already_printed) { fprintf(stderr, "Unknown DORADE parameter type <%s> -- skipping.\n", prtname); strcpy(skipped_list[nskipped], prtname); nskipped++; } } /* For date conversion routines. */ static int daytab[2][13] = { {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} }; /*************************************************************/ /* */ /* julian */ /* */ /*************************************************************/ static int julian(int year, int mo, int day) { /* Converts a calendar date (month, day, year) to a Julian date. Returns: Julian day. */ int leap; leap = (year%4 == 0 && year%100 != 0) || year%400 == 0; return(day + daytab[leap][mo-1]); } /*************************************************************/ /* */ /* ymd */ /* */ /*************************************************************/ static void ymd(int jday, int year, int *mm, int *dd) { /* Input: jday, yyyy */ /* Output: mm, dd */ /* Copied from hdf_to_radar.c, written by Mike Kolander. */ int leap; int i; leap = (year%4 == 0 && year%100 != 0) || year%400 == 0; for (i=0; daytab[leap][i]nsensors, sizeof(Sensor_desc *)); for (i=0; insensors; i++) { sd[i] = dorade_read_sensor(fp); } /* P R I N T */ if (radar_verbose_flag) { for (i=0; insensors; i++) { fprintf(stderr, "============ S E N S O R # %d =====================\n", i); dorade_print_sensor(sd[i]); } } /* R E A D sweeps. */ if (vd->nsensors > 1) { fprintf(stderr, "RSL_dorade_to_radar: Unable to process for more than 1 sensor.\n"); fprintf(stderr, "RSL_dorade_to_radar: Number of sensors is %d\n", vd->nsensors); return NULL; } /* Use sensor 0 for vitals. */ rd = sd[0]->radar_desc; range_bin1 = sd[0]->cell_range_vector->range_cell[0]; gate_size = sd[0]->cell_range_vector->range_cell[1] - range_bin1; radar = RSL_new_radar(MAX_RADAR_VOLUMES); radar->h.month = vd->month; radar->h.day = vd->day; radar->h.year = vd->year; radar->h.hour = vd->hour; radar->h.minute = vd->minute; radar->h.sec = vd->second; sprintf(radar->h.radar_type, "dorade"); radar->h.number = 0; strncpy(radar->h.name, vd->flight_num, sizeof(radar->h.name)); strncpy(radar->h.radar_name, rd->radar_name, sizeof(radar->h.radar_name)); strncpy(radar->h.project, vd->project_name, sizeof(radar->h.project)); sprintf(radar->h.city, "Unknown"); strncpy(radar->h.state, "UKN", 3); sprintf(radar->h.country, "Unknown"); /* Convert lat to d:m:s */ degree = (int)rd->latitude; minute = (int)((rd->latitude - degree) * 60); second = (rd->latitude - degree - minute/60.0) * 3600.0; radar->h.latd = degree; radar->h.latm = minute; radar->h.lats = second; /* Convert lat to d:m:s */ degree = (int)rd->longitude; minute = (int)((rd->longitude - degree) * 60); second = (rd->longitude - degree - minute/60.0) * 3600.0; radar->h.lond = degree; radar->h.lonm = minute; radar->h.lons = second; radar->h.height = rd->altitude * 1000.0; radar->h.spulse = 0; /* FIXME */ radar->h.lpulse = 0; /* FIXME */ year = vd->year; month = vd->month; day = vd->day; jday_vol = julian(year, month, day); /* TODO: Get any threshold values present in parameter descriptors. Note: The parameter descriptor contains an 8-character string which may contain the, "Name of parameter upon which this parameter is thresholded". According to documentation, if there is no thresholding parameter, the string will be "NONE". In practice, this string has occasionally been seen to contain only spaces for this condition. The corresponding missing-data-flag for threshold may also vary, the nominal value being -999, but has also been -32768. Pseudo code: nparam = rd->nparam_desc; [<--useable code, i.e., not pseudo] create string array for threshold parameter names, size nparams. for each param: strcpy thresh param name from param desc to threshold param array. if string is all blanks, replace with 'NONE'. endfor */ /* Begin volume code. */ /* We don't know how many sweeps per volume exist, until we read * the file. So allocate a large number of pointers, hope we don't * exceed it, and adjust the pointer array at the end. This is * efficient because we'll be manipulating pointers to the sweeps and * not the sweeps themselves. */ if (radar_verbose_flag) fprintf(stderr, "Number of parameters: %d\n", rd->nparam_desc); /* All the parameters are together, however, their order within * the ray is not guarenteed. For instance, VE could appear after * DM. For this we'll keep a list of parameter names and perform * a (linear) search. The result will be an index into the RSL * volume array (radar->v[i]). It is likely that the order will be * consistant within a file, therefore, we'll keep track of the index of * our previous parameter type and begin the search from there; the next * index should be a match. * * The dorade parameter names and the rsl mapping is: * * Dorade: VE, DM, SW, DBZ, ZDR, PHI, RHO, LDR, DX, CH, AH, CV, AV * RSL: VR, DM, SW, DZ, ZD, PH, RH, LR, *DX, *CH, *AH, *CV, *AV. * * * means this is a new RSL name. */ #define DORADE_MAX_SWEEP 20 nsweep = 0; while((sr = dorade_read_sweep(fp, sd))) { for(iray = 0; iray < sr->nrays; iray++) { dray = sr->data_ray[iray]; /* Now, loop through the parameters and fill the rsl structures. */ for (iparam = 0; iparam < dray->nparam; iparam++) { pd = dray->parameter_data[iparam]; iv = find_rsl_field_index(pd->name); if (iv < 0) { prt_skipped_field_msg(pd->name); continue; } if (radar->v[iv] == NULL) { radar->v[iv] = RSL_new_volume(DORADE_MAX_SWEEP); /* Expandable */ } else if (nsweep >= radar->v[iv]->h.nsweeps) { /* Must expand the number of sweeps. */ /* Expand by another DORADE_MAX_SWEEP. */ if (radar_verbose_flag) { fprintf(stderr, "nsweeps (%d) exceeds radar->v[%d]->h.nsweeps (%d)." "\n", nsweep, iv, radar->v[iv]->h.nsweeps); fprintf(stderr, "Increasing it to %d sweeps\n", radar->v[iv]->h.nsweeps+DORADE_MAX_SWEEP); } new_volume = RSL_new_volume(radar->v[iv]->h.nsweeps+DORADE_MAX_SWEEP); /* Look in uf_to_radar.c for 'copy_sweeps_into_volume' */ new_volume = copy_sweeps_into_volume(new_volume, radar->v[iv]); radar->v[iv] = new_volume; } /* Assign f and invf switch (iv) . . . * Or just use RSL_f_list[iv] and RSL_invf_list[iv] as in sweep.h below. */ /* Allocate the ray and load the parameter data. */ if ((sweep = radar->v[iv]->sweep[nsweep]) == NULL) { sweep = radar->v[iv]->sweep[nsweep] = RSL_new_sweep(sr->s_info->nrays); sweep->h.sweep_num = sr->s_info->sweep_num; sweep->h.elev = sr->s_info->fixed_angle; sweep->h.beam_width = rd->horizontal_beam_width; sweep->h.vert_half_bw = rd->vertical_beam_width / 2.0; /* sweep->h.vert_half_bw = radar->v[iv]->sweep[nsweep]->h.beam_width / 2.0; */ sweep->h.horz_half_bw = rd->horizontal_beam_width / 2.0; sweep->h.f = RSL_f_list[iv]; sweep->h.invf = RSL_invf_list[iv]; } data_len = dray->data_len[iparam]; word_size = dray->word_size[iparam]; if (word_size != 2 && word_size != 4) { fprintf(stderr,"RSL_dorade_to_radar: dray->word_size[%d] = %d\n", iparam, dray->word_size[iparam]); fprintf(stderr,"Expected value is 2 or 4.\n"); return NULL; } nbins = data_len / word_size; if ((ray = sweep->ray[iray]) == NULL) { if (radar_verbose_flag) fprintf(stderr, "Allocating %d bins for ray %d\n", dray->data_len[iparam], iray); ray = sweep->ray[iray] = RSL_new_ray(nbins); } /* Load ray header. */ ray_info = dray->ray_info; jday = ray_info->jday; if (jday != jday_vol) { if (jday > 0 && jday < 367) { /* Recompute year month day */ if (jday < jday_vol) year++; ymd(jday, year, &month, &day); jday_vol = jday; } else { /* Invalid jday */ } } ray->h.year = year; ray->h.month = month; ray->h.day = day; ray->h.hour = ray_info->hour; ray->h.minute = ray_info->minute; ray->h.sec = ray_info->second + ray_info->msec / 1000.; ray->h.azimuth = ray_info->azimuth; ray->h.ray_num = iray + 1; ray->h.elev = ray_info->elevation; ray->h.elev_num = ray_info->sweep_num; ray->h.unam_rng = rd->unambiguous_range; ray->h.nyq_vel = rd->unambiguous_velocity; ray->h.azim_rate = ray_info->scan_rate; /* TODO ray->h.fix_angle = ; */ ray->h.range_bin1 = range_bin1; ray->h.gate_size = gate_size; platform_info = dray->platform_info; ray->h.pitch = platform_info->pitch; ray->h.roll = platform_info->roll; ray->h.heading = platform_info->heading; ray->h.pitch_rate = platform_info->pitch_rate; ray->h.heading_rate = platform_info->heading_rate; ray->h.lat = platform_info->latitude; ray->h.lon = platform_info->longitude; ray->h.alt = platform_info->altitude; ray->h.vel_east = platform_info->ew_speed; ray->h.vel_north = platform_info->ns_speed; ray->h.vel_up = platform_info->v_speed; /* TODO: Does DORADE have Doppler velocity res? A: No. ray->h.vel_res = N/A */ ray->h.beam_width = rd->horizontal_beam_width; /* TODO ray->h.frequency = @Radar Descriptor Get parm_desc.xmit_freq Find first set-bit, use frequency from corresponding index in rad_desc frequenies. ray->h.pulse_count = Is it number samples used? @Param desc. Probably not. * The following are DONE * ray->h.pulse_width = @Parameter Descriptor--not same--it's in meters-- we use micro-sec. They're using pulse length. pulse width = pulse length/c ray->h.wavelength = Can compute using Nyquist velocity and PRF or PRT: wl = 4*vmax/PRF or wl = 4*vmax*PRT ray->h.prf = Can compute if nothing else: prf = c/(2*Rmax) */ /* DORADE is actually using pulse length. Convert to pulse width. */ ray->h.pulse_width = (sd[0]->p_desc[iparam]->pulse_width/ RSL_SPEED_OF_LIGHT) * 1e6; prf = RSL_SPEED_OF_LIGHT/(2.*rd->unambiguous_range*1000.); ray->h.prf = prf; ray->h.wavelength = (4.*rd->unambiguous_velocity)/prf; ray->h.nbins = nbins; ray->h.f = RSL_f_list[iv]; ray->h.invf = RSL_invf_list[iv]; /* Copy the ray data into the RSL ray. */ /* .... fill here .... */ /* Assign pointer to data. * Get datum using word size and proper cast. * Convert and store in rsl ray->range. * Increment pointer to data based on word size. */ ptr2bytes = (short *) pd->data; ptr4bytes = (int *) pd->data; scale = sd[0]->p_desc[iparam]->scale_factor; offset = sd[0]->p_desc[iparam]->offset_factor; missing_data_flag = sd[0]->p_desc[iparam]->missing_data_flag; for (i=0; irange[i] = ray->h.invf(value); } if (iray == 0) { radar->v[iv]->h.nsweeps = nsweep + 1; radar->v[iv]->h.f = RSL_f_list[iv]; radar->v[iv]->h.invf = RSL_invf_list[iv]; } } } nsweep++; if (radar_verbose_flag) fprintf(stderr, "______NEW SWEEP__<%d>____\n", nsweep); /* Save for loading into volume structure. */ dorade_free_sweep(sr); } /* The following avoids a broken pipe message, since a VOLD at the end * is not read yet. */ while(fread(buf, sizeof(buf), 1, fp)) continue; /* Read til EOF */ rsl_pclose(fp); return radar; } rsl-v1.43/gts.c0000644000102200007640000000665006735755235010335 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 David B. Wolff Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "rsl.h" /* * Author: David B. Wolff * Date: 8/4/94 */ /************************************************************************** Ideally this would be done via a CAPPI, but could also be done via the PPI. Here we will send a volume to produce a CAPPI. From the CAPPI(Z) we compute the CAPPI(R) given a Z-R relationship. Then convert that to a cartesian array for imaging or later fiddling. NOTE: In keep with the object oriented approach to the library, the following approach is used to deal with the Z-R conversion: Four functions are produced: RSL_volume_Z_to_R, RSL_sweep_Z_to_R, RSL_ray_Z_to_r, z_to_r. RSL_volume_Z_to_R call RSL_sweep_Z_to_R for each sweep, RSL_sweep_Z_to_R calls RSL__ray_Z_to_R for each ray, RSL__ray_Z_to_R calls z_to_r for each range bin. ***************************************************************************/ Volume *RSL_volume_z_to_r(Volume *z_volume, float k, float a); Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a); Ray *RSL_ray_z_to_r(Ray *z_ray, float k, float a); float RSL_z_to_r(float z, float k, float a); Volume *RSL_volume_z_to_r(Volume *z_volume, float k, float a) { Volume *r_volume; int i; if(z_volume == NULL) return NULL; r_volume = RSL_new_volume(z_volume->h.nsweeps); r_volume->h = z_volume->h; for(i=0; ih.nsweeps; i++) { r_volume->sweep[i] = RSL_sweep_z_to_r(z_volume->sweep[i], k, a); } return r_volume; } Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a) { Sweep *r_sweep; int i; if(z_sweep == NULL) return NULL; r_sweep = RSL_new_sweep(z_sweep->h.nrays); r_sweep->h = z_sweep->h; for(i=0; ih.nrays; i++) { r_sweep->ray[i] = RSL_ray_z_to_r(z_sweep->ray[i], k, a); } return r_sweep; } Ray *RSL_ray_z_to_r(Ray *z_ray, float k, float a) { Ray *r_ray; int i; Range (*invf)(float x); float (*f)(Range x); if (z_ray == NULL) return NULL; r_ray = RSL_new_ray(z_ray->h.nbins); r_ray->h = z_ray->h; f = r_ray->h.f; invf = r_ray->h.invf; for(i=0; ih.nbins; i++) { r_ray->range[i] = invf(RSL_z_to_r( f(z_ray->range[i]), k, a)); } return r_ray; } #include float RSL_z_to_r(float dbz, float k, float a) { float dbr, dbk, r; if (dbz >= NOECHO) return dbz; /* Be careful, NOECHO is the smallest, so far, of the reserved numbers. */ dbk = (float)10*log10((double)k); dbr = 1./a*(dbz- dbk); r = (float)pow((double)10., (double)(dbr/10.) ); /* fprintf(stderr,"dbz=%.1f; \tdbr=%.1f \tRate= %.3f\n",dbz,dbr,r); */ return r; } rsl-v1.43/cappi.c0000644000102200007640000001371106600002377010607 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1995 Dennis F. Flanigan Jr. of Applied Research Corporation, Landover, Maryland, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* File: cappi.c * * 1/9/95 DFF * Version 0.29 updates */ #include #include #include #include "rsl.h" extern int radar_verbose_flag; /*********************************************************************/ /* */ /* RSL_get_value_from_cappi */ /* */ /*********************************************************************/ float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm) { return RSL_get_value_from_sweep(cappi->sweep, azm, rng); } /*********************************************************************/ /* */ /* RSL_new_cappi */ /* RSL_free_cappi */ /* */ /* Dennis Flanigan */ /* Mods by John Merritt 6/14/95 */ /*********************************************************************/ Cappi *RSL_new_cappi(Sweep *sweep, float height) { /* Modeled after a sweep structure. */ int a; Cappi *c; float grange; Ray *ray; int num_bin; float start_bin, size_bin; if((c = (Cappi *)calloc(1, sizeof(Cappi))) == NULL) { fprintf(stderr,"RSL_new_cappi: Calloc failed for Cappi data structure.\n"); return(NULL); } c->height = height; ray = RSL_get_first_ray_of_sweep(sweep); num_bin = ray->h.nbins; start_bin = ray->h.range_bin1/1000.0; size_bin = ray->h.gate_size/1000.0; /* Allocate space for elev angle,range array */ if((c->loc =(Er_loc *)calloc(num_bin,sizeof(Er_loc))) == NULL) { fprintf(stderr,"RSL_new_cappi: Calloc failed for er_loc array. \n"); free(c); return(NULL); } /* Calculate elevation angle verse range array */ for(a=0;aloc[a].srange,&c->loc[a].elev); } /* Allocate Space for the data */ c->sweep = RSL_copy_sweep(sweep); RSL_clear_sweep(c->sweep); /* This maintains header info. */ return c; } void RSL_free_cappi(Cappi *c) { if (c == NULL) return; RSL_free_sweep(c->sweep); free(c->loc); free(c); return; } /*********************************************************************/ /* */ /* RSL_cappi_at_h */ /* */ /* DFF 10/28/94 */ /* Modified by John Merritt 6/14/95 */ /*********************************************************************/ Cappi *RSL_cappi_at_h(Volume *v, float height, float max_range) /* * h and max_range in KM. */ { int n; Cappi *c; Sweep *sweep; if (v == NULL) return NULL; sweep = RSL_get_first_sweep_of_volume(v); /* 1st non-NULL sweep */ if((c = RSL_new_cappi(sweep, height)) == NULL) { fprintf(stderr,"RSL_cappi_at_h: Vnew_cappi failed\n"); return (NULL); } if((n = RSL_fill_cappi(v,c,0)) < 0) { fprintf(stderr,"RSL_cappi_at_h: Vfill_cappi_at_h failed: returned: %d\n",n); RSL_free_cappi(c); return(NULL); } return(c); } /*********************************************************************/ /* */ /* RSL_fill_cappi */ /* DFF 10/28/94 */ /*********************************************************************/ int RSL_fill_cappi(Volume *v, Cappi *cap, int method) { int a,b; float x; Ray *ray; Sweep *sweep; if (v == NULL) return(-1); if (cap == NULL) return(-1); /* get data from frist ray. */ ray = RSL_get_first_ray_of_volume(v); cap->month = ray->h.month; cap->day = ray->h.day; cap->year = ray->h.year; cap->hour = ray->h.hour; cap->minute = ray->h.minute; cap->sec = ray->h.sec; cap->field_type = 1; /** default setting -- PAK **/ cap->interp_method = method; /* ?? nearest neighbor */ ray = RSL_get_first_ray_of_sweep(cap->sweep); sweep = cap->sweep; for(a=0;a < sweep->h.nrays; a++) { ray = sweep->ray[a]; for(b=0; b < ray->h.nbins; b++) { x = RSL_get_value(v, cap->loc[b].elev, cap->sweep->ray[a]->h.azimuth, cap->loc[b].srange); ray->range[b] = ray->h.invf(x); } } return 1; } rsl-v1.43/README0000644000102200007640000002127211747602660010241 00000000000000v1.43 (Released 4/30/2012) This is the README file for the Radar Software Library (RSL). The author of RSL is John H. Merritt. RSL is maintained by Bart Kelley . What is RSL? This software manipulates NexRad, Lassen, UF, sigmet, kwajalein, toga, RAPIC, RADTEC, and mcgill radar formats. The radar data is used by the NASA TRMM Office to produce rain and climatological products. This software can ingest an entire input data file, representing it in RAM as it is on disk, manipulate the data and produce simple images. The intent of this library is to provide you with the tools to manipulate the data. With those tools you gain easy access to the different radar fields (reflectivity, velocity, spectral width, etc.) and ancilliary information (headers: time, beam width, angles, etc). And, with the tools you can code a scientific application that are radar format independent. COPYRIGHT NOTICE: NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996-1999 John H. Merritt SM&A Corp. Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. System Requirements: Linux, Mac OS X 10.5. Note: RSL is not supported on Microsoft Windows. Memory Requirements: 16 Mbytes of RAM just to ingest the data. Plus any for your application. If you expect to use the TSDIS toolkit component, which requires the HDF library, then you'll need at least 64 MB RAM! Software Environment. Additional libraries may be needed for building or linking, especially if you plan to use the TSDIS Toolkit and HDF. All the source for wsr88d, lassen, tg, nsig, mcgill, kwajalein, etc, are included in librsl.a and librsl.so. RSL works on big or little endian machines. HP, SUN, SGI are examples of big endian machines. Intel 386/486/Pentium is an example of a little endian machine. Additional software needed for executing RSL code is listed below. Note, RSL can be built without TSDIS toolkit and without HDF and without PKWARE support. pbmplus (Jef Poskanzer) Available via anon ftp to ftp.uu.net. This is used when making GIF, PPM, PBM, PGM, PICT, etc. images. Output via pipes. Required for executing your RSL application, if you plan to output images. This is not required when linking your application with the RSL. You only need ppmtogif and ppmtopict. gcc (GNU cc compiler) Normal cc or acc (sun) will work. Not required, but, you do need an ansi compilier. gzip (GNU compress) Available via anon ftp to ftp.uu.net. Unpacking. Input and output filters for auto un/compressing. make (GNU make) GNU make version 3.76. Standard make on SGI IRIX 6.2 doesn't work. It's a good idea to have GNU make (GNU tar too). PKWARE Data Version 1.11. Needed for the RAPIC ingest. Compression library. Call PKWARE, Inc. at 414-354-8699 or via http://www.pkware.com. Example mainlines are provided in the directory examples. INSTALLATION INSTRUCTIONS -------------------------- 1. Unpack the GNU compressed tar archive, example: tar -xzf rsl-v1.43.tgz -or- zcat rsl-v1.43.tgz | tar xf - 2. If you DON'T want LASSEN capability or you find that your system can not compile the lassen routines, you must edit acconfig.h and change '#define HAVE_LASSEN 1' to '#undef HAVE_LASSEN'. 3. configure make install -- Installs the RSL library, and then installs any_to_gif and any_to_uf. NOTE: You can specify the --prefix=/some/other/dir as an option to the configure command. This will install the librsl.so there and will install the examples there. Also, when resolving whether you have hdf, tsdistk, etc. the --prefix instructs configure to look in the prefix/lib directory for those libraries. The examples installed are any_to_gif and any_to_uf. BUILDING APPLICATIONS --------------------- Place the following line in your C code: #include "rsl.h" And link your application with: -lrsl -lm If you're on a SUN, you might have to specify: -lrsl -lnsl -lm If you want HDF and TSDIS toolkit libraries (the link line looks messy): setenv TSDISTK /usr/local/toolkit (or your top-level directory name) -lrsl -L/usr/local/hdf/lib -L/usr/local/toolkit/lib \ -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm Be sure to substitute the appropriate -L specification for the HDF and the TSDISTK library paths on your system. PROBLEMS -------- 1. If you don't have ppmtogif nor ppmtopict, you can still make images. The images will be PPM files. Create two commands called 'ppmtogif' and 'ppmtopict' that consists of the following two lines: ---- cut ---- #!/bin/csh -f cat ---- cut ---- Make these new commands executable and place them in a directory that is in your $PATH. No translation of PPM will happen and you can use 'xv', for instance, to view the files. 2. Linking on SUN running SunOS 5.4, you may need to add '-lnsl' to the link line to link your application. 'libnsl.{a,so}' is where the 'xdr' routines reside. 3. On our HP, gcc cannot build a shared library in one fell swoop. You must use the '-v' option. You'll get an error similiar to that shown in the following 'make' excerpt. ----- cut ----- gcc -v -shared -W1,-soname,librsl.so.1 -o librsl.so.1.17 rapic_to_radar.o rapic.tab.o lex.rapic.o rapic_routines.o radar.o volume.o image_gen.o cappi.o fraction.o read_write.o farea.o range.o radar_to_uf.o uf_to_radar.o lassen_to_radar.o wsr88d_to_radar.o carpi.o cube.o sort_rays.o toga_to_radar.o gts.o histogram.o ray_indexes.o anyformat_to_radar.o get_win.o endian.o mcgill_to_radar.o mcgill.o interp.o toga.o lassen.o wsr88d.o wsr88d_get_site.o gzip.o prune.o reverse.o fix_headers.o radar_to_hdf_1.o radar_to_hdf_2.o nsig_to_radar.o nsig.o nsig2_to_radar.o hdf_to_radar.o toolkit_memory_mgt.o africa_to_radar.o africa.o Reading specs from /opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1/specs gcc version 2.7.2.1 /opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1/ld -b -o librsl.so.1.17 -L/opt/hppd/lib/gcc/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1 -L/opt/hppd/lib/gcc rapic_to_radar.o rapic.tab.o lex.rapic.o rapic_routines.o radar.o volume.o image_gen.o cappi.o fraction.o read_write.o farea.o range.o radar_to_uf.o uf_to_radar.o lassen_to_radar.o wsr88d_to_radar.o carpi.o cube.o sort_rays.o toga_to_radar.o gts.o histogram.o ray_indexes.o anyformat_to_radar.o get_win.o endian.o mcgill_to_radar.o mcgill.o interp.o toga.o lassen.o wsr88d.o wsr88d_get_site.o gzip.o prune.o reverse.o fix_headers.o radar_to_hdf_1.o radar_to_hdf_2.o nsig_to_radar.o nsig.o nsig2_to_radar.o hdf_to_radar.o toolkit_memory_mgt.o africa_to_radar.o africa.o /bin/ld: DP-Relative Code in file /usr/tmp/cca11778.o - Shared Library must be Position-Independent collect2: ld returned 1 exit status make: *** [librsl.so.1.17] Error 1 ----- cut ----- Take the 'ld' command that is shown, the second of the two commands, and execute it directly at the Unix prompt. It will create the shared library. I don't get it, but, it works. My guess is that the 'gcc' command is doing something that is not shown. What is shown are the correct commands. Go figure. Contributions ------------- Dave Wolff - Most of the specifications for the functionality and feedback during debugging. Mike Kolander - The HDF, Mcgill and kwaj to radar routines. Alan McConnell - The toga_to_radar routine. Dennis Flanigan - New sorting code. Echo top height routines. Vertical structure code. Thuy Nguyen - Bug fixes and testing. Paul Kucera - Testing, bug reports and SIGMET code. Michael Whimpy - BMRC, Austrailia. Lassen modifications. Don Burrows - The edge_to_radar routine. QUESTIONS --------- Contact the TRMM Office help at gsfc-rsl-help@lists.nasa.gov rsl-v1.43/range.c0000644000102200007640000001514610663126723010621 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include "rsl.h" # define M_PI 3.14159265358979323846 # define M_PI_2 1.57079632679489661923 /* Earth radius in km. */ double Re = (6374.0*4.0/3.0); /********************************************************************/ /* */ /* RSL_set_earth_rad(double new_Re) */ /* */ /* By: Dennis Flanigan */ /* Applied Research Corporation */ /* August 26, 1994 */ /********************************************************************/ void RSL_set_earth_radius(double new_Re) { Re = new_Re; } /*********************************************************************/ /* */ /* void RSL_get_gr_slantr_h */ /* *gr - ground range in KM. */ /* *slantr - slant range in KM. */ /* *h - height in KM. */ /* */ /* By: John Merritt */ /* June 7, 1995 */ /*********************************************************************/ void RSL_get_gr_slantr_h(Ray *ray, int i, float *gr, float *slantr, float *h) { *gr = *slantr = *h = 0.0; if (ray == NULL) return; *slantr = i * ray->h.gate_size + ray->h.range_bin1; *slantr /= 1000; /* meters to km */ RSL_get_groundr_and_h(*slantr, ray->h.elev, gr, h); return; } /*********************************************************************/ /* */ /* RSL_get_groundr_and_h(sr, elev, &gr, &h) */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* July 23, 1994 */ /*********************************************************************/ void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h) { /* Input: * slant_r - slant range, along the beam, in km. * elev - elevation angle, in degrees. * * Output: * gr - Ground range in km. * h - Height of data point above earth, in km. */ double GR; double H; if (slant_r == 0.0) {*h = 0; *gr = 0; return;} elev += 90; H = sqrt( pow(Re,2.0) + pow(slant_r,2.0) - 2*Re*slant_r*cos(elev*M_PI/180.0)); if (H != 0.0) { GR = Re * acos( ( pow(Re,2.0) + pow(H,2.0) - pow(slant_r,2.0)) / (2 * Re * H)); } else { GR = slant_r; H = Re; } H -= Re; *h = H; *gr = GR; } /*********************************************************************/ /* */ /* RSL_get_slantr_and_elev(gr, h, &r, &e) */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* July 23, 1994 */ /* */ /*********************************************************************/ void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev) { /* Input: * gr - Ground range in km. * h - Height of data point above earth, in km. * * Output: * slant_r - slant range, along the beam, in km. * elev - elevation angle, in degrees. */ /* This equation lifted from Dennis Flanigan's rsph.c code. */ double slant_r_2; /* Slant range squared. */ double ELEV; double SLANTR; if (gr == 0) {*slant_r = 0; *elev = 0; return;} h += Re; slant_r_2 = pow(Re,2.0) + pow(h,2.0) - (2*Re*h*cos(gr/Re)); SLANTR = sqrt(slant_r_2); ELEV = acos( (pow(Re,2.0) + slant_r_2 - pow(h,2.0)) / (2*Re*(SLANTR))); ELEV *= 180.0/M_PI; ELEV -= 90.0; *slant_r = SLANTR; *elev = ELEV; } /*********************************************************************/ /* */ /* RSL_get_slantr_and_h(gr, elev, &sr, &h) */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* July 23, 1994 */ /* */ /*********************************************************************/ void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h) { /* Input: * gr - Ground range in km. * elev - elevation angle, in degrees. * * Output: * slant_r - slant range, along the beam, in km. * h - Height of data point above earth, in km. */ double ELEV; double SLANTR; double ALPHA; double BETA; double GAMMA; double A; if (gr == 0) {*slant_r = 0; *h = 0; return;} ELEV = elev*M_PI/180.0; ALPHA = ELEV + M_PI_2; /* Elev angle + 90 */ GAMMA = gr/Re; BETA = M_PI - (ALPHA + GAMMA); /* Angle made by Re+h and slant */ SLANTR = Re*(sin(GAMMA)/sin(BETA)); A = Re*sin(ALPHA)/sin(BETA); *h = (float) (A - Re); *slant_r = (float)SLANTR; } rsl-v1.43/wsr88d.c0000644000102200007640000007516311666263116010673 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* *------------------------------------------------------------ * v1.14 5/12/95 *------------------------------------------------------------ * Procedures: * wsr88d_open * wsr88d_close * wsr88d_read_file_header * wsr88d_read_tape_header * wsr88d_read_sweep * wsr88d_read_ray * wsr88d_perror * wsr88d_ray_to_float * * Functions: * wsr88d_get_nyquist * wsr88d_get_atmos_atten_factor * wsr88d_get_velocity_resolution * wsr88d_get_volume_coverage * wsr88d_get_elevation_angle * wsr88d_get_azimuth * wsr88d_get_range * wsr88d_get_data * wsr88d_get_time * wsr88d_get_vcp_info(int vcp_num,int el_num) * wsr88d_get_fix_angle(Wsr88d_ray *ray) * wsr88d_get_pulse_count(Wsr88d_ray *ray) * wsr88d_get_azimuth_rate(Wsr88d_ray *ray) * wsr88d_get_pulse_width(Wsr88d_ray *ray) * wsr88d_get_prt(Wsr88d_ray *ray) * wsr88d_get_prf(Wsr88d_ray *ray) * wsr88d_get_wavelength(Wsr88d_ray *ray) * wsr88d_get_frequency(Wsr88d_ray *ray) * * Misc. routines: (canidates for possible inclusion into the library) * print_head * print_packet_info * free_and_clear_sweep * clear_sweep * print_sweep_info * Cvt_date <- From Dan Austin * Cvt_time <- From Dan Austin * */ #include #include #include #include #include "wsr88d.h" static int little_endian(void) { union { unsigned char byte[4]; int val; } word; word.val = 0; word.byte[3] = 0x1; return word.val != 1; } static void swap_4_bytes(void *word) { unsigned char *byte; unsigned char temp; byte = word; temp = byte[0]; byte[0] = byte[3]; byte[3] = temp; temp = byte[1]; byte[1] = byte[2]; byte[2] = temp; } static void swap_2_bytes(void *word) { unsigned char *byte; unsigned char temp; byte = word; temp = byte[0]; byte[0] = byte[1]; byte[1] = temp; } /**********************************************************************/ /* D E B U G G I N G R O U T I N E S F O L L O W */ /**********************************************************************/ /************************************************ * Cvt_date- convert the date in days since 1/1/70 (Julian) to mm/dd/yy * parameters: * long int date_in - input julian date * returns: output date * calls from: Cvt_pckt_hdr * calls to: none ************************************************/ #include int Cvt_date(long int date_in) { int mm, dd, yy; time_t itime; struct tm *tm_time; itime = date_in - 1; itime *= 24*60*60; /* Seconds/day * days. */ tm_time = gmtime(&itime); mm = tm_time->tm_mon+1; dd = tm_time->tm_mday; yy = tm_time->tm_year; return 10000.0*yy+100.0*mm+dd; } /************************************************ * Cvt_time- converts 24 hr time in msecs after midnight to hhmmss * parameters: * long int time_in - input time in msecs after midnight * returns: double *time_out - output time * calls from: Cvt_pckt_hdr * calls to: none ************************************************/ float Cvt_time(long int time_in) { double t; int hh,mm; t = time_in; t /= 1000.0; hh = t/3600; t -= hh*3600; mm = t/60; t -= mm*60; return hh*10000 + mm*100 + (float) t; } /**********************************************************************/ /* */ /* done 2/28 print_head */ /* */ /**********************************************************************/ void print_head(Wsr88d_file_header h) { int i; fprintf(stderr,"Filename : "); for (i=0;i<9;i++) fprintf(stderr,"%c", h.title.filename[i]); printf("\n"); fprintf(stderr,"Extension: "); for (i=0;i<3;i++) fprintf(stderr,"%c", h.title.ext[i]); printf("\n"); fprintf(stderr,"Julian date: %d\n", Cvt_date(h.title.file_date)); fprintf(stderr," time: %f\n", Cvt_time(h.title.file_time)); } void print_packet_info(Wsr88d_packet *p) { fprintf(stderr,"%5hd %5hd %5hd %5hd %5hd %5hd %5hd %10.3f %6d\n", p->msg_type, p->id_seq, p->azm, p->ray_num, p->ray_status, p->elev, p->elev_num, Cvt_time((int)p->ray_time), Cvt_date((int)p->ray_date)); } /**********************************************************************/ /* End of debug routines. */ /**********************************************************************/ void free_and_clear_sweep(Wsr88d_sweep *s, int low, int high) { /* Frees and sets the ray pointers to NULL. * Assumes that rays pointers have been allocated. */ int i; for (i=low; iray[i] != NULL) { free(s->ray[i]); s->ray[i] = NULL; } } void clear_sweep(Wsr88d_sweep *s, int low, int high) { /* * Simply set all sweep pointers to NULL. */ int i; for (i=low; iray[i] = NULL; } void wsr88d_print_sweep_info(Wsr88d_sweep *s) { int i; fprintf(stderr,"Mtype ID azim ray# rstat elev elev# time date\n"); fprintf(stderr,"----- ----- ----- ----- ----- ----- ----- ---------- ------\n"); for (i=0; iray[i] != NULL) print_packet_info((Wsr88d_packet *) s->ray[i]); } } /**********************************************************************/ /* */ /* done 2/28 wsr88d_open */ /* */ /**********************************************************************/ Wsr88d_file *wsr88d_open(char *filename) { Wsr88d_file *wf = (Wsr88d_file *)malloc(sizeof(Wsr88d_file)); int save_fd; if ( strcmp(filename, "stdin") == 0 ) { save_fd = dup(0); wf->fptr = fdopen(save_fd,"r"); } else { wf->fptr = fopen(filename, "r"); } if (wf->fptr == NULL) return NULL; wf->fptr = uncompress_pipe(wf->fptr); #define NEW_BUFSIZ 16384 setvbuf(wf->fptr,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */ return wf; } /**********************************************************************/ /* */ /* done 2/28 wsr88d_perror */ /* */ /**********************************************************************/ int wsr88d_perror(char *message) { /* * I want to use a global 'wsr88d_errno' and * have this routine print an appropriate message. */ /* This is a simple model now. */ fprintf(stderr, "wsr88d_error: "); perror(message); return 0; } /**********************************************************************/ /* */ /* done 2/28 wsr88d_close */ /* */ /**********************************************************************/ int wsr88d_close(Wsr88d_file *wf) { int rc; rc = rsl_pclose(wf->fptr); free(wf); return rc; } /**********************************************************************/ /* */ /* wsr88d_swap_file_header */ /* */ /**********************************************************************/ void wsr88d_swap_file_header(Wsr88d_file_header *header) { swap_4_bytes(&header->title.file_date); swap_4_bytes(&header->title.file_time); } /**********************************************************************/ /* */ /* done 2/28 wsr88d_read_file_header */ /* */ /**********************************************************************/ int wsr88d_read_file_header(Wsr88d_file *wf, Wsr88d_file_header *wsr88d_file_header) { int n; n = fread(&wsr88d_file_header->title, sizeof(wsr88d_file_header->title), 1, wf->fptr); if (little_endian()) wsr88d_swap_file_header(wsr88d_file_header); return n; } /**********************************************************************/ /* */ /* done 8/18 wsr88d_read_tape_header */ /* */ /**********************************************************************/ int wsr88d_read_tape_header(char *first_file, Wsr88d_tape_header *wsr88d_tape_header) { FILE *fp; int n; char c; if ((fp = fopen(first_file, "r")) == NULL) { perror(first_file); return 0; } n = fread(wsr88d_tape_header, sizeof(Wsr88d_tape_header), 1, fp); if (n == 0) { fprintf(stderr, "WARNING: %s is smaller than 31616 bytes. It is not a tape header file.\n", first_file); } else { /* Try to read one more character. If we can, then this is not a * tape header file. I suppose that we could look for '.' as the * 9-th character and if it were there, then too this is not a tape * header file. */ if (fread(&c, sizeof(char), 1, fp) > 0) { fprintf(stderr, "WARNING: %s is larger than 31616 bytes. It is not a tape header file.\n", first_file); memset(wsr88d_tape_header, 0, sizeof(Wsr88d_tape_header)); n = 0; } else { /* Ok so far. Now check the first 8 bytes for "ARCHIVE2" */ if (strncmp(wsr88d_tape_header->archive2, "ARCHIVE2", 8) != 0) { fprintf(stderr, "WARNING: %s is 31616 bytes. However, the first 8 bytes are not 'ARCHIVE2'.\n", first_file); memset(wsr88d_tape_header, 0, sizeof(Wsr88d_tape_header)); n = 0; } } } fclose(fp); return n; } /**********************************************************************/ /* */ /* not done N/A wsr88d_read_header */ /* */ /**********************************************************************/ int wsr88d_read_header(Wsr88d_file *wf, Wsr88d_header *wsr88d_header) { fprintf(stderr,"Routine: wsr88d_read_header\n"); return 0; } /**********************************************************************/ /* */ /* done 3/2 wsr88d_read_sweep */ /* */ /**********************************************************************/ int wsr88d_read_sweep(Wsr88d_file *wf, Wsr88d_sweep *wsr88d_sweep) { int n; Wsr88d_ray wsr88d_ray; int nrec; int end_of_volume; int ray_num; /* One sweep is defined as staying at the same RDA elevation number. */ /* We can read the file and check for that, however, we will need to * buffer our input. The solution is to read the file and check the * radial status. If it is '2' then we have reached the END OF ELEVATION. * Here is a complete list of radial status codes: * 0 = Start of new elevation. * 1 = Intermediate radial. * 2 = End of elevation. * 3 = Beginning of volume scan. * 4 = End of volume scan. */ /* Algorithm steps: * 1. Skip packets until. Start of new elevation or * Beginning of Volume scan. STAT=0 or 3. * 2. Read until End of elevation. STAT=2 or 4. Skip message type != 1. */ nrec = 0; ray_num = 0; n = wsr88d_read_ray(wf, &wsr88d_ray); /* Step 1. */ while ((wsr88d_ray.msg_type & 15) != 1 && n > 0) { /* fprintf(stderr,"SKIPPING packet: type %d, radial status %d\n", wsr88d_ray.msg_type, wsr88d_ray.ray_status); */ n = wsr88d_read_ray(wf, &wsr88d_ray); } if (n <= 0) return n; /* Read failure. */ end_of_volume = 0; /* Step 2. */ while ( ! end_of_volume ) { if ((wsr88d_ray.msg_type & 15) != 1) { /* fprintf(stderr,"SKIPPING (amid a sweep) packet: type %d, " "radial status %d\n", wsr88d_ray.msg_type, wsr88d_ray.ray_status); */ } else { /* Load this ray into the sweep. */ ray_num = wsr88d_ray.ray_num; /* Double check against # records we've seen. */ /* It is possible that a reset occurs and we begin to overwrite * previously loaded rays. I've seen this occur, rarely, in the * WSR88D data. I must trust 'ray_num'. */ /* if (nrec+1 != ray_num) { fprintf(stderr, "Data says %d is ray_num, but, I've seen %d " "records.\n", ray_num, nrec+1); } */ if (wsr88d_sweep->ray[ray_num] == NULL) { wsr88d_sweep->ray[ray_num] = (Wsr88d_ray *) malloc (sizeof(Wsr88d_ray)); } memcpy(wsr88d_sweep->ray[ray_num], &wsr88d_ray, sizeof(Wsr88d_ray)); } n = wsr88d_read_ray(wf, &wsr88d_ray); if (n > 0) nrec++; end_of_volume = wsr88d_ray.ray_status == 2 || wsr88d_ray.ray_status == 4 || n <= 0; } /* Process the last packet of the input data. */ if ((wsr88d_ray.ray_status == 2 || wsr88d_ray.ray_status == 4) && (wsr88d_ray.msg_type & 15) == 1) { /* Load this ray into the sweep. */ ray_num = wsr88d_ray.ray_num; if (wsr88d_sweep->ray[ray_num] == NULL) { wsr88d_sweep->ray[ray_num] = (Wsr88d_ray *) malloc (sizeof(Wsr88d_ray)); } memcpy(wsr88d_sweep->ray[ray_num], &wsr88d_ray, sizeof(Wsr88d_ray)); } /* Just to be safe, clear all ray pointers left in this sweep to * the maximum MAX_RAYS_IN_SWEEP. This is required when the * wsr88d_sweep is reused and not cleared. */ free_and_clear_sweep(wsr88d_sweep, ray_num+1, MAX_RAYS_IN_SWEEP); /* fprintf(stderr,"Processed %d records for elevation number %d\n", nrec+1, wsr88d_ray.elev_num); wsr88d_print_sweep_info(wsr88d_sweep); */ return nrec; } /**********************************************************************/ /* */ /* wsr88d_swap_ray */ /* */ /**********************************************************************/ void wsr88d_swap_ray(Wsr88d_ray *wsr88d_ray) { short *half_word; half_word = (short *)wsr88d_ray; for (; half_word<(short *)&wsr88d_ray->msg_time; half_word++) swap_2_bytes(half_word); swap_4_bytes(&wsr88d_ray->msg_time); swap_2_bytes(&wsr88d_ray->num_seg); swap_2_bytes(&wsr88d_ray->seg_num); swap_4_bytes(&wsr88d_ray->ray_time); half_word = (short *) &wsr88d_ray->ray_date; for (; half_word<(short *)&wsr88d_ray->sys_cal; half_word++) swap_2_bytes(half_word); swap_4_bytes(&wsr88d_ray->sys_cal); half_word = (short *) &wsr88d_ray->refl_ptr; for (; half_word<(short *)&wsr88d_ray->data[0]; half_word++) swap_2_bytes(half_word); } /**********************************************************************/ /* */ /* done 2/28 wsr88d_read_ray */ /* */ /**********************************************************************/ int wsr88d_read_ray(Wsr88d_file *wf, Wsr88d_ray *wsr88d_ray) { int n; n = fread(wsr88d_ray, sizeof(Wsr88d_ray), 1, wf->fptr); /* if (n > 0) print_packet_info(wsr88d_ray); */ if (little_endian()) wsr88d_swap_ray(wsr88d_ray); return n; } /**********************************************************************/ /* */ /* not done N/A wsr88d_read_ray_header */ /* */ /**********************************************************************/ int wsr88d_read_ray_header(Wsr88d_file *wf, Wsr88d_ray_header *wsr88d_ray_header) { fprintf(stderr,"Stub routine: wsr88d_read_ray_header.\n"); return 0; } /**********************************************************************/ /* */ /* done 3/3 wsr88d_ray_to_float */ /* */ /**********************************************************************/ int wsr88d_ray_to_float(Wsr88d_ray *ray, int THE_DATA_WANTED, float v[], int *n) { /* * Input: *ray - WSR-88D packet * Output: THE_DATA_WANTED - Indicates which field to convert. Fields: * WSR88D_DZ, WSR88D_VR, WSR88D_SW * v[] - The output vector of float values. * n - Length of the output vector. 0 = no data. * * Returns n. * * No allocation of space for the output vector performed here. */ /* Code from Dan Austin (cvt_pckt_data.c) was the template for this. */ /* declarations */ int num_ref_gates,num_vel_gates,num_spec_gates; int refl_ptr, vel_ptr,spec_ptr,res_flag; int ival; int i; *n = 0; num_ref_gates = ray->num_refl; num_vel_gates = ray->num_dop; num_spec_gates = ray->num_dop; /* 'num_dop', this is not a typo. */ /* The data pointers are specified from the begining of the * 'Digital Radar Data (Message) Header'. Since we have a structure * that defines all the header variables and a member called 'data'. * we must subtract the length of the 'message header' from the data * pointer. Hopefully, the reflecivity pointer will be 0 meaning the * first element of the 'data' member; ray->data[0]; */ #define LENGTH_OF_MESSAGE 100 if (num_ref_gates > 0) refl_ptr = ray->refl_ptr - LENGTH_OF_MESSAGE; else refl_ptr = 0; vel_ptr = ray->vel_ptr - LENGTH_OF_MESSAGE; spec_ptr = ray->spc_ptr - LENGTH_OF_MESSAGE; res_flag = ray->vel_res; /* fprintf(stderr,"refl_ptr = %d #g = %d, ", refl_ptr, num_ref_gates); fprintf(stderr," vel_ptr = %d #g = %d, ", vel_ptr, num_vel_gates); fprintf(stderr,"spec_ptr = %d #g = %d, ", spec_ptr, num_spec_gates); fprintf(stderr,"res_flag = %d\n", res_flag); */ if (THE_DATA_WANTED == WSR88D_DZ) { /* do the reflectivity data (dbZ)*/ if (refl_ptr+num_ref_gates > 2300) fprintf(stderr, "WARNING: # refl index (%d) exceeds maximum (2300)\n", refl_ptr+num_ref_gates); else { for(i=0; idata[refl_ptr+i]; if(ival > 1) v[i] = (((ival-2.0)/2.0)-32.0); else if (ival == 1) v[i] = WSR88D_RFVAL; else /* ival = 0 */ v[i] = WSR88D_BADVAL; } *n = num_ref_gates; } } else if (THE_DATA_WANTED == WSR88D_VR) { /* do the velocity data (M/S) */ if (vel_ptr+num_vel_gates > 2300) fprintf(stderr, "WARNING: # vel index (%d) exceeds maximum (2300)\n", vel_ptr+num_vel_gates); else { for(i=0; idata[vel_ptr+i]; if(ival > 1) if (res_flag == 2) /* High resolution: 0.5 m/s */ v[i] = (((ival-2.0)/2.0)-63.5); else v[i] = ((ival-2.0)-127.0); else if (ival == 1) v[i] = WSR88D_RFVAL; else /* ival = 0 */ v[i] = WSR88D_BADVAL; } *n = num_vel_gates; } } else if (THE_DATA_WANTED == WSR88D_SW) { /* now do the spectrum width data (M/S)*/ if (spec_ptr+num_spec_gates > 2300) fprintf(stderr, "WARNING: # spec index (%d) exceeds maximum (2300)\n", spec_ptr+num_spec_gates); else { for(i=0;idata[spec_ptr+i]; if(ival > 1) v[i] = (((ival-2)/2.0)-63.5); else if (ival == 1) v[i] = WSR88D_RFVAL; else /* ival = 0 */ v[i] = WSR88D_BADVAL; } *n = num_spec_gates; } } return *n; } /**********************************************************************/ /* Functions that convert some message header values. */ /**********************************************************************/ /**********************************************************************/ /* */ /* done 3/3 float wsr88d_get_nyquist */ /* done 3/3 float wsr88d_get_atmos_atten_factor */ /* done 3/3 float wsr88d_get_velocity_resolution */ /* done 3/3 int wsr88d_get_volume_coverage */ /* done 3/3 float wsr88d_get_elevation_angle */ /* done 3/3 float wsr88d_get_azimuth */ /* done 3/3 float wsr88d_get_range */ /* done 3/3 void wsr88d_get_date */ /* done 3/3 void wsr88d_get_time */ /* done 5/20 int *wsr88d_get_vcp_info */ /* done 5/20 float wsr88d_get_fix_angle */ /* done 5/20 int wsr88d_get_pulse_count */ /* done 5/20 float wsr88d_get_azimuth_rate */ /* done 5/20 float wsr88d_get_pulse_width */ /* done 5/20 float wsr88d_get_prf */ /* done 5/20 float wsr88d_get_prt */ /* done 5/20 float wsr88d_get_wavelength */ /* done 5/20 float wsr88d_get_frequency */ /* */ /**********************************************************************/ float wsr88d_get_nyquist(Wsr88d_ray *ray) { return ray->nyq_vel/100.0; } float wsr88d_get_atmos_atten_factor(Wsr88d_ray *ray) { return ray->atm_att/1000.0; } float wsr88d_get_velocity_resolution(Wsr88d_ray *ray) { if (ray->vel_res == 2) return 0.5; return 0.0; } int wsr88d_get_volume_coverage(Wsr88d_ray *ray) { if (ray->vol_cpat == 11) return 11; if (ray->vol_cpat == 12) return 12; if (ray->vol_cpat == 21) return 21; if (ray->vol_cpat == 31) return 31; if (ray->vol_cpat == 32) return 32; if (ray->vol_cpat == 121) return 121; if (ray->vol_cpat == 211) return 211; if (ray->vol_cpat == 212) return 212; if (ray->vol_cpat == 221) return 221; return 0; } float wsr88d_get_elevation_angle(Wsr88d_ray *ray) { return ray->elev/8.0*(180.0/4096.0); } float wsr88d_get_azimuth(Wsr88d_ray *ray) { return ray->azm/8.0*(180.0/4096.0); } float wsr88d_get_range(Wsr88d_ray *ray) { return ray->unam_rng/10.0; } #include void wsr88d_get_date(Wsr88d_ray *ray, int *mm, int *dd, int *yy) { /* * mm (1-12) * dd (1-31) * yy (ex. 93) */ time_t itime; struct tm *tm_time; if (ray == NULL) { *mm = *dd = *yy = 0; return; } itime = ray->ray_date - 1; itime *= 24*60*60; /* Seconds/day * days. */ tm_time = gmtime(&itime); *mm = tm_time->tm_mon+1; *dd = tm_time->tm_mday; *yy = tm_time->tm_year; } void wsr88d_get_time(Wsr88d_ray *ray, int *hh, int *mm, int *ss, float *fsec) { /* * hh (0-23) * mm (0-59) * ss (0-59) * fsec (fraction of second) */ double t; if (ray == NULL) { *hh = *mm = *ss = *fsec = 0; return; } t = ray->ray_time; t /= 1000.0; *hh = t/3600; t -= *hh*3600; *mm = t/60; t -= *mm*60; *ss = (int)t; *fsec = t - *ss; } /* * Get_vcp_info - gets info about the volume coverage pattern for this scan * parameters: * int vcp_num - volume coverage pattern number * int el_num - elevation number w/in vcp * returns: int *vcp_info - ptr to array w/vcp info * calls from: Nexrad2uf * calls to: none */ /* this database contains volume coverage patterns & associated info: */ /* (0)= vcp # (1)=pulse width for vcp "Id$" */ /* line[1-n]: (n,0)= elev. # for vcp (n,1)= (fixed angle)*8*(4096/180) */ /* (n,2)= pulse count (n,3)= (azimuthal sweep rate)*8*(4096/45) */ static int vcp11[68] ={11,514,88,17,13600,88,0,14000,264,16,12664,264,0,14000,440,6,11736,608,6,24760,784,6,24760,952,10,12712,1128,10,12720,1368,0,18328,1584,0,18496,1824,0,18512,2184,0,18544,2552,0,18576,3040,0,18640,3552,0,18712}; static int vcp12[53]={12,514,91,15,15401,91,0,18204,164,15,15401,164,0,18204,237,15,15401,237,0,18204,328,3,19297,437,3,20393,564,3,20393,728,3,20393,928,3,20393,1165,0,20680,1456,0,20680,1820,0,21033,2276,0,20929,2840,0,20929,3550,0,20929}; static int vcp21[48]={21,514,88,28,8256,88,0,8272,264,28,8256,264,0,8272,440,8,7888,608,8,7888,784,8,8160,1096,12,8160,1800,0,10640,2656,0,10432,3552,0,10496}; static int vcp31[36]={31,516,88,63,3672,88,0,3688,272,63,3672,272,0,3688,456,63,3672,456,0,3688,640,0,3688,816,0,3688}; static int vcp32[32]={32,514,88,64,3616,88,0,3312,272,64,3616,272,0,3312,456,11,2960,640,11,2960,816,11,2960}; static int vcp121[62]={121,514,91,11,21336,91,0,21696,91,0,19952,91,0,15584,264,11,21336,264,0,21696,264,0,19952,264,0,15584,437,6,13985,437,0,19952,437,0,15584,610,6,15729,610,0,19952,610,0,15584,783,6,11872,783,0,21481,1092,6,14712,1802,0,21481,2658,0,21696,3550,0,21696}; static int vcp300[20]={300,514,88,28,8256,88,0,8272,440,8,8160,1800,0,10384}; int *wsr88d_get_vcp_info(int vcp_num,int el_num) { /* * This routine from Dan Austin. Program component of nex2uf. */ static int vcp_info[4]; int fix_angle; int pulse_cnt; int az_rate; int pulse_width; /* case statement to get vcp info */ switch(vcp_num) { case 11: fix_angle = vcp11[(3*el_num)-1]; pulse_cnt = vcp11[(3*el_num)]; az_rate = vcp11[(3*el_num)+1]; pulse_width = vcp11[1]; break; case 12: fix_angle = vcp12[(3*el_num)-1]; pulse_cnt = vcp12[(3*el_num)]; az_rate = vcp12[(3*el_num)+1]; pulse_width = vcp12[1]; break; case 21: fix_angle = vcp21[(3*el_num)-1]; pulse_cnt = vcp21[(3*el_num)]; az_rate = vcp21[(3*el_num)+1]; pulse_width = vcp21[1]; break; case 31: fix_angle = vcp31[(3*el_num)-1]; pulse_cnt = vcp31[(3*el_num)]; az_rate = vcp31[(3*el_num)+1]; pulse_width = vcp31[1]; break; case 32: fix_angle = vcp32[(3*el_num)-1]; pulse_cnt = vcp32[(3*el_num)]; az_rate = vcp32[(3*el_num)+1]; pulse_width = vcp32[1]; break; case 300: fix_angle = vcp300[(3*el_num)-1]; pulse_cnt = vcp300[(3*el_num)]; az_rate = vcp300[(3*el_num)+1]; pulse_width = vcp300[1]; break; case 121: fix_angle = vcp121[(3*el_num)-1]; pulse_cnt = vcp121[(3*el_num)]; az_rate = vcp121[(3*el_num)+1]; pulse_width = vcp121[1]; break; case 211: fix_angle = vcp11[(3*el_num)-1]; pulse_cnt = vcp11[(3*el_num)]; az_rate = vcp11[(3*el_num)+1]; pulse_width = vcp11[1]; break; case 212: fix_angle = vcp12[(3*el_num)-1]; pulse_cnt = vcp12[(3*el_num)]; az_rate = vcp12[(3*el_num)+1]; pulse_width = vcp12[1]; break; case 221: fix_angle = vcp21[(3*el_num)-1]; pulse_cnt = vcp21[(3*el_num)]; az_rate = vcp21[(3*el_num)+1]; pulse_width = vcp21[1]; break; default: fix_angle = 0; pulse_cnt = 0; az_rate = 0; pulse_width= 0; break; } /* get array for output */ vcp_info[0]=fix_angle; vcp_info[1]=pulse_cnt; vcp_info[2]=az_rate; vcp_info[3]=pulse_width; /* return the value array */ return(vcp_info); } float wsr88d_get_fix_angle(Wsr88d_ray *ray) { int *vcp_info; vcp_info = wsr88d_get_vcp_info(ray->vol_cpat, ray->elev_num); return vcp_info[0]/8.0*180./4096.0; } int wsr88d_get_pulse_count(Wsr88d_ray *ray) { int *vcp_info; vcp_info = wsr88d_get_vcp_info(ray->vol_cpat, ray->elev_num); return vcp_info[1]; } float wsr88d_get_azimuth_rate(Wsr88d_ray *ray) { int *vcp_info; vcp_info = wsr88d_get_vcp_info(ray->vol_cpat, ray->elev_num); return vcp_info[2]/8.0*45./4096.0; } float wsr88d_get_pulse_width(Wsr88d_ray *ray) { int *vcp_info; vcp_info = wsr88d_get_vcp_info(ray->vol_cpat, ray->elev_num); return vcp_info[3]/299.792458; } float wsr88d_get_prf(Wsr88d_ray *ray) { float prf; float c = 299792458.0; float range; range = wsr88d_get_range(ray)*1000.0; if (range != 0) prf = c/(2*range); else prf = 0.0; return prf; } float wsr88d_get_prt(Wsr88d_ray *ray) { float prf; float prt; prf = wsr88d_get_prf(ray); if (prf != 0) prt = 1.0/prf; else prt = 0; return prt; } /* Note: wsr88d_get_wavelength() below is no longer used because of differences * in wavelength for velocity and reflectivity. The function computes * wavelength when Nyquist is present, but returns a constant wavelength * otherwise. Nyquist is present for velocity, but not for reflectivity. The * fact is that WSR-88D radars use a constant wavelength, 10.7 cm., which is * the value now used where this function was formerly called in * wsr88d_load_sweep_into_volume(). */ float wsr88d_get_wavelength(Wsr88d_ray *ray) { float wavelength; float prf; float nyquist; prf = wsr88d_get_prf(ray); nyquist = wsr88d_get_nyquist(ray); /* If required info to determine wavelength does not exist, just use 10 cm. All wsr88d radars are 10cm. MJK */ if ((prf == 0) || (nyquist == 0.0)) wavelength = 0.10; else wavelength = 4*nyquist/prf; return wavelength; } float wsr88d_get_frequency(Wsr88d_ray *ray) { float freq; float c = 299792458.0; /* Carrier freq (GHz). Revised 12 Jun 97. MJK */ freq = (c / wsr88d_get_wavelength(ray)) * 1.0e-9; return freq; } rsl-v1.43/rapic_routines.c0000644000102200007640000002430107021115215012530 00000000000000#include #include "rapic_routines.h" #include #include void rapic_decode(unsigned char *inbuf, int inbytes, unsigned char *outbuf, int *outbytes, float *azim, float *elev, int *delta_time) { /* Decode RLE rapic buffer. * * Output to 'outbuf' and indicate the size w/ 'nout'. */ /* There is some risidual parsing to do: * * @ * * AAA.A,EEE.E,TTT=LEN16D1D1D1NLD1D1D1NLNL * * AAA.A Azimuth in degrees * EEE.E Elevation in degress * TTT Delta time in seconds since the start of this scan * LEN16 2 byte long length of radial * * D1 Run length coded Data. * NL Null The Next Byte is count of NULL data. * NLNL End of this Radial * * eg. There will be no white space in the actual radial data. * * @066.1,010.6,004=002082B2817F8C84830048D72D0038 * 999C0036202D35FD2C00238A99008AFE920000 * Azimuth = 66.1 * Elev = 10.6 * Dt = 4 sec since the start * 0020 = Bytes to follow * Data = 82,B2,81,7F,8C,84,83 * 0048 = 48H null bytes * Data = D7,2D * 0038 = 38H null bytes * Data = 99,9C * 0036 = 36H Null bytes * ........................ * 0000 = End of Data. * In versions before 10.1 * @ * AAALEN16D1D1D1NLD1D1D1NLNL * * AAA Azimuth in degrees * LEN16 2 byte long length of radial * * D1 Run length coded Data. * NL Null The Next Byte is count of NULL data. * NLNL End of this Radial * * eg. There will be no white space in the actual radial data. * * @066002082B2817F8C84830048D72D0038 * 999C0036202D35FD2C00238A99008AFE920000 * Azimuth = 66 * 0020 = Bytes to follow * Data = 82,B2,81,7F,8C,84,83 * 0048 = 48H null bytes * Data = D7,2D * 0038 = 38H null bytes * Data = 99,9C * 0036 = 36H Null bytes * ........................ * 0000 = End of Data. * */ /* The parser won't give us a line w/o '@' at the begining nor '\0\0' * at the end. So we can be sure of that. */ int i; char prefix[16]; unsigned short nnulls; short i16; /* Find the '=' and start RLE decode from there. */ *outbytes = 0; memset(prefix, '\0', sizeof(prefix)); memcpy(prefix, &inbuf[1], 15); sscanf(prefix, "%f,%f,%d", azim, elev, delta_time); /* fprintf(stderr, "AZIM=%f, ELEV=%f, TTT=%d\n", *azim, *elev, *delta_time); */ /* Now, decode RLE. Don't care about 17,18 (they are the RLE buf size) */ memcpy(&i16, &inbuf[17], 2); i16 = ntohs(i16); /* fprintf(stderr, "Expecting %d bins\n", (int)i16); */ i = 19; while (i\n"); */ } /*---------------------------------------------------------*/ /* */ /* binprint */ /* */ /*---------------------------------------------------------*/ void binprint(char *s, int n) { int i; for (i=0; i void rapic_fix_time (Ray *ray) { struct tm the_time; float fsec; /* Fixes possible overflow values in month, day, year, hh, mm, ss */ /* Normally, ss should be the overflow. This code ensures end of * month, year and century are handled correctly by using the Unix * time functions. */ if (ray == NULL) return; memset(&the_time, 0, sizeof(struct tm)); the_time.tm_sec = ray->h.sec; fsec = ray->h.sec - the_time.tm_sec; the_time.tm_min = ray->h.minute; the_time.tm_hour = ray->h.hour; the_time.tm_mon = ray->h.month - 1; the_time.tm_year = ray->h.year - 1900; the_time.tm_mday = ray->h.day; the_time.tm_isdst = -1; (void) mktime(&the_time); /* The time is fixed. */ ray->h.sec = the_time.tm_sec; ray->h.sec += fsec; ray->h.minute = the_time.tm_min; ray->h.hour = the_time.tm_hour; ray->h.month = the_time.tm_mon + 1; ray->h.year = the_time.tm_year + 1900; ray->h.day = the_time.tm_mday; return; } void rapic_load_ray_header(Rapic_sweep_header rh, int iray, int isweep, float elev, float azim, Ray_header *h) { sscanf(rh.yyyymoddhhmmss,"%4d%2d%2d%2d%2d%2f", &h->year,&h->month,&h->day, &h->hour, &h->minute, &h->sec); h->unam_rng = rh.end_range/1000.0; /* Unambiguous range. (KM). */ h->azimuth = azim; /* Azimuth angle. (degrees). Must be positive * 0=North, 90=east, -90/270=west. * This angle is the mean azimuth for the whole ray. * Eg. for NSIG the beginning and end azimuths are * averaged. */ h->ray_num = iray; /* Ray no. within elevation scan. */ h->elev = rh.elev; /* Elevation angle. (degrees). */ h->elev_num = isweep; /* Elevation no. within volume scan. */ h->range_bin1 = rh.start_range; /* Range to first gate.(meters) */ h->gate_size = rh.range_resolution; /* Data gate size (meters)*/ h->vel_res = rh.range_resolution; /* Doppler velocity resolution */ h->sweep_rate = rh.anglerate/6.0; /* Sweep rate. Full sweeps/min. */ h->prf = rh.prf; /* Pulse repetition frequency, in Hz. */ h->azim_rate = rh.anglerate; /* degrees/sec */ h->fix_angle = elev; h->pitch = 0; /* Pitch angle. */ h->roll = 0; /* Roll angle. */ h->heading = 0; /* Heading. */ h->pitch_rate = 0; /* (angle/sec) */ h->roll_rate = 0; /* (angle/sec) */ h->heading_rate = 0; /* (angle/sec) */ h->lat = rh.lat; /* Latitude (degrees) */ h->lon = rh.lon; /* Longitude (degrees) */ h->alt = rh.height; /* Altitude (m) */ h->rvc = 0; /* Radial velocity correction (m/sec) */ h->vel_east = 0; /* Platform velocity to the east (m/sec) */ h->vel_north = 0; /* Platform velocity to the north (m/sec) */ h->vel_up = 0; /* Platform velocity toward up (m/sec) */ h->pulse_count = 0; /* Pulses used in a single dwell time. */ h->pulse_width = rh.pulselen; /* Pulse width (micro-sec). */ h->beam_width = rh.angle_resolution; /* Beamwidth in degrees. */ h->frequency = rh.freq/1000.0; /* Carrier freq. GHz. */ h->wavelength = 0; /* Wavelength. Meters. */ h->nyq_vel = rh.nyquist; /* Nyquist velocity. m/s */ return; } extern float rapic_nyquist; float RAPIC_DZ_F(unsigned char x) { if (x == 0) return NOECHO; return (((float)x-64)/2.0); /* rapic -> float */ } float RAPIC_VR_F(unsigned char x) { if (x == 0) return BADVAL; return (((float)((int)x-128))/128.0*rapic_nyquist); /* rapic -> float */ } float RAPIC_SW_F(unsigned char x) { if (x == 0) return NOECHO; return (((float)x)/256.0*rapic_nyquist); /* rapic -> float */ } float RAPIC_ZT_F(unsigned char x) { return RAPIC_DZ_F(x); } float RAPIC_ZD_F(unsigned char x) { if (x == 0) return NOECHO; return (((float)x-128)/16.0); /* rapic -> float */ } /* USE RSL INDEXING! */ static float (*RAPIC_f_list[])(unsigned char x) = {RAPIC_DZ_F, RAPIC_VR_F, RAPIC_SW_F, NULL, RAPIC_ZT_F, NULL, NULL, RAPIC_ZD_F}; void rapic_load_ray_data(unsigned char *buf, int bufsize, int ifield, Ray *ray) { /* ifield is the RSL numbering scheme for field types. The conversion * is done in rapic.y. In other words, we've already converted rapic * index to RSL indexes. */ int i; for (i=0; irange[i] = ray->h.invf(RAPIC_f_list[ifield](buf[i])); /* fprintf(stderr,"i=%d ifield=%d, buf[%d]=%2.2x, ray->range[%d]=%4.4x value=%f\n", i,ifield,i,buf[i],i,ray->range[i], RAPIC_f_list[ifield](buf[i]) ); */ } ray->h.nbins = bufsize; } Radar *fill_header(Radar *radar) { /* Learn as much as possible from the Ray headers. Place this * information into radar->h.xxxxxx */ Ray *ray; Volume *volume; int i; float tmp; volume = NULL; if (radar == NULL) return NULL; for (i=0; ih.nvolumes && !(volume = radar->v[i]); i++) ; if (volume == NULL) return NULL; ray = RSL_get_first_ray_of_volume(volume); if (ray == NULL) return NULL; radar->h.month = ray->h.month; radar->h.day = ray->h.day; radar->h.year = ray->h.year; radar->h.hour = ray->h.hour; radar->h.minute= ray->h.minute; radar->h.sec = ray->h.sec; /* Second plus fractional part. */ sprintf(radar->h.radar_type, "rapic"); /* Type of radar. */ /* nvolumes is already filled in YACC. */ /* number is already filled in YACC. */ /* name is already filled in YACC. */ /* radar_name is already filled in YACC. */ /* radar->h.city[15]; */ /* Not available from RAPIC. */ /* radar->h.state[3]; */ /* Not available from RAPIC. */ /* radar->h.country[15]; */ /* Not available from RAPIC. */ /** Latitude deg, min, sec **/ radar->h.latd = (int)ray->h.lat; tmp = (ray->h.lat - radar->h.latd) * 60.0; radar->h.latm = (int)tmp; radar->h.lats = (int)((tmp - radar->h.latm) * 60.0); /** Longitude deg, min, sec **/ radar->h.lond = (int)ray->h.lon; tmp = (ray->h.lon - radar->h.lond) * 60.0; radar->h.lonm = (int)tmp; radar->h.lons = (int)((tmp - radar->h.lonm) * 60.0); radar->h.height = ray->h.alt; /* height of site in meters above sea level*/ radar->h.spulse = 0; /* length of short pulse (ns)*/ radar->h.lpulse = 0; /* length of long pulse (ns) */ return radar; } rsl-v1.43/africa.c0000644000102200007640000000674711565520526010762 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "africa.h" int africa_read_buffer(FILE *fp, Africa_buffer *buffer) { int n; n = fread(buffer, 1, sizeof(Africa_buffer), fp); return n; } float africa_bcd_convert(unsigned short bcd) { int val; val = ((bcd >> 12) & 0xf) * 1000 + ((bcd >> 8) & 0xf) * 100 + ((bcd >> 4) & 0xf) * 10 + ( bcd & 0xf); return val/10.0; } Africa_sweep * africa_new_sweep(int nray) { Africa_sweep *sweep; sweep = (Africa_sweep *)calloc(nray, sizeof(Africa_sweep)); if (! sweep) { perror("africa_new_sweep:sweep"); return NULL; } sweep->nrays = nray; sweep->ray = (Africa_ray **) calloc(nray, sizeof(Africa_ray *)); if (! sweep -> ray) { perror("africa_new_sweep:ray"); return NULL; } return sweep; } Africa_ray *africa_new_ray(void) { Africa_ray *ray; ray = (Africa_ray *)calloc(1, sizeof(Africa_ray)); if (! ray) { perror("africa_new_ray:ray"); return NULL; } return ray; } void africa_free_ray(Africa_ray *r) { if (! r) return; free(r); } void africa_free_sweep(Africa_sweep *s) { int i; if (! s) return; if (! s->ray) return; for (i=0; inrays; i++) { africa_free_ray(s->ray[i]); } free(s->ray); free(s); } Africa_sweep *africa_read_sweep(FILE *fp) { /* This contains the next ray of data, except * when this is the first ray. This is a * read-ahead buffer. */ static Africa_buffer *buf = NULL; /* The read ahead buffer, too. */ Africa_sweep *sweep = NULL; int cur_elev, ielev, iray; Africa_ray *ray = NULL; int nray; if (! buf) { buf = (Africa_buffer *) calloc(1, sizeof(Africa_buffer)); if (! buf) { perror("allocate buf in read_sweep"); return NULL; } /* (pre)Read a record */ africa_read_buffer(fp, buf); /* allocates space for buffer */ } /* Allocate 500 (should be enough) ray pointers. */ sweep = africa_new_sweep(1000); /* 500 times 2 field types ? */ /* Determine the elevation step we're on so we know when to * return the sweep. Basically, the last read will be the * data for the next sweep; the meaning of the above code. */ cur_elev = ielev = buf->raycount/512; nray = 0; while(cur_elev == ielev) { iray = buf->raycount - cur_elev*512; if (iray != 0) { ray = sweep->ray[nray]; if (!ray) sweep->ray[nray] = ray = africa_new_ray(); memcpy(ray, buf, sizeof(Africa_buffer)); nray++; } if (africa_read_buffer(fp, buf) == 0) break; cur_elev = buf->raycount/512; /* isite = buf->xmit_power_site & 0x1f; */ } if (nray == 0) return NULL; sweep->nrays = nray; return sweep; } rsl-v1.43/nsig2_to_radar.c0000644000102200007640000000201606600002401012370 00000000000000/*************************************************************/ /* */ /* Function: nsig2_to_radar.c */ /* */ /* John H. Merritt */ /* Space Applications Corporation */ /* NASA/GSFC */ /* TRMM/Code 910.1 */ /* */ /* Copyright 1996, 1997 */ /*************************************************************/ /* The trick here is to reuse as much code from nsig_to_radar.c. * To do that, #define NSIG_VER2, separates all version 2 code * from version 1 code in nsig_to_radar.c, nsig.c, and nsig.h */ #define NSIG_VER2 /* 'static' forces all routines in nsig.c to be static for this code. */ #include "nsig.c" #include "nsig_to_radar.c" rsl-v1.43/carpi.c0000644000102200007640000002315507634130137010620 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Mike Kolander * Space Applications Corporation * NASA/Goddard 910.1 */ #include #include #include #include #include "rsl.h" #define RAD2DEG 57.29578 /* radian to degree conversion */ #define MAXRAYS 512 /* loop safety valve when traversing a sweep */ extern int radar_verbose_flag; /*************************************************************/ /* */ /* RSL_free_carpi */ /* */ /*************************************************************/ void RSL_free_carpi(Carpi *carpi) { /* Frees memory allocated to a carpi structure, and associated pointer and data arrays. */ if (carpi != NULL) { if (carpi->data != NULL) { if (carpi->data[0] != NULL) free(carpi->data[0]); /* Free the 2D data array. */ free(carpi->data); /* Free the vector of pointers. */ } free(carpi); /* Free the carpi structure. */ } } /*************************************************************/ /* */ /* RSL_new_carpi */ /* */ /*************************************************************/ Carpi *RSL_new_carpi(int nrows, int ncols) { /* Allocates memory for a carpi structure, and associated pointer and data arrays. */ Carpi *c; Carpi_value *data; int row; /* Allocate a carpi. */ c = (Carpi *)calloc(1, sizeof(Carpi)); if (c == NULL) perror("RSL_new_carpi"); /* Allocate a vector of 'nrows' pointers. */ c->data = (Carpi_value **)calloc(nrows, sizeof(Carpi_value *)); if (c->data == NULL) perror("RSL_new_carpi"); /* Allocate a 2 dimensional array for the actual data values. */ data = (Carpi_value *)calloc(nrows*ncols, sizeof(Carpi_value)); if (data == NULL) perror("RSL_new_carpi"); /* Fill all the 'nrows' pointer slots created above. */ for (row=0; rowdata[row] = data + row*ncols; return(c); } /*************************************************************/ /* */ /* RSL_volume_to_carpi */ /* */ /*************************************************************/ Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r, float dx, float dy, int nx, int ny, int radar_x, int radar_y, float lat, float lon) /* * Creates a carpi from a volume structure. * * +--------------------+ ^ * | | | * | | | * | cell size dx,dy | ny * | | | * | | | * +--------------------+ V * lat,lon * <-------- nx --------> * * Radar centered at radar_x, radar_y. */ { Cappi *cappi; Carpi *carpi; if (v == NULL) return NULL; cappi = RSL_cappi_at_h(v, h, grnd_r); cappi->lat = lat; cappi->lon = lon; cappi->interp_method = 0; carpi = RSL_cappi_to_carpi(cappi, dx, dy, lat, lon, nx, ny, radar_x, radar_y); if (carpi == NULL) return NULL; RSL_free_cappi(cappi); return carpi; } /*************************************************************/ /* */ /* RSL_find_rng_azm */ /* */ /*************************************************************/ void RSL_find_rng_azm(float *r, float *ang, float x, float y) { /* Convert Cartesian coords (x,y) to polar (rng,angle); 0 0.0) *ang = 90.0 - *ang; else *ang = 270.0 - *ang; } else /* x is 0.0 */ { if (y >= 0.0) *ang = 0.0; else *ang = 180.0; } } /*************************************************************/ /* */ /* RSL_cappi_to_carpi */ /* */ /*************************************************************/ Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar_y) /****** Simple and straightforward algorithm: Divide each of the nx*ny carpi cells into scx*scy subcells. Find the data value for each subcell from the cappi rays. Average the subcell data values over a cell to obtain the cell value. Store the cell value into the 2_D carpi array. ********/ { Carpi *carpi; Ray *first_ray; int row, col, j, k, m, n, scx, scy, valid_subcells; float x, y, rng, azm, cell, cell_diag, gate_size; float carpi_max_rng, radar_max_rng; float subcell[3][3]; /* Maximum of 9 subcells per carpi cell*/ if (cappi == NULL) return NULL; if (cappi->sweep == NULL) return NULL; first_ray = RSL_get_first_ray_of_sweep(cappi->sweep); if (first_ray == NULL) return NULL; /* No data. */ if (radar_verbose_flag) fprintf(stderr,"\nCreating carpi...\n"); /* Allcate space for a carpi, and fill in its values. */ carpi = RSL_new_carpi(ny, nx); carpi->month = cappi->month; carpi->day = cappi->day; carpi->year = cappi->year; carpi->hour = cappi->hour; carpi->minute = cappi->minute; carpi->sec = cappi->sec; carpi->dx = dx; carpi->dy = dy; carpi->nx = nx; carpi->ny = ny; carpi->radar_x = radar_x; carpi->radar_y = radar_y; carpi->height = cappi->height; carpi->lat = lat; carpi->lon = lon; strncpy(carpi->radar_type, cappi->radar_type, sizeof(cappi->radar_type)); carpi->field_type = cappi->field_type; carpi->interp_method = cappi->interp_method; carpi->f = first_ray->h.f; carpi->invf = first_ray->h.invf; gate_size = first_ray->h.gate_size / 1000.0; /* km */ cell_diag = sqrt(dx*dx + dy*dy); /* How many subcells per carpi cell? The larger the carpi cell relative to gate_size, the more subcells we want. Will have scx*scy subcells per carpi cell. Note below that the max no. of subcells is 9 . */ if ((dy - gate_size) < 0.0) scy = 1; else if ((dy - gate_size) <= 1.0) scy = 2; else scy = 3; if ((dx - gate_size) < 0.0) scx = 1; else if ((dx - gate_size) <= 1.0) scx = 2; else scx = 3; /* Max range of the radar data */ radar_max_rng = first_ray->h.nbins * gate_size; /* km */ /* Max range of desired carpi is max of x and y directions. */ carpi_max_rng = nx / 2.0 * dx; /* km */ if ( (ny / 2.0 * dy) > carpi_max_rng ) carpi_max_rng = ny / 2.0 * dy; /* carpi_max_rng is smaller of (radar_max_rng, carpi_max_rng) */ if (radar_max_rng < carpi_max_rng) carpi_max_rng = radar_max_rng; if (radar_verbose_flag) fprintf(stderr,"carpi_max_rng:%.1f(km) beam_width:%.1f gate_size:%d(m)\n", carpi_max_rng, cappi->sweep->h.beam_width, first_ray->h.gate_size); /* For each cell (row,col) comprising the carpi...*/ for (row=0; row carpi_max_rng) { /* Totality of carpi cell lies outside data range. */ cell = (float) BADVAL; goto escape; } } /* end if (m == 0) */ /* cell lies in data range. Get data value from cappi. */ subcell[n][m] = RSL_get_value_from_cappi(cappi,rng,azm); } /* end for (m=... */ } /* end for (n=... */ /* All subcell values have now been determined. Average them to determine the cell value. */ valid_subcells = 0; /* number subcells having valid data values.*/ cell = 0.0; for (j=0; j= NOECHO)) continue; else /* valid data value. */ { cell = cell + subcell[j][k]; valid_subcells++; } } /* end for (j=0; jdata[row][col] = (Carpi_value) carpi->invf(cell); } /* end for (col=... */ } /* end for (row=... */ return(carpi); } rsl-v1.43/africa_to_radar.c0000644000102200007640000001071407021115215012605 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "rsl.h" #include "africa.h" static void ymd(int jday, int yy, int *mm, int *dd); static int daytab[2][13] = { {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} }; static void ymd(int jday, int year, int *mm, int *dd) { /* Input: jday, yyyy */ /* Output: mm, dd */ int leap; int i; leap = (year%4 == 0 && year%100 != 0) || year%400 == 0; for (i=0; daytab[leap][i]v[DZ_INDEX] = RSL_new_volume(20); v = radar->v[DZ_INDEX]; for(i=0; (sweep = africa_read_sweep(fp)); i++) { /* Load the sweep into the radar volume */ v->sweep[i] = RSL_new_sweep((int)sweep->nrays); s = v->sweep[i]; if (radar_verbose_flag) printf("NUMBER OF RAYS: %d\n", sweep->nrays); for (n=0; n < sweep->nrays; n++) { ray = sweep->ray[n]; if (ray == NULL) continue; year = ray->yearjday/512; jday = ray->yearjday & 0x1ff; year += 1900; if (year < 1970) year += 100; /* >=2000 */ ymd(jday, year, &month, &day); hour = ray->hour; min = ray->minute_sec/60; sec = ray->minute_sec - min*60; elev = africa_bcd_convert (ray->bcd_elevation); azim = africa_bcd_convert (ray->bcd_azimuth); s_azim = africa_bcd_convert (ray->bcd_start_azim); e_azim = africa_bcd_convert (ray->bcd_end_azim); /* Values that I CANNOT trust. * e_azim * * DATA ORGANIZATION: * Usually, 10 ray groups for each field type. Field type is in * ray->xmit_power_site (Doc wrong?) * iray == 0 when at the end of the sweep. (Don't need lookahead) */ ielev = ray->raycount/512; iray = ray->raycount - ielev*512; isite = ray->xmit_power_site & 0x1f; printf("Record %d, time = %.2d:%.2d:%.2d %.2d/%.2d/%.2d --> elev,azim = %f, %f. Start: %f, %f, iray/ielev %d %d, site=%d\n", n, hour, min, sec, month, day, year-1900, elev, azim, s_azim, e_azim, iray, ielev, isite); if (isite != 22) continue; /* ONLY LOAD from isite==22, for now. */ r = RSL_new_ray(224); s->ray[n] = r; r->h.month = month; r->h.day = day; r->h.year = year; r->h.hour = hour; r->h.minute = min; r->h.sec = sec; r->h.azimuth = azim; r->h.ray_num = iray; r->h.elev = elev; r->h.elev_num = ielev; r->h.beam_width = 1.0; r->h.gate_size = 1000; /* What are the others? */ r->h.invf = DZ_INVF; r->h.f = DZ_F; s->h.horz_half_bw = 0.5; s->h.vert_half_bw = 0.5; s->h.beam_width = r->h.beam_width; for (ibin=0; ibinh.nbins; ibin++) { r->range[ibin] = r->h.invf(ray->bin[ibin]/8.0/100.0 + 0.5); } } } fclose(fp); sprintf(radar->h.radar_type, "south_africa"); sprintf(radar->h.name, "SAFRICA"); sprintf(radar->h.radar_name, "SAFRICA"); sprintf(radar->h.city, "I don't know"); sprintf(radar->h.state, "??"); sprintf(radar->h.country, "South Africa"); radar_load_date_time(radar); return radar; } rsl-v1.43/wsr88d_get_site.c0000644000102200007640000000572706600002403012533 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * get_site - fills structure containing radar site info * parameters: * char *in_sitenm - ptr to radar site name * returns: struct radar_site *currsite->- ptr to current site structure * Returns NULL on failure of 'in_sitenm' lookup. * calls from: Proc_file */ #include #include int strcasecmp(const char *s1, const char *s2); #include #include "wsr88d.h" Wsr88d_site_info *wsr88d_get_site(char *in_sitenm) { /* variable declarations */ char line[100]; int scan_count,i; int in_number,in_latd,in_latm,in_lats,in_lond,in_lonm,in_lons; int in_height; char in_site[5],in_city[16],in_state[4]; /* One extra for \0 */ struct radar_site *currsite=NULL; FILE *in_file; if((in_file=fopen(WSR88D_SITE_INFO_FILE, "r")) !=NULL) { /* read each line */ while (fgets(line,sizeof(line),in_file) != NULL) { scan_count=sscanf(line,"%d %s %s %s %d %d %d %d %d %d %d",&in_number,in_site,in_city,in_state,&in_latd,&in_latm,&in_lats,&in_lond,&in_lonm,&in_lons,&in_height); if(scan_count != 11 && scan_count != 0) fprintf(stderr,"get_site: sitedb read"); else { /* get the radar site info */ /* check for the matching site name*/ if(strcasecmp(in_sitenm,in_site)== 0) { if((currsite=(struct radar_site *)malloc(sizeof(struct radar_site)))==NULL) { perror("wsr88d_get_site"); return NULL; } currsite->number = in_number; for(i=0;i<4;i++) currsite->name[i] = in_site[i]; for(i=0;i<15;i++) currsite->city[i] = in_city[i]; for(i=0;i<2;i++) currsite->state[i] = in_state[i]; currsite->latd = in_latd; currsite->latm = in_latm; currsite->lats = in_lats; currsite->lond = in_lond; currsite->lonm = in_lonm; currsite->lons = in_lons; currsite->height = in_height; currsite->bwidth = -999; currsite->spulse = 1530; currsite->lpulse = 4630; break; } } } /* close the file */ (void)fclose(in_file); } else perror(WSR88D_SITE_INFO_FILE); return(currsite); } rsl-v1.43/colors/0000755000102200007640000000000011747614601010734 500000000000000rsl-v1.43/colors/blu_reflectivity1.clr0000644000102200007640000000031606600002403014771 00000000000000@ L9AIR~«ÿÇÕãñÿ"d*+,/# ‹—¤±¾ÿ4rsl-v1.43/colors/Makefile.am0000644000102200007640000000015307024071546012705 00000000000000AUTOMAKE_OPTIONS = foreign colordir = $(prefix)/lib/colors color_DATA = *.??? EXTRA_DIST = $(color_DATA) rsl-v1.43/colors/red_vr.clr0000644000102200007640000000035406600002404012621 00000000000000nŽw’­Èãÿïÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/grn_vr.clr0000644000102200007640000000035406600002404012635 00000000000000ÿÿÛ¸”q«\ÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/red_zdr.clr0000644000102200007640000000030006600002404012760 00000000000000 9FS`m.=M\l¸ÉÛíÿ´ÆÙìÿïó÷ûÿÿÿÿÿ¶ÿÿÿÿÿŽš§³ÿÌÙåòÿÿÿÿÿÿÿ4rsl-v1.43/colors/red_velocity.clr0000644000102200007640000000030006600002404014017 00000000000000ÿ~“©¾Ôéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿrsl-v1.43/colors/Makefile.in0000644000102200007640000002273711747610602012731 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 = : build_triplet = @build@ host_triplet = @host@ subdir = colors DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(colordir)" colorDATA_INSTALL = $(INSTALL_DATA) DATA = $(color_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign colordir = $(prefix)/lib/colors color_DATA = *.??? EXTRA_DIST = $(color_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 colors/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign colors/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-colorDATA: $(color_DATA) @$(NORMAL_INSTALL) test -z "$(colordir)" || $(mkdir_p) "$(DESTDIR)$(colordir)" @list='$(color_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(colorDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(colordir)/$$f'"; \ $(colorDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(colordir)/$$f"; \ done uninstall-colorDATA: @$(NORMAL_UNINSTALL) @list='$(color_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(colordir)/$$f'"; \ rm -f "$(DESTDIR)$(colordir)/$$f"; \ 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(colordir)"; 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 clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-colorDATA install-exec-am: install-info: install-info-am install-man: 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 mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-colorDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-colorDATA 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-colorDATA 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: rsl-v1.43/colors/red_rainfall.clr0000644000102200007640000000033006600002404013754 00000000000000qEQ''ÅŸ¸ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÉÉÉÉÉêêêêêêêêêêÿÿÿÿÿÿÿÿÿÿ±±±±±±±±±±‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ@@@rsl-v1.43/colors/blu_velocity.clr0000644000102200007640000000030006600002403014026 00000000000000ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿrsl-v1.43/colors/red_sw.clr0000644000102200007640000000035406600002404012623 00000000000000„ÿÿÿñÄ—ÿïÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/blu_hh.clr0000644000102200007640000000035406600002403012600 000000000000003`À”·Ûÿ "$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢ÿ¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿiARRDib/statlQ@OxÈQ?x+/usr/local/irsl-v1.43/colors/grn_zdr.clr0000644000102200007640000000030006600002404012774 00000000000000 9FS`m$8Mbw§½Óéÿ`m{‰—7ETbqÿŒœ«aÎÔÚàÿ8Uqÿ4rsl-v1.43/colors/grn_dz.clr0000644000102200007640000000031606600002404012621 00000000000000@ L9AJR~ (7;ENX•Q]iv_›¨´ ÍÙæòÿ Œœ«aÎÔÚàÿ8Uqÿ4rsl-v1.43/colors/red_spectral_width.clr0000644000102200007640000000035406600002404015206 00000000000000„ÿÿÿñÄ—ÿïÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/grn_hh.clr0000644000102200007640000000035406600002404012605 000000000000003`À@Â\’Èÿò©`"$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿARRD€Þ xN0rsl-v1.43/colors/red_reflectivity1.clr0000644000102200007640000000031606600002404014762 00000000000000@ M9AIR~"# ÿÿÿ¶ÿÿÿÿÿŽš§³ÿÌÙåòÿÿÿÿÿÿÿ4rsl-v1.43/colors/blu_sw.clr0000644000102200007640000000035406600002403012632 00000000000000„ßãèÿÿÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/blu_dz.clr0000644000102200007640000000031606600002403012614 00000000000000@ L9AIR~«ÿÇÕãñÿ"d*+,/# ‹—¤±¾ÿ4rsl-v1.43/colors/grn_reflectivity.clr0000644000102200007640000000031606600002404014715 00000000000000@ L9AJR~ (7;ENX•Q]iv_›¨´ ÍÙæòÿ Œœ«aÎÔÚàÿ8Uqÿ4rsl-v1.43/colors/blu_vr.clr0000644000102200007640000000035406600002404012631 00000000000000™puÿÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/grn_rainfall.clr0000644000102200007640000000033006600002404013770 00000000000000ÿã» •ÿß½œœvvÿÿÿÿÿÇÇÇÇÇŽŽŽŽŽFFFFFzzzzzzzzzz$$$$$$$$$$tttttttttttttttttttÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŠ`"|rsl-v1.43/colors/grn_sw.clr0000644000102200007640000000035406600002404012637 00000000000000„Úmñ¾‹ýÊÿÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/blu_rainfall.clr0000644000102200007640000000033006600002403013763 00000000000000ÿʪlÿÿµµ„„ÿÿÿÿÿÿÿÿÿÿ««««««««««ÉÉÉÉÉÉÉÉÉÉÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÔY°ŒY²lY²,YxY—0Y–@rsl-v1.43/colors/red_height.clr0000644000102200007640000000035406600002404013442 00000000000000L`À}¾ÞÿÊ•`"$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢ÿ¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿrsl-v1.43/colors/grn_velocity.clr0000644000102200007640000000030006600002404014033 00000000000000ÿéÔ¿ª•€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿrsl-v1.43/colors/red_reflectivity.clr0000644000102200007640000000031606600002404014701 00000000000000@ M9AIR~"# ÿÿÿ¶ÿÿÿÿÿŽš§³ÿÌÙåòÿÿÿÿÿÿÿ4rsl-v1.43/colors/grn_spectral_width.clr0000644000102200007640000000035406600002404015222 00000000000000„Úmñ¾‹ýÊÿÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/blu_spectral_width.clr0000644000102200007640000000035406600002403015215 00000000000000„ßãèÿÿÿÿ !"#$%&'()**+,-./0123456789:;;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÔÕÖרÙÚÛÜÝÞßàáâãäåærsl-v1.43/colors/blu_reflectivity.clr0000644000102200007640000000031606600002403014710 00000000000000@ L9AIR~«ÿÇÕãñÿ"d*+,/# ‹—¤±¾ÿ4rsl-v1.43/colors/blu_zdr.clr0000644000102200007640000000030006600002404012770 00000000000000 9FS`mµÇÚìÿ/# – ª´¿ÿ*+,/# ‹—¤±¾ÿ4rsl-v1.43/colors/blu_height.clr0000644000102200007640000000035406600002403013451 000000000000003`À”·Ûÿ "$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢ÿ¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿiARRDib/statlQ@OxÈQ?x+/usr/local/irsl-v1.43/colors/grn_reflectivity1.clr0000644000102200007640000000031606600002404014776 00000000000000@ L9AJR~ (7;ENX•Q]iv_›¨´ ÍÙæòÿ Œœ«aÎÔÚàÿ8Uqÿ4rsl-v1.43/colors/red_dz.clr0000644000102200007640000000031606600002404012605 00000000000000@ M9AIR~"# ÿÿÿ¶ÿÿÿÿÿŽš§³ÿÌÙåòÿÿÿÿÿÿÿ4rsl-v1.43/colors/grn_height.clr0000644000102200007640000000035406600002404013456 000000000000003`À@Â\’Èÿò©`"$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿARRD€Þ xN0rsl-v1.43/colors/red_hh.clr0000644000102200007640000000035406600002404012571 00000000000000L`À}¾ÞÿÊ•`"$&')+,.0134689;=>@BCEGHJLMOQRTVWY[\^`acefhikmnprsuwxz|}‚„†‡‰‹ŒŽ‘“•–˜™›ž ¢ÿ¥§¨ª¬­¯±²´¶·¹»¼¾ÀÁÃÅÆÈÊËÍÎÐÒÓÕרÚÜÝßáâäæçéëìîðñóõöøúûýÿrsl-v1.43/dorade_print.c0000644000102200007640000002075211144367100012165 00000000000000#include #include "dorade.h" void dorade_print_sweep_info(Sweep_info *d) { int i; printf("Sweep info block\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->radar_name = <"); for(i=0; iradar_name); i++) printf("%c", d->radar_name[i]); printf(">\n"); printf("d->sweep_num = %d\n", d->sweep_num); printf("d->nrays = %d\n", d->nrays); printf("d->start_angle = %f\n", d->start_angle); printf("d->stop_angle = %f\n", d->stop_angle); printf("d->fixed_angle = %f\n", d->fixed_angle); printf("d->filter_flag = %d\n", d->filter_flag); } void dorade_print_ray_info(Ray_info *d) { int i; printf("Ray info block\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->sweep_num = %d\n", d->sweep_num); printf("d->jday = %d\n", d->jday); printf("d->hour = %d\n", d->hour); printf("d->minute = %d\n", d->minute); printf("d->second = %d\n", d->second); printf("d->msec = %d\n", d->msec); printf("d->azimuth = %f\n", d->azimuth); printf("d->elevation = %f\n", d->elevation); printf("d->peak_power = %f\n", d->peak_power); printf("d->scan_rate = %f\n", d->scan_rate); printf("d->status = %d\n", d->status); } void dorade_print_platform_info(Platform_info *d) { int i; printf("Platform info block\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->longitude = %f\n", d->longitude); printf("d->latitude = %f\n", d->latitude); printf("d->altitude = %f\n", d->altitude); printf("d->height = %f\n", d->height); printf("d->ew_speed = %f\n", d->ew_speed); printf("d->ns_speed = %f\n", d->ns_speed); printf("d->v_speed = %f\n", d->v_speed); printf("d->heading = %f\n", d->heading); printf("d->roll = %f\n", d->roll); printf("d->pitch = %f\n", d->pitch); printf("d->drift = %f\n", d->drift); printf("d->rotation = %f\n", d->rotation); printf("d->tilt = %f\n", d->tilt); printf("d->ew_wind_speed = %f\n", d->ew_wind_speed); printf("d->ns_wind_speed = %f\n", d->ns_wind_speed); printf("d->v_wind_speed = %f\n", d->v_wind_speed); printf("d->heading_rate = %f\n", d->heading_rate); printf("d->pitch_rate = %f\n", d->pitch_rate); } void dorade_print_correction_factor_desc(Correction_factor_desc *d) { int i; printf("Correction factor descriptor\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->azimuth = %f\n", d->azimuth); printf("d->elevation = %f\n", d->elevation); printf("d->range = %f\n", d->range); printf("d->longitude = %f\n", d->longitude); printf("d->latitude = %f\n", d->latitude); printf("d->altitude = %f\n", d->altitude); printf("d->height = %f\n", d->height); printf("d->speed_east_west = %f\n", d->speed_east_west); printf("d->speed_north_south = %f\n", d->speed_north_south); printf("d->vertical_velocity = %f\n", d->vertical_velocity); printf("d->heading = %f\n", d->heading); printf("d->roll = %f\n", d->roll); printf("d->pitch = %f\n", d->pitch); printf("d->drift = %f\n", d->drift); printf("d->rotation_angle = %f\n", d->rotation_angle); printf("d->tilt_angle = %f\n", d->tilt_angle); } void dorade_print_cell_range_vector(Cell_range_vector *d) { int i; printf("Cell range vector\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->ncells = %d\n", d->ncells); /* for (i=0; incells; i++) printf("d->range_cell[%d] = %f\n", i, d->range_cell[i]); */ } void dorade_print_parameter_desc(Parameter_desc *d) { int i; printf("Parameter Descriptor\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->name = <"); for(i=0; iname); i++) printf("%c", d->name[i]); printf(">\n"); printf("d->description = <"); for(i=0; idescription); i++) printf("%c", d->description[i]); printf(">\n"); printf("d->units = <"); for(i=0; iunits); i++) printf("%c", d->units[i]); printf(">\n"); printf("d->ipp = %d\n", d->ipp); printf("d->xmit_freq = %d\n", d->xmit_freq); printf("d->rcvr_bandwidth = %f\n", d->rcvr_bandwidth); printf("d->pulse_width = %d\n", d->pulse_width); printf("d->polarization = %d\n", d->polarization); printf("d->nsamp_in_dwell_time = %d\n", d->nsamp_in_dwell_time); printf("d->parameter_type = %d\n", d->parameter_type); printf("d->threshold_field = <"); for(i=0; ithreshold_field); i++) printf("%c", d->threshold_field[i]); printf(">\n"); printf("d->threshold_value = %f\n", d->threshold_value); printf("d-> scale_factor = %f\n", d-> scale_factor); printf("d-> offset_factor = %f\n", d-> offset_factor); printf("d-> missing_data_flag = %d\n", d-> missing_data_flag); } void dorade_print_radar_desc(Radar_desc *d) { int i; printf("Radar Descriptor\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("len = %d\n", d->len); printf("d->radar_name = <"); for(i=0; iradar_name); i++) printf("%c", d->radar_name[i]); printf(">\n"); printf("radar_constant = %f\n", d->radar_constant); printf("peak_power = %f\n", d-> peak_power); printf("noise_power = %f\n", d-> noise_power); printf("rcvr_gain = %f\n", d-> rcvr_gain); printf("ant_gain = %f\n", d-> ant_gain); printf("radar_system_gain = %f\n", d-> radar_system_gain); printf("horizontal_beam_width = %f\n", d-> horizontal_beam_width); printf("vertical_beam_width = %f\n", d-> vertical_beam_width); printf("radar_type = %d\n", d->radar_type); printf("scan_mode = %d\n", d-> scan_mode); printf("scan_rate = %f\n", d-> scan_rate); printf("start_angle = %f\n", d-> start_angle); printf("stop_angle = %f\n", d-> stop_angle); printf("nparam_desc = %d\n", d->nparam_desc); printf("ndesc = %d\n", d-> ndesc); printf("compress_code = %d\n", d-> compress_code); printf("compress_algo = %d\n", d-> compress_algo); printf("data_reduction_param1 = %f\n", d-> data_reduction_param1); printf("data_reduction_param2 = %f\n", d-> data_reduction_param2); printf("latitude = %f\n", d-> latitude); printf("longitude = %f\n", d-> longitude); printf("altitude = %f\n", d-> altitude); printf("unambiguous_velocity = %f\n", d-> unambiguous_velocity); printf("unambiguous_range = %f\n", d-> unambiguous_range); printf("nfreq = %d\n", d-> nfreq); printf("npulse_periods = %d\n", d->npulse_periods); for (i=0; i<5; i++) printf("freq[%d] = %f\n", i, d->freq[i]); for (i=0; i<5; i++) printf("period[%d] = %f\n", i, d->period[i]); } void dorade_print_volume_desc(Volume_desc *d) { int i; printf("Volume Descriptor\n"); printf("d->code = <"); for(i=0; icode); i++) printf("%c", d->code[i]); printf(">\n"); printf("version = %d\n", d->version); printf("volume_number = %d\n", d->volume_number); printf("max_bytes = %d\n", d->max_bytes); printf("project_name = <"); for(i=0; iproject_name); i++) printf("%c", d->project_name[i]); printf(">\n"); printf("year = %d\n", d->year); printf("month = %d\n", d->month); printf("day = %d\n", d->day); printf("hour = %d\n", d->hour); printf("minute = %d\n", d->minute); printf("second = %d\n", d->second); printf("flight_num = <"); for(i=0; iflight_num); i++) printf("%c", d->flight_num[i]); printf(">\n"); printf("facility_name = <"); for(i=0; ifacility_name); i++) printf("%c", d->facility_name[i]); printf(">\n"); printf("gen_year = %d\n", d->gen_year); printf("gen_month = %d\n", d->gen_month); printf("gen_day = %d\n", d->gen_day); printf("nsensors = %d\n", d->nsensors); } void dorade_print_comment_block(Comment_block *cb) { int i; printf("COMMENT BLOCK:\n"); printf("cb->code = <"); for(i=0; icode); i++) printf("%c", cb->code[i]); printf(">\n"); printf("cb->len = %d\n", cb->len); printf("cb->comment = <%s>\n", cb->comment); } void dorade_print_sensor(Sensor_desc *s) { int i; dorade_print_radar_desc(s->radar_desc); for (i=0; inparam; i++) { dorade_print_parameter_desc(s->p_desc[i]); printf("=====================================================\n"); } dorade_print_cell_range_vector(s->cell_range_vector); dorade_print_correction_factor_desc(s->correction_factor_desc); } rsl-v1.43/mcgill.c0000644000102200007640000003160007021115215010751 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /****************************************************************** * Opens a Mcgill format radar data file, and reads and * decompresses the contents. * * All Mcgill data structures referenced herein are * defined in the file "mcgill.h". * * There exist 3 functions in this file which are * accessible to application routines: * ----------------------------------------------------- * mcgFile_t *mcgFileOpen(int *code, char *filename); * Opens and verifies the content of a Mcgill format * data file, reads in the file header record, and * initializes the mcgFile_t structure. * ------------------------------------------------------- * int mcgFileClose(mcgFile_t *file); * Closes the Mcgill data file. * ------------------------------------------------------- * int mcgRayBuild(mcgRay_t *ray, mcgFile_t *file); * Returns in the mcgRay_t structure the reflectivity values from * one ray of data from a Mcgill format radar data file. * Successive calls return data from successive rays found * in the file. * * Kolander * *******************************************************************/ #include #include #include #include "mcgill.h" #define TRUE 1 #define FALSE 0 #define EMPTY -1.0 /* Fixed elevation angles for Mcgill sweeps. */ static float elev_angle[3][24] = { /* PAFB volume scan format types 3 and 4 (12 sweeps) */ { 0.6, 1.0, 1.6, 2.5, 3.6, 5.2, 7.5, 10.5, 14.7, 20.2, 27.2, 35.6 }, /* PAFB volume scan format types 1 and 2 (24 sweeps) */ { 0.6, 0.79, 1.01, 1.27, 1.57, 1.93, 2.35, 2.84, 3.41, 4.08, 4.86, 5.78, 6.85, 8.09, 9.55, 11.23, 13.18, 15.42, 17.98, 20.89, 24.16, 27.78, 31.73, 35.97 }, /* Sao Paulo radar?? (20 sweeps) */ { 1.0, 1.3, 1.6, 2.0, 2.4, 2.9, 3.6, 4.2, 5.1, 6.1, 7.3, 8.7, 10.3, 12.2, 14.4, 16.9, 19.8, 23.1, 26.7, 30.8 } }; /* Fixed number_of_bins for Mcgill sweeps. */ static int num_bins_normal[24] = { /* PAFB volume scan formats 1 and 3 (normal mode) */ 240, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180 }; static int num_bins_compressed[24] = { /* PAFB volume scan formats 2 and 4 (compressed mode) */ 180, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120 }; FILE *uncompress_pipe (FILE *fp); /**********************************************************************/ mcgFile_t *mcgFileOpen(int *code, char *filename) /**********************************************************************/ { /* Open a Mcgill format radar data file, and read and verify the content of the first (header) record from the file. This function returns one of the following coded integer values: MCG_OK: Normal return. MCG_OPEN_FILE_ERR: Error occurred while attempting to open the data file. MCG_EOF: Unexpected End_of_File occurred reading from file. MCG_READ_ERR: Error occurred while reading from file. MCG_FORMAT_ERR: Format error encountered reading from file. SYS_NO_SPACE: Error attempting to allocate memory space. */ mcgFile_t *file; char buffer[MCG_RECORD]; char *csp_buffer; /* Allocate space for the mcgFile structure. */ if ((file = (mcgFile_t *)malloc(sizeof(mcgFile_t))) == NULL) { *code = SYS_NO_SPACE; return(NULL); } /* Open Mcgill data file for reading */ if ((file->fp = fopen(filename, "r")) == NULL) { *code = MCG_OPEN_FILE_ERR; return(NULL); } file->fp = uncompress_pipe(file->fp); /* Transparently, use gunzip. */ /* Read first (header) record from data file into buffer */ if (fread(buffer, sizeof(char), MCG_RECORD, file->fp) < MCG_RECORD) { *code = MCG_FORMAT_ERR; return(NULL); } /* Move header values from buffer to the mcgHeader structure.*/ memcpy(&file->head, buffer, sizeof(mcgHeader_t)); /* Check the leading header characters for the site ID string. */ if ((strncmp((char *)&file->head, "PAFB RADAR VOLUME SCAN AT", 25) == 0) || (strncmp((char *)&file->head, "P A B RADAR VOLUME SCAN AT", 27) == 0)) { file->site = MCG_PAFB_1_2; } /* Check if file from Sao Paulo. else if (strncmp((char *)&file->head, SAOP_ID_STRING) == 0) { file->site = MCG_SAOP; } */ else /* Can't identify site/format. */ { *code = MCG_FORMAT_ERR; return(NULL); } /* Check validity of some file header values. If not valid, we assume the file is garbled beyond legibility. */ if ((file->head.vol_scan_format < 1) || (file->head.vol_scan_format > 4) || (file->head.day < 1) || (file->head.day > 31) || (file->head.month < 1) || (file->head.month > 12)) { /* Invalid/unexpected file format */ *code = MCG_FORMAT_ERR; return(NULL); } /* Set the proper number_of_bins, depending on scan format. */ switch (file->head.vol_scan_format) { case 1: case 3: file->num_bins = num_bins_normal; break; case 2: case 4: file->num_bins = num_bins_compressed; break; default: break; } /* end switch */ /* I've never seen scan_formats 3 or 4 from PAFB, but I make allowance for them here. */ if (file->site == MCG_PAFB_1_2) { if ((file->head.vol_scan_format == 3) || (file->head.vol_scan_format == 4)) { file->site = MCG_PAFB_3_4; } } /* If a Mcgill Csp block is contained in this file, it's next. Skip past it. It's useless for our purposes. */ if (file->head.csp_rec == 1) { /* if (fseek(file->fp, MCG_CSP, SEEK_CUR) != 0) { *code = MCG_READ_ERR; return(NULL); } */ /* Allocate buffer space for the csp block, read the block from the disk file into the buffer, then free the buffer. An ugly way to discard the block, but the fseek solution above won't work with stdin capabilities. */ if ((csp_buffer=(char *)malloc(MCG_CSP)) == NULL) { *code = SYS_NO_SPACE; return(NULL); } if (fread(csp_buffer, sizeof(char), MCG_CSP, file->fp) < MCG_CSP) { *code = MCG_READ_ERR; return(NULL); } free(csp_buffer); } /* File is open and properly initialized. */ *code = MCG_OK; return(file); } int rsl_pclose( FILE *stream); /**********************************************************************/ int mcgFileClose(mcgFile_t *file) /**********************************************************************/ { /* Close a Mcgill format radar data file. Returns one of the following coded integer values: MCG_OK: File closed successfully. MCG_CLOSE_FILE_ERR: System error occurred during file close operation. */ if (rsl_pclose(file->fp) == 0) { file->fp = NULL; return(MCG_OK); } else return(MCG_CLOSE_FILE_ERR); } /************************************************************************/ int mcgRecordRead(mcgRecord_t *record, mcgFile_t *file) /************************************************************************/ { /* Reads a Mcgill logical record (2048 bytes) from the data file into the mcgRecord_t structure. Returns one of the following coded integer values: MCG_OK: Successfully read a record. MCG_EOF: End_of_File condition occurred while reading a record. MCG_READ_ERR: Read error occurred. */ /* Read data from file directly into the record structure. */ if (fread(record, sizeof(char), MCG_RECORD, file->fp) < MCG_RECORD) { if (feof(file->fp)) return(MCG_EOF); else return(MCG_READ_ERR); } return(MCG_OK); } /************************************************************************/ mcgSegmentID mcgSegmentKeyIdentify(int key) /************************************************************************/ { /* Decodes the first byte from a Mcgill file segment. The first byte of the segment identifies the type of the segment. Mcgill segment types are data, elevation, and end_of_data. */ if ((key > 0) && (key < 16)) return(MCG_DATA_SEG); else if ((key > 31) && (key < 63)) return(MCG_ELEV_SEG); else if (key == 63) return(MCG_EOD_SEG); else return(MCG_UNDEFINED_SEG); } /*************************************************************************/ int mcgRayBuild(mcgRay_t *ray, mcgFile_t *file) /*************************************************************************/ { /* Returns in the ray structure the reflectivity values from one ray of data from a Mcgill format radar data file. Successive calls to this routine return data from successive rays found in the file. This function returns the following coded integer values: MCG_OK : Ray structure successfully filled with data values. MCG_EOD: Empty ray structure, No more data in file. MCG_EOF: Premature End_of_File condition encountered. MCG_READ_ERR: System error occurred while reading from file. MCG_FORMAT_ERR: Format error encountered while reading from file. */ /* This function is typically called about 9000 times while reading a Mcgill data file. The following static variables must retain their values between successive calls. */ static int seg_num=MCG_MAX_SEG_NUM; static int eod_found = FALSE; static int sweep_num=0; static float elev=0.0; static float azm; int base, j, n; mcgSegmentID seg_type; static mcgRecord_t record; /* If we've previously found the end_of_data (eod) data segment in the last Mcgill record, we're done. Do this for robustness, in case the calling application routine screws up. */ if (eod_found) { return(MCG_EOD); } /* Initialize the ray data values. */ ray->elev = elev; ray->azm = EMPTY; ray->sweep_num = sweep_num; memset(ray->data, 0, 240); ray->num_bins = file->num_bins[sweep_num]; /* Loop to fill the ray bins with data values from consecutive Mcgill data segments. */ while (1) { /* Read in from the Mcgill file a new record, if necessary. */ if (seg_num == MCG_MAX_SEG_NUM) { if ((n=mcgRecordRead(&record, file)) < MCG_OK) return(n); else { /* record_empty = FALSE; */ seg_num = 0; } } /* The first byte of segment is used to identify segment type. */ seg_type = mcgSegmentKeyIdentify(record.segment[seg_num][0]); switch (seg_type) { case MCG_DATA_SEG: /* Determine the azimuth angle for this data segment */ azm = record.segment[seg_num][1] * 64.0 + record.segment[seg_num][2] - 1.0; /* Check if this data segment contains data belonging to the current ray. If so, add the segment bin values to the ray structure. */ if ((azm == ray->azm) || (ray->azm == EMPTY)) { ray->azm = azm; /* Compute the ray bin base_address for the 16 bin values from this data segment. */ base = (record.segment[seg_num][0] - 1)*16; /* Move the 16 bin values from segment to ray structure */ for (j=0; j<16; j++) { ray->data[base + j] = record.segment[seg_num][3+j]; } } else /* This data segment belongs to the next ray. Return the current ray. We'll start with this segment the next time mcgRayBuild() is called. */ { return(MCG_OK); } break; case MCG_ELEV_SEG: sweep_num = record.segment[seg_num][0] - 31 - 1; elev = elev_angle[file->site][sweep_num]; /* If ray structure is not empty, return it, since we've found a Mcgill elevation segment, which initiates a new sweep. */ if (ray->azm != EMPTY) { seg_num += 1; if (seg_num == MCG_MAX_SEG_NUM) /* record_empty = TRUE; */ return(MCG_OK); } else /* Ray structure is empty. Continue on to read the next Mcgill segment.*/ { ray->elev = elev; ray->sweep_num = sweep_num; } break; case MCG_EOD_SEG: eod_found = TRUE; if (ray->azm == EMPTY) return(MCG_EOD); else /* Return the ray structure we've filled. */ return(MCG_OK); break; default: return(MCG_FORMAT_ERR); break; } /* end switch */ seg_num += 1; } /* end while (1) */ } rsl-v1.43/wsr88d_to_radar.c0000644000102200007640000003744111740667507012550 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "rsl.h" #include "wsr88d.h" extern int radar_verbose_flag; /* * These externals can be found in the wsr88d library; secret code. */ void print_head(Wsr88d_file_header wsr88d_file_header); void clear_sweep(Wsr88d_sweep *wsr88d_sweep, int x, int n); void free_and_clear_sweep(Wsr88d_sweep *wsr88d_sweep, int x, int n); /* * Secretly in uf_to_radar.c */ Volume *copy_sweeps_into_volume(Volume *new_volume, Volume *old_volume); void float_to_range(float *x, Range *c, int n, Range (*function)(float x) ) { while (n--) { if (*x == WSR88D_BADVAL) *c = function(BADVAL); else if (*x == WSR88D_RFVAL) *c = function(RFVAL); else *c = function(*x); c++; x++; } } /**********************************************************************/ /* */ /* done 3/23 wsr88d_load_sweep_into_volume */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* March 3, 1994 */ /**********************************************************************/ int wsr88d_load_sweep_into_volume(Wsr88d_sweep ws, Volume *v, int nsweep, unsigned int vmask) { int i; int iray; float v_data[1000]; Range c_data[1000]; int n; int mon, day, year; int hh, mm, ss; float fsec; int vol_cpat; Ray *ray_ptr; Range (*invf)(float x); float (*f)(Range x); /* Allocate memory for MAX_RAYS_IN_SWEEP rays. */ v->sweep[nsweep] = RSL_new_sweep(MAX_RAYS_IN_SWEEP); if (v->sweep[nsweep] == NULL) { perror("wsr88d_load_sweep_into_volume: RSL_new_sweep"); return -1; } v->sweep[nsweep]->h.elev = 0; v->sweep[nsweep]->h.nrays = 0; f = (float (*)(Range x))NULL; invf = (Range (*)(float x))NULL; if (vmask & WSR88D_DZ) { invf = DZ_INVF; f = DZ_F; } if (vmask & WSR88D_VR) { invf = VR_INVF; f = VR_F; } if (vmask & WSR88D_SW) { invf = SW_INVF; f = SW_F; } v->h.invf = invf; v->h.f = f; v->sweep[nsweep]->h.invf = invf; v->sweep[nsweep]->h.f = f; for (i=0,iray=0; i 0) { wsr88d_get_date(ws.ray[i], &mon, &day, &year); wsr88d_get_time(ws.ray[i], &hh, &mm, &ss, &fsec); /* fprintf(stderr,"n %d, mon %d, day %d, year %d, hour %d, min %d, sec %d, fsec %f\n", n, mon, day, year, hh, mm, ss, fsec); */ /* * Load the sweep/ray headar information. */ v->sweep[nsweep]->ray[iray] = RSL_new_ray(n); /*(Range *)calloc(n, sizeof(Range)); */ ray_ptr = v->sweep[nsweep]->ray[iray]; /* Make code below readable. */ ray_ptr->h.f = f; ray_ptr->h.invf = invf; ray_ptr->h.month = mon; ray_ptr->h.day = day; ray_ptr->h.year = year + 1900; /* Yes 1900 makes this year 2000 compliant, due to wsr88d using unix time(). */ ray_ptr->h.hour = hh; ray_ptr->h.minute = mm; ray_ptr->h.sec = ss + fsec; ray_ptr->h.unam_rng = wsr88d_get_range (ws.ray[i]); ray_ptr->h.azimuth = wsr88d_get_azimuth (ws.ray[i]); /* -180 to +180 is converted to 0 to 360 */ if (ray_ptr->h.azimuth < 0) ray_ptr->h.azimuth += 360; ray_ptr->h.ray_num = ws.ray[i]->ray_num; ray_ptr->h.elev = wsr88d_get_elevation_angle(ws.ray[i]); ray_ptr->h.elev_num = ws.ray[i]->elev_num; if (vmask & WSR88D_DZ) { ray_ptr->h.range_bin1 = ws.ray[i]->refl_rng; ray_ptr->h.gate_size = ws.ray[i]->refl_size; } else { ray_ptr->h.range_bin1 = ws.ray[i]->dop_rng; ray_ptr->h.gate_size = ws.ray[i]->dop_size; } ray_ptr->h.vel_res = wsr88d_get_velocity_resolution(ws.ray[i]); vol_cpat = wsr88d_get_volume_coverage(ws.ray[i]); switch (vol_cpat) { case 11: ray_ptr->h.sweep_rate = 16.0/5.0; break; case 12: ray_ptr->h.sweep_rate = 17.0/4.2; break; case 21: ray_ptr->h.sweep_rate = 11.0/6.0; break; case 31: ray_ptr->h.sweep_rate = 8.0/10.0; break; case 32: ray_ptr->h.sweep_rate = 7.0/10.0; break; case 121:ray_ptr->h.sweep_rate = 20.0/5.5; break; default: ray_ptr->h.sweep_rate = 0.0; break; } ray_ptr->h.nyq_vel = wsr88d_get_nyquist(ws.ray[i]); ray_ptr->h.azim_rate = wsr88d_get_azimuth_rate(ws.ray[i]); ray_ptr->h.fix_angle = wsr88d_get_fix_angle(ws.ray[i]); ray_ptr->h.pulse_count = wsr88d_get_pulse_count(ws.ray[i]); ray_ptr->h.pulse_width = wsr88d_get_pulse_width(ws.ray[i]); ray_ptr->h.beam_width = .95; ray_ptr->h.prf = wsr88d_get_prf(ws.ray[i]); ray_ptr->h.frequency = wsr88d_get_frequency(ws.ray[i]); ray_ptr->h.wavelength = 0.1071; /* Previously called * wsr88d_get_wavelength(ws.ray[i]). * See wsr88d.c for explanation. */ /* It is no coincidence that the 'vmask' and wsr88d datatype * values are the same. We expect 'vmask' to be one of * REFL_MASK, VEL_MASK, or SW_MASK. These match WSR88D_DZ, * WSR88D_VR, and WSR88D_SW in the wsr88d library. */ ray_ptr->h.nbins = n; memcpy(ray_ptr->range, c_data, n*sizeof(Range)); v->sweep[nsweep]->h.nrays = iray+1; v->sweep[nsweep]->h.elev += ray_ptr->h.elev; v->sweep[nsweep]->h.sweep_num = ray_ptr->h.elev_num; iray++; } } } v->sweep[nsweep]->h.beam_width = .95; v->sweep[nsweep]->h.vert_half_bw = .475; v->sweep[nsweep]->h.horz_half_bw = .475; /* Now calculate the mean elevation angle for this sweep. */ if (v->sweep[nsweep]->h.nrays > 0) v->sweep[nsweep]->h.elev /= v->sweep[nsweep]->h.nrays; else { RSL_free_sweep(v->sweep[nsweep]); /* No rays loaded, free this sweep. */ v->sweep[nsweep] = NULL; } return 0; } /**********************************************************************/ /* */ /* RSL_wsr88d_to_radar */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* March 3, 1994 */ /**********************************************************************/ Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file) /* * Gets all volumes from the nexrad file. Input file is 'infile'. * Site information is extracted from 'call_or_first_tape_file'; this * is typically a disk file called 'nex.file.1'. * * -or- * * Uses the string in 'call_or_first_tape_file' as the 4 character call sign * for the sight. All UPPERCASE characters. Normally, this call sign * is extracted from the file 'nex.file.1'. * * Returns a pointer to a Radar structure; that contains the different * Volumes of data. */ { Radar *radar; Volume *new_volume; Wsr88d_file *wf; Wsr88d_sweep wsr88d_sweep; Wsr88d_file_header wsr88d_file_header; Wsr88d_tape_header wsr88d_tape_header; int n; int nsweep; int i; int iv; int nvolumes; int volume_mask[] = {WSR88D_DZ, WSR88D_VR, WSR88D_SW}; char *field_str[] = {"Reflectivity", "Velocity", "Spectrum width"}; Wsr88d_site_info *sitep; char site_id_str[5]; char *the_file; int expected_msgtype = 0; char version[8]; extern int rsl_qfield[]; /* See RSL_select_fields in volume.c */ extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; Radar *wsr88d_load_m31_into_radar(Wsr88d_file *wf); sitep = NULL; /* Determine the site quasi automatically. Here is the procedure: * 1. Determine if we have a call sign. * 2. Try reading 'call_or_first_tape_file' from disk. This is done via * wsr88d_read_tape_header. * 3. If no valid site info, abort. */ if (call_or_first_tape_file == NULL) { fprintf(stderr, "wsr88d_to_radar: No valid site ID info provided.\n"); return(NULL); } else if (strlen(call_or_first_tape_file) == 4) sitep = wsr88d_get_site(call_or_first_tape_file); else if (strlen(call_or_first_tape_file) == 0) { fprintf(stderr, "wsr88d_to_radar: No valid site ID info provided.\n"); return(NULL); } if (sitep == NULL) if (wsr88d_read_tape_header(call_or_first_tape_file, &wsr88d_tape_header) > 0) { memcpy(site_id_str, wsr88d_tape_header.site_id, 4); sitep = wsr88d_get_site(site_id_str); } if (sitep == NULL) { fprintf(stderr,"wsr88d_to_radar: No valid site ID info found.\n"); return(NULL); } if (radar_verbose_flag) fprintf(stderr,"SITE: %c%c%c%c\n", sitep->name[0], sitep->name[1], sitep->name[2], sitep->name[3]); memset(&wsr88d_sweep, 0, sizeof(Wsr88d_sweep)); /* Initialize to 0 a * heavily used variable. */ /* 1. Open the input wsr88d file. */ if (infile == NULL) the_file = "stdin"; /* wsr88d.c understands this to * mean read from stdin. */ else the_file = infile; if ((wf = wsr88d_open(the_file)) == NULL) { wsr88d_perror(the_file); return NULL; } /* 2. Read wsr88d headers. */ /* Return # bytes, 0 or neg. on fail. */ n = wsr88d_read_file_header(wf, &wsr88d_file_header); /* * Get the expected digital radar message type based on version string * from the Archive II header. The message type is 31 for Build 10, and 1 * for prior builds. Note that we consider AR2V0001 to be message type 1, * because it has been in the past, but with Build 10 this officially * becomes the version number for Evansville (KVWX), which will use message * type 31. This could be a problem if RSL is used to process KVWX. */ if (n > 0) { strncpy(version, wsr88d_file_header.title.filename, 8); if (strncmp(version,"AR2V0007",8) == 0 || strncmp(version,"AR2V0006",8) == 0 || strncmp(version,"AR2V0004",8) == 0 || strncmp(version,"AR2V0003",8) == 0 || strncmp(version,"AR2V0002",8) == 0) { expected_msgtype = 31; } else if (strncmp(version,"ARCHIVE2",8) == 0 || strncmp(version,"AR2V0001",8) == 0) { expected_msgtype = 1; } } if (n <= 0 || expected_msgtype == 0) { fprintf(stderr,"RSL_wsr88d_to_radar: "); if (n <= 0) fprintf(stderr,"wsr88d_read_file_header failed\n"); else fprintf(stderr,"Archive II header contains unknown version " ": '%s'\n", version); wsr88d_close(wf); return NULL; } if (radar_verbose_flag) print_head(wsr88d_file_header); if (expected_msgtype == 31) { /* Get radar for message type 31. */ nvolumes = 6; radar = wsr88d_load_m31_into_radar(wf); if (radar == NULL) return NULL; } else { /* Get radar for message type 1. */ nvolumes = 3; /* Allocate all Volume pointers. */ radar = RSL_new_radar(MAX_RADAR_VOLUMES); if (radar == NULL) return NULL; /* Clear the sweep pointers. */ clear_sweep(&wsr88d_sweep, 0, MAX_RAYS_IN_SWEEP); /* Allocate a maximum of 30 sweeps for the volume. */ /* Order is important. WSR88D_DZ, WSR88D_VR, WSR88D_SW, is * assigned to the indexes DZ_INDEX, VR_INDEX and SW_INDEX respectively. */ for (iv=0; ivv[iv] = RSL_new_volume(20); /* LOOP until EOF */ nsweep = 0; for (;(n = wsr88d_read_sweep(wf, &wsr88d_sweep)) > 0; nsweep++) { if (rsl_qsweep != NULL) { if (nsweep > rsl_qsweep_max) break; if (rsl_qsweep[nsweep] == 0) continue; } if (radar_verbose_flag) fprintf(stderr,"Processing for SWEEP # %d\n", nsweep); /* wsr88d_print_sweep_info(&wsr88d_sweep); */ for (iv=0; iv= radar->v[iv]->h.nsweeps) { if (radar_verbose_flag) fprintf(stderr,"Exceeded sweep allocation of %d. " "Adding 20 more.\n", nsweep); new_volume = RSL_new_volume(radar->v[iv]->h.nsweeps+20); new_volume = copy_sweeps_into_volume(new_volume, radar->v[iv]); radar->v[iv] = new_volume; } if (wsr88d_load_sweep_into_volume(wsr88d_sweep, radar->v[iv], nsweep, volume_mask[iv]) != 0) { RSL_free_radar(radar); return NULL; } } } if (nsweep == 0) { /* Get Volume Coverage Pattern number for radar header. */ i=0; while (i < MAX_RAYS_IN_SWEEP && wsr88d_sweep.ray[i] == NULL) i++; if (i < MAX_RAYS_IN_SWEEP) radar->h.vcp = wsr88d_get_volume_coverage( wsr88d_sweep.ray[i]); } free_and_clear_sweep(&wsr88d_sweep, 0, MAX_RAYS_IN_SWEEP); } for (iv=0; ivv[iv]->h.type_str = strdup(field_str[iv]); radar->v[iv]->h.nsweeps = nsweep; } } } wsr88d_close(wf); /* * Here we will assign the Radar_header information. Take most of it * from an existing volume's header. */ radar_load_date_time(radar); /* Magic :-) */ radar->h.number = sitep->number; memcpy(&radar->h.name, sitep->name, sizeof(sitep->name)); memcpy(&radar->h.radar_name, sitep->name, sizeof(sitep->name)); /* Redundant */ memcpy(&radar->h.city, sitep->city, sizeof(sitep->city)); memcpy(&radar->h.state, sitep->state, sizeof(sitep->state)); strcpy(radar->h.radar_type, "wsr88d"); radar->h.latd = sitep->latd; radar->h.latm = sitep->latm; radar->h.lats = sitep->lats; if (radar->h.latd < 0) { /* Degree/min/sec all the same sign */ radar->h.latm *= -1; radar->h.lats *= -1; } radar->h.lond = sitep->lond; radar->h.lonm = sitep->lonm; radar->h.lons = sitep->lons; if (radar->h.lond < 0) { /* Degree/min/sec all the same sign */ radar->h.lonm *= -1; radar->h.lons *= -1; } radar->h.height = sitep->height; radar->h.spulse = sitep->spulse; radar->h.lpulse = sitep->lpulse; free(sitep); radar = RSL_prune_radar(radar); return radar; } rsl-v1.43/rapic.h0000644000102200007640000001012611565532707010626 00000000000000/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { IMAGE = 258, IMAGESCANS = 259, IMAGESIZE = 260, IMAGEEND = 261, SCAN = 262, IMAGEHEADEREND = 263, NUMBER = 264, ALPHA = 265, FLOATNUMBER = 266, BRACKETNUM = 267, COUNTRY = 268, NAME = 269, STNID = 270, LATITUDE = 271, LONGITUDE = 272, HEIGHT = 273, DATE = 274, TIME = 275, TIMESTAMP = 276, VERS = 277, FREQUENCY = 278, PRF = 279, PULSELENGTH = 280, RNGRES = 281, ANGRES = 282, ANGLERATE = 283, CLEARAIR = 284, ON = 285, OFF = 286, VIDRES = 287, STARTRNG = 288, ENDRNG = 289, PRODUCT = 290, PASS = 291, IMGFMT = 292, ELEV = 293, VIDEO = 294, VELLVL = 295, NYQUIST = 296, UNFOLDING = 297, AT = 298, VOLUMETRIC = 299, NORMAL = 300, OF = 301, REFL = 302, VEL = 303, UNCORREFL = 304, ZDR = 305, WID = 306, NONE = 307, RAYDATA = 308, ENDRADARIMAGE = 309 }; #endif /* Tokens. */ #define IMAGE 258 #define IMAGESCANS 259 #define IMAGESIZE 260 #define IMAGEEND 261 #define SCAN 262 #define IMAGEHEADEREND 263 #define NUMBER 264 #define ALPHA 265 #define FLOATNUMBER 266 #define BRACKETNUM 267 #define COUNTRY 268 #define NAME 269 #define STNID 270 #define LATITUDE 271 #define LONGITUDE 272 #define HEIGHT 273 #define DATE 274 #define TIME 275 #define TIMESTAMP 276 #define VERS 277 #define FREQUENCY 278 #define PRF 279 #define PULSELENGTH 280 #define RNGRES 281 #define ANGRES 282 #define ANGLERATE 283 #define CLEARAIR 284 #define ON 285 #define OFF 286 #define VIDRES 287 #define STARTRNG 288 #define ENDRNG 289 #define PRODUCT 290 #define PASS 291 #define IMGFMT 292 #define ELEV 293 #define VIDEO 294 #define VELLVL 295 #define NYQUIST 296 #define UNFOLDING 297 #define AT 298 #define VOLUMETRIC 299 #define NORMAL 300 #define OF 301 #define REFL 302 #define VEL 303 #define UNCORREFL 304 #define ZDR 305 #define WID 306 #define NONE 307 #define RAYDATA 308 #define ENDRADARIMAGE 309 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 326 "rapic.y" { Charlen token; } /* Line 1529 of yacc.c. */ #line 161 "rapic.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE rapiclval; rsl-v1.43/THANKS0000644000102200007640000000051111747552537010274 00000000000000Thanks to the following folks who helped make RSL a better product. Ther contributions include reporting bugs, offering suggestions, and sending code for bug fixes. Thanks again! Cesar Beneti Thiago Biscaro Stacy Brodzik Eric Bruning Scott Collis Patrick Gatlin John Hall David Kingsmill Fabio Sato Daniel Sheldon Andy Spencer rsl-v1.43/nsig.c0000644000102200007640000004722611666020131010457 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Read SIGMET version 1 and version 2 formatted files. * * Data is written in little-endian format for version 1 files. * This means that on big endian machines, bytes must be swapped. * This is auto-detected and all swapping is automatic. * * Note that this is different in SIGMET version 2 data files. There * the data is written in big-endian format (written w/ an IRIS computer). * For that case, the byte swapping logic is reversed. * * The highest level functions provided is: * nsig_read_sweep -- Read an entire sweep including all fields. * Call it until NULL is returned. That indicates * end-of-file. *---------------------------------------------------------------------- * 8/13/96 * * John H. Merritt * Space Applications Corp. * NASA/GSFC Code 910.1 * * Copyright 1996 */ #include #include #include #include #include "nsig.h" FILE *uncompress_pipe(FILE *fp); int big_endian(void); int little_endian(void); void swap_4_bytes(void *word); void swap_2_bytes(void *word); int rsl_pclose(FILE *fp); /********************************************************************* * Open a file and possibly setup a gunzip pipe * *********************************************************************/ FILE *nsig_open(char *file_name) { FILE *fp; int save_fd; /* Open input file */ if (file_name == NULL) { /* Use stdin */ save_fd = dup(0); fp = fdopen(save_fd, "r"); } else if((fp = fopen(file_name,"r")) == NULL) { perror(file_name); return fp; } fp = uncompress_pipe(fp); /* Transparently gunzip. */ return fp; } /********************************************************************** * Given an opened file stream read in the headers and fill in * * the nsig_file data structure. * **********************************************************************/ int nsig_read_record(FILE *fp, char *nsig_rec) { int n; int nbytes; char *buf; /* Input could be a chain of pipes. So read until no more data. * For instance, a gzip pipe will write chunks of 4096 bytes, * even when there is really more that we want to read. */ /* Return the number of bytes read. */ buf = (char *)nsig_rec; if (feof(fp)) return -1; nbytes = 0; while((n = fread(&buf[nbytes], sizeof(char), NSIG_BLOCK-nbytes, fp)) > 0) { nbytes += n; } return nbytes; } /********************************************************* * Close nsig file * *********************************************************/ void nsig_close(FILE *fp) { rsl_pclose(fp); } static int do_swap; int nsig_endianess(NSIG_Record1 *rec1) { /* * If NSIG is version1 and on big-endian, then swap. * If NSIG is version2 and on little-endian, then swap. */ /* printf("id = %d %d\n", (int)rec1->struct_head.id[0], (int)rec1->struct_head.id[1]); */ if (rec1->struct_head.id[0] == 0) { /* Possible little-endian */ if (rec1->struct_head.id[1] >= 20) /* This is a big-endian file. Typically, version 2. */ do_swap = little_endian(); else do_swap = big_endian(); } else if ((rec1->struct_head.id[1] == 0)) { /* Possible big-endian */ if (rec1->struct_head.id[0] <= 7) /* This is a little-endian file. Version 1. */ do_swap = big_endian(); } /* printf("DO SWAP = %d\n", do_swap); */ return do_swap; } short NSIG_I2 (twob x) {/* x is already a pointer. */ short s; memmove(&s, x, sizeof(twob)); if (do_swap) swap_2_bytes(&s); return s; } int NSIG_I4 (fourb x) { /* x is already a pointer. */ int i; memmove(&i, x, sizeof(fourb)); if (do_swap) swap_4_bytes(&i); return i; } void nsig_free_ray(NSIG_Ray *r) { if (r == NULL) return; free(r->range); free(r); } void nsig_free_sweep(NSIG_Sweep **s) { int i=0,itype; if (s == NULL) return; for (itype=0; itypenparams; itype++) { if (s[itype] == NULL) continue; if (s[itype]->idh.data_type == NSIG_DTB_EXH) free(s[itype]->ray[i]); else { for (i=0; iidh.num_rays_act); i++) nsig_free_ray(s[itype]->ray[i]); } free(s[itype]->ray); free(s[itype]); } free(s); } static int ipos = 0; /* Current position in the data buffer. */ static NSIG_Data_record data; int nsig_read_chunk(FILE *fp, char *chunk) { int i, n; int the_code; int nwords, end_nwords; /* The information saved from call to call is 'data' and represents * the data that has been buffered. When new data is needed * it will be read from the file. 'ipos' is global and initially * set in 'nsig_read_sweep'. Assumptions: chunk is big enough. * * Return number of bytes in 'chunk' -- this variable is 'i'. */ i = n = 0; the_code = 0; #define Vprint #undef Vprint while(the_code != 1) { if (feof(fp)) return -1; if (ipos == sizeof(data)) { /* the_code is in the next chunk */ #ifdef Vprint printf("Exceeded block size looking for the_code. Get it from next buffer.\n"); #endif n = nsig_read_record(fp, (char *)data); if (n <= 0) return n; /* Problem. */ #ifdef Vprint printf("Read %d bytes.\n", n); printf("Resetting ipos\n"); #endif ipos = sizeof(NSIG_Raw_prod_bhdr); } #ifdef Vprint printf("ipos = %d -- ", ipos); #endif the_code = NSIG_I2(&data[ipos]); #ifdef Vprint printf("the_code = %d (%d) -- ", the_code, (unsigned short)the_code); #endif ipos += sizeof(twob); if (the_code < 0) { /* THIS IS DATA */ nwords = the_code & 0x7fff; #ifdef Vprint printf("#data words (2-bytes) is %d\n", nwords); #endif if (ipos + sizeof(twob)*nwords > sizeof(data)) { #ifdef Vprint printf("Exceeded block size... transferring and reading new (i=%d).\n", i); #endif /* Need another phyical block. */ /* But, first transfer the remainder to the output chunk. */ /* And, transfer begining of next block */ /* Transfer end of current buffer. */ end_nwords = (NSIG_BLOCK - ipos)/sizeof(twob); memmove(&chunk[i], &data[ipos], sizeof(twob)*end_nwords); i += end_nwords * sizeof(twob); n = nsig_read_record(fp, (char *)data); if (n <= 0) return n; /* Problem. */ /* New ipos */ nwords -= end_nwords; ipos = sizeof(NSIG_Raw_prod_bhdr); /* Transfer beginning of new buffer */ if (i+nwords * sizeof(twob) > NSIG_BLOCK) return -1; memmove(&chunk[i], &data[ipos], sizeof(twob) * nwords); i += nwords * sizeof(twob); ipos += nwords * sizeof(twob); #ifdef Vprint printf("Words to transfer (at end of block) is %d\n", end_nwords); printf("Transfer %d words from beginning of next buffer.\n", nwords); printf("ipos in new buffer is %d\n", ipos); #endif } else { /* Normal situation. Position to end of data. * But, first transfer it to the chunk. */ if (i+nwords * sizeof(twob) > NSIG_BLOCK) return -1; memmove(&chunk[i], &data[ipos], sizeof(twob) * nwords); i += nwords * sizeof(twob); ipos += sizeof(twob) * nwords; } } else if (the_code == 1) { /* END OF THE RAY. */ #ifdef Vprint printf("------------------------------> Reached end of ray.\n"); #endif break; /* or continue; */ } else if (the_code == 0) { /* UNKNOWN */ break; } else { /* NUMBER OF ZERO's */ #ifdef Vprint printf("#000000000000 to skip is %d (i=%d)\n", the_code, i); #endif if (i+the_code * sizeof(twob) > NSIG_BLOCK) return -1; memset(&chunk[i], 0, the_code*sizeof(twob)); i += the_code * sizeof(twob); } if (ipos >= sizeof(data)) { #ifdef Vprint printf("Exceeded block size ... ipos = %d\n", ipos); printf("This should be right at the end of the block.\n"); #endif n = nsig_read_record(fp, (char *)data); if (n <= 0) return n; /* Problem. */ ipos = sizeof(NSIG_Raw_prod_bhdr); } } /* End while. */ return i; } NSIG_Ext_header_ver0 *nsig_read_ext_header_ver0(FILE *fp) { NSIG_Data_record chunk; int n; NSIG_Ext_header_ver0 *xh0; xh0 = NULL; n = nsig_read_chunk(fp, (char *)chunk); if (n <= 0) return xh0; #ifdef Vprint printf("Ver0 x-header. %d bytes found.\n", n); #endif n -= sizeof(NSIG_Ray_header); xh0 = (NSIG_Ext_header_ver0 *)calloc(1, n); if (xh0) memmove(xh0, &chunk[sizeof(NSIG_Ray_header)], n); return xh0; } NSIG_Ext_header_ver1 *nsig_read_ext_header_ver1(FILE *fp) { NSIG_Data_record chunk; int n; NSIG_Ext_header_ver1 *xh1; xh1 = NULL; n = nsig_read_chunk(fp, (char *)chunk); if (n <= 0) return xh1; #ifdef Vprint printf("Ver1 x-header. %d bytes found.\n", n); #endif n -= sizeof(NSIG_Ray_header); xh1 = (NSIG_Ext_header_ver1 *)calloc(1, n); if (xh1) memmove(xh1, &chunk[sizeof(NSIG_Ray_header)], n); return xh1; } NSIG_Ray *nsig_read_ray(FILE *fp) { int n, nbins; NSIG_Ray_header rayh; static NSIG_Data_record chunk; NSIG_Ray *ray; n = nsig_read_chunk(fp, (char *)chunk); /* Size of chunk is n */ if (n == 0) return NULL; /* Silent error. */ if (n < 0) { fprintf(stderr, "nsig_read_ray: chunk return code = %d.\n", n); return NULL; } if (n > NSIG_BLOCK) { /* Whoa! */ fprintf(stderr, "nsig_read_ray: chunk bigger than buffer. n = %d,\ maximum block size allowed is %d\n", n, NSIG_BLOCK); return NULL; } ray = (NSIG_Ray *) calloc(1, sizeof(NSIG_Ray)); memcpy(&ray->h, chunk, sizeof(NSIG_Ray_header)); n -= sizeof(NSIG_Ray_header); #ifdef Vprint printf("nsig_read_ray: allocating %d bytes for range\n", n); #endif memcpy(&rayh, chunk, sizeof(NSIG_Ray_header)); nbins = NSIG_I2(rayh.num_bins); if (nbins <= 0) return NULL; #ifdef Vprint printf(" rayh.num_bins = %d (nbins %d, n %d)\n", NSIG_I2(rayh.num_bins), nbins, n); #endif ray->range = (unsigned char *)calloc(n, sizeof(unsigned char)); /* Changed calloc nbins to calloc n for 2-byte data. ray->range = (unsigned char *)calloc(nbins, sizeof(unsigned char)); memmove(ray->range, &chunk[sizeof(NSIG_Ray_header)], nbins); Can remove this commented-out code once we know changes work. */ memmove(ray->range, &chunk[sizeof(NSIG_Ray_header)], n); return ray; } NSIG_Sweep **nsig_read_sweep(FILE *fp, NSIG_Product_file *prod_file) { NSIG_Sweep **s; int i, j, n; NSIG_Ingest_data_header **idh = NULL; NSIG_Raw_prod_bhdr *bhdr = NULL; NSIG_Ray *nsig_ray; int data_mask, iray, nrays[12], max_rays; int masks[5]; int nparams; int is_new_ray; int idtype[12]; int is_new_sweep; int xh_size; NSIG_Ext_header_ver0 *exh0; NSIG_Ext_header_ver1 *exh1; /* * The organization of a RAW PRODUCT FILE: (page III-38) * * Record #1 { 0, 0, 0... } * Record #2 { 0, 0, 0... } * Record #3 { Data...} \ * Record #4 { Data...} \ * . . . | Data for * . . . / Sweep * Record #N { Data 0...} / #1 * Record #N+1 { Data...} \ * Record #N+2 { Data...} \ * . . . | Data for * . . . / Sweep * Record #M { Data 0...} / #2 * * What about the order of info in 'Data'? * Data, when it begins a sweep: * a. Raw Product Bhdr * b. Ingest data header for param 1 * . * . * Ingest data header for param n+1 * c. Ray header * d. Ray data * * Ray header and Ray data are encoded with the compression algorithm. * If Ray data spans more than one physical NSIG BLOCK (6144 bytes), * then the 'Data' consists of: * a. Raw Product Bhdr * b. Ray header * c. Ray data * * It is just missing all the Ingest data header fields. */ #define Vprint #undef Vprint /* Determine if we need to byte-swap values. */ (void)nsig_endianess(&prod_file->rec1); /* Setup the array of ingest data headers [0..nparams-1] */ #ifdef NSIG_VER2 memmove(&masks[0], prod_file->rec2.task_config.dsp_info.data_mask_cur.mask_word_0, sizeof(fourb)); memmove(&masks[1], &prod_file->rec2.task_config.dsp_info.data_mask_cur.mask_word_1, 4*sizeof(fourb)); nparams = 0; for (j=0; j < 5; j++) { data_mask = masks[j]; for (i=0; i<32; i++) nparams += (data_mask >> i) & 0x1; } #else memmove(&data_mask, prod_file->rec2.task_config.dsp_info.data_mask, sizeof(fourb)); for (nparams=i=0; i<32; i++) nparams += (data_mask >> i) & 0x1; #ifdef Vprint printf("data_mask %x\n", data_mask); #endif #endif /* Number of sweeps */ #ifdef Vprint {int nsweeps; nsweeps = NSIG_I2(prod_file->rec2.task_config.scan_info.num_swp); printf("nsig2.c:::nparams = %d, nsweeps = %d\n", nparams, nsweeps); } #endif if (idh == NULL) { idh = (NSIG_Ingest_data_header **)calloc(nparams, sizeof(NSIG_Ingest_data_header *)); ipos = 0; for (i=0; idata; } xh_size = NSIG_I2(prod_file->rec2.ingest_head.size_ext_ray_headers); #ifdef Vprint {int rh_size; rh_size = NSIG_I2(prod_file->rec2.ingest_head.size_ray_headers); printf("Extended header is %d bytes long.\n", xh_size); printf(" Ray header is %d bytes long.\n", rh_size); } #endif is_new_ray = 1; is_new_sweep = 1; max_rays = NSIG_I2(prod_file->rec2.ingest_head.num_rays); /* Ingest initial block for the sweep. All remaining I/O will * be performed in the de-compression loop. */ if (feof(fp)) return NULL; n = nsig_read_record(fp, (char *)data); if (n <= 0) return NULL; #ifdef Vprint printf("Read %d bytes for data.\n", n); #endif /* This is a NEW sweep. */ iray = 0; #ifdef Vprint {int isweep; isweep = NSIG_I2(idh[0]->sweep_num); printf("Number of rays in sweep %d is %d\n", isweep, max_rays); } #endif /* Allocate memory for sweep. */ s = (NSIG_Sweep **) calloc (nparams, sizeof(NSIG_Sweep*)); /* Now pointers to all possible rays. */ for (i=0; inparams = nparams; memmove(&s[i]->bhdr, &bhdr, sizeof(NSIG_Raw_prod_bhdr)); memmove(&s[i]->idh, idh[i], sizeof(NSIG_Ingest_data_header)); s[i]->ray = (NSIG_Ray **) calloc (max_rays, sizeof(NSIG_Ray *)); } /* Process this sweep. Keep track of the end of the ray. */ ipos = sizeof(NSIG_Raw_prod_bhdr); /* Position in the 'data' array */ max_rays = 0; for (i=0; idata_type); nrays[i] = (int)NSIG_I2(idh[i]->num_rays_act); if (nrays[i] > max_rays) max_rays = nrays[i]; #ifdef Vprint printf("New ray: parameter %d has idtype=%d\n", i, idtype[i]); printf("Number of expected rays in sweep %d is %d\n", isweep, (int)NSIG_I2(idh[i]->num_rays_exp)); printf("Number of actual rays in sweep %d is %d\n", isweep, (int)NSIG_I2(idh[i]->num_rays_act)); #endif } if (is_new_sweep) ipos += nparams * sizeof(NSIG_Ingest_data_header); /* ipos = sizeof(NSIG_Raw_prod_bhdr) + nparams*sizeof(NSIG_Ingest_data_header); */ /* 'iray' is the true ray index into 's', whereas, 'nsig_iray' is what * the NSIG file says it is. I'll trust 'iray' * * I have a cursor into the 'data' buffer representing my current * position for processing rays. This cursor will dictate if I read * a new NSIG block. The cursor is call 'ipos'. It is initialized * each time a new ray is encountered. */ #ifdef Vprint { int ioff, nsig_iray; /* Check that all idh pointers 'id' is Ingest data header. */ ioff = NSIG_I2(bhdr->ray_loc); nsig_iray = NSIG_I2(bhdr->ray_num); printf("Offset to begining of ray %d is %d, iray=%d\n", nsig_iray, ioff,iray); } #endif /* DECODE THE DATA HERE */ /* From III-39 */ /* * Table 3.5-5 * Compression Code Meanings * * MSB LOW-bits Meaning * 0 0 * 0 1 End of ray. * 0 2 * 0 3-32767 3 to 32767 zeros skipped. * 1 0 * 1 1-32767 1 to 32767 data words follow. */ do { #ifdef Vprint printf("---------------------- New Ray <%d> --------------------\n", iray); #endif if (feof(fp)) { /* Premature eof */ return NULL; /* This will have to do. */ } /* For all parameters present. */ is_new_ray = 0; for (i=0; irange = (unsigned char *)exh0; } } else { exh1 = nsig_read_ext_header_ver1(fp); if (exh1) { nsig_ray = (NSIG_Ray *)calloc(1, sizeof(NSIG_Ray)); nsig_ray->range = (unsigned char *)exh1; } } } if (nsig_ray) is_new_ray = 1; if (iray > nrays[i]) break; s[i]->ray[iray] = nsig_ray; } /* End for */ if (is_new_ray) iray++; } while (iray < max_rays); #ifdef Vprint printf("iray = %d\n", iray); #endif return s; } /************************************************** * Convert 2 byte binary angle to floating point * **************************************************/ float nsig_from_bang(bang in) { float result,maxval = 65536.0; unsigned short bi_ang; memmove(&bi_ang, in, sizeof(bang)); if (do_swap) swap_2_bytes(&bi_ang); result = ((float)(bi_ang)/maxval) * 360.0; return (result); } /************************************************* * convert 4 byte binary angle to floating point * *************************************************/ float nsig_from_fourb_ang(fourb ang) { double result,maxval; unsigned int bi_ang; maxval = 4294967296.0; memmove(&bi_ang, ang, sizeof(fourb)); if (do_swap) swap_4_bytes(&bi_ang); result = ((double)(bi_ang)/maxval) * 360.0; return ((float)result); } rsl-v1.43/configure.in0000644000102200007640000000477311747610566011705 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(rsl, v1.43) AC_CONFIG_SRCDIR(volume.c) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) dnl Default for GVS and friends. AC_PREFIX_DEFAULT(/usr/local/trmm) dnl Checks for programs. AC_PROG_CC AM_PROG_LIBTOOL AC_PROG_YACC AM_PROG_LEX AC_PROG_LN_S AC_PROG_RANLIB dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_STRUCT_TM dnl Checks for library functions. dnl AC_FUNC_SETVBUF_REVERSED AC_CHECK_FUNCS(mktime strdup strstr) dnl I would like lassen to be defined. Override this in config.h. AC_DEFINE(HAVE_LASSEN, 1, [For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you don't want LASSEN.]) dnl Checks for libraries. if test $prefix = NONE; then prefix=$ac_default_prefix fi LIBDIR="-L$prefix/lib" LIBS="-lz -lm" # The order of the libraries is important. # This works: # -lrsl -limplode -letor -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm # # If mounting with shared libraries we may have to specify all possible libraries. # First check with simple LIBS list, if it fails, then expand the list. AC_CHECK_LIB(implode, _implode, ,,$LIBDIR) AC_CHECK_LIB(jpeg, jpeg_CreateCompress,,,$LIBDIR) AC_CHECK_LIB(df, DFopen, ,,$LIBDIR) AC_CHECK_LIB(mfhdf, SDstart, ,,$LIBDIR) AC_CHECK_LIB(tsdistk, TKopen, ,,$LIBDIR) # Because -letor may depend on RSL being installed, just check for # the library libetor.a in a couple of places. dnl For autoheader, generate template for HAVE_LIBETOR. AH_TEMPLATE(HAVE_LIBETOR,[For EDGE capability. Change this to '#define HAVE_LIBETOR 1', if you have libetor -- the EDGE decoding library.]) L="" if test "$L" = ""; then # Check for the file directly. AC_CHECK_FILE($prefix/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR)) fi if test "$L" = ""; then # Check for the file directly. AC_CHECK_FILE(/usr/local/lib/libetor.a, L="-letor -lrsl -letor"; AC_DEFINE(HAVE_LIBETOR)) fi if test "$L" != ""; then # libetor exists. LIBS="$LIBDIR $L $LIBS" else LIBS="$LIBDIR $LIBS" fi # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not. YYWRAP="" AC_CHECK_LIB(tsdistk, yywrap, YYWRAP="yes",,$LIBDIR) if test "$YYWRAP" = ""; then LIBS="$LIBS $LEXLIB" fi AC_MSG_RESULT(LIBS = $LIBS) AC_CONFIG_FILES([Makefile colors/Makefile doc/Makefile examples/Makefile]) AC_OUTPUT rsl-v1.43/lassen_to_radar.c0000644000102200007640000003651011565520526012664 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Jan 1998 Michael Whimpey from BMRC, Australia changed code, for the different callibrations, between, Pre_mctex, mctex, Gunn_Pt periods. 22 Apr 1999 Michael Whimpey added more callibration periods over berrimah and scsmex. please see code where there is m.whimpey */ #include #include #include #include #include #define USE_RSL_VARS #include "rsl.h" #ifdef HAVE_LASSEN #include "lassen.h" extern int radar_verbose_flag; /* Some parameter headaches are prevented when vol is declared global. */ Lassen_volume vol; extern int read_entire_lassen_file(FILE *f, Lassen_volume *vol); /**********************************************************************/ /* */ /* lassen_load_sweep */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* May 26, 1994 */ /**********************************************************************/ void lassen_load_sweep(Sweep *s, int isweep_num, int ifield, int period, Lassen_sweep *ptr) { float c = RSL_SPEED_OF_LIGHT; float elev; Lassen_ray *aray; unsigned char *ray_data; int i,j,m,kk=0; float x[2000]; double Vu; Range (*invf)(float x); float (*f)(Range x); /* calibration period flags m.whimpey */ #define BERRIMAH1 0 #define MCTEX_EARLY 1 #define MCTEX 2 #define BERRIMAH2 3 #define GUNN_PT 4 #define GUNN_PT1 5 #define SCSMEX 6 #define SCSMEX1 7 if (s == NULL) return; f = (float (*)(Range x))NULL; /* This quiets the pedantic warning. */ invf = (Range (*)(float x))NULL; if (ifield == ZT_INDEX) {kk = OFF_UZ; invf = ZT_INVF; f = ZT_F;} if (ifield == DZ_INDEX) {kk = OFF_CZ; invf = DZ_INVF; f = DZ_F;} if (ifield == VR_INDEX) {kk = OFF_VEL; invf = VR_INVF; f = VR_F;} if (ifield == SW_INDEX) {kk = OFF_WID; invf = SW_INVF; f = SW_F;} if (ifield == ZD_INDEX) {kk = OFF_ZDR; invf = ZD_INVF; f = ZD_F;} if (ifield == PH_INDEX) {kk = OFF_PHI; invf = PH_INVF; f = PH_F;} if (ifield == RH_INDEX) {kk = OFF_RHO; invf = RH_INVF; f = RH_F;} if (ifield == LR_INDEX) {kk = OFF_LDR; invf = LR_INVF; f = LR_F;} if (ifield == KD_INDEX) {kk = OFF_KDP; invf = KD_INVF; f = KD_F;} if (ifield == TI_INDEX) {kk = OFF_TIME; invf = TI_INVF; f = TI_F;} elev = (float)ptr->fangle*360.0/16384.0; Vu = c*((float)vol.prf/10.)/(4.*(float)vol.freq*100000.0); s->h.sweep_num = ptr->sweep; s->h.elev = elev; s->h.nrays = ptr->numrays; s->h.beam_width = 1.0; /* What is it really? */ s->h.horz_half_bw = .5; s->h.vert_half_bw = .5; s->h.f = f; s->h.invf = invf; for(i=0;i<(int)ptr->numrays;i++) { aray = ptr->ray[i]; if (aray == NULL) continue; s->ray[i] = RSL_new_ray((int)aray->numgates); s->ray[i]->h.month = aray->month; s->ray[i]->h.day = aray->day; s->ray[i]->h.year = (int)aray->year + 1900; if (s->ray[i]->h.year < 1980) s->ray[i]->h.year += 100; /* Year > 2000. */ s->ray[i]->h.hour = aray->hour; s->ray[i]->h.minute = aray->minute; s->ray[i]->h.sec = aray->second; s->ray[i]->h.azimuth = (float)aray->vangle*360.0/16384.0; s->ray[i]->h.ray_num = i; s->ray[i]->h.elev = elev; s->ray[i]->h.elev_num = s->h.sweep_num; s->ray[i]->h.range_bin1 = aray->rangeg1; s->ray[i]->h.gate_size = aray->gatewid; s->ray[i]->h.vel_res = 0.5; /* What is this really? */ s->ray[i]->h.fix_angle = s->h.elev; s->ray[i]->h.frequency = (float)vol.freq*1.0e-4; /* GHz */ s->ray[i]->h.wavelength = c / s->ray[i]->h.frequency * 1.0e-9; s->ray[i]->h.prf = (int)aray->prf/10; s->ray[i]->h.nyq_vel = s->ray[i]->h.prf * s->ray[i]->h.wavelength / 4.0; if (s->ray[i]->h.prf != 0) s->ray[i]->h.unam_rng = c / (2.0 * s->ray[i]->h.prf * 1000.0); /* km */ else s->ray[i]->h.unam_rng = 0.0; s->ray[i]->h.pulse_width = (float)(aray->p_width * 0.05); s->ray[i]->h.pulse_count = aray->n_pulses; s->ray[i]->h.beam_width = 1.0; /* What is it really? */ s->ray[i]->h.f = f; s->ray[i]->h.invf = invf; ray_data = (unsigned char *)aray; m = aray->offset[kk]; if(m==0) continue; /* conversion changes by m.whimpey */ for(j=0; jray[i]->h.nbins; j++) { switch (kk) { case OFF_UZ: /* UZ field. */ case OFF_CZ: /* CZ field. */ /* Apply a 1.4 dB correction. Ken Glasson did this. */ /* Removed 1.4 dB correction 09/27/2006--BMRC doesn't use it. */ if (period == BERRIMAH1) x[j] = ((float)ray_data[m+j] - 56.0)/2.0; /* Removed +1.4 */ else x[j] = ((float)ray_data[m+j] - 64.0)/2.0; /* Removed +1.4 */ break; case OFF_VEL: /* VR field */ if (period == BERRIMAH1) x[j] = (float)(Vu*((double)ray_data[m+j]-128.0)/128.); else if (period == SCSMEX) x[j] = (float)(Vu*((double)(ray_data[m+j]^0x80)-128.0)/127.); else x[j] = (float)(Vu*((double)ray_data[m+j]-128.0)/127.); /* fprintf(stderr,"Velocity for ray[%d] at x[%d] = %f, nyquist = %f\n",i,j,x[j],s->ray[i]->h.nyq_vel); */ break; case OFF_WID: /* SW field */ if (period == BERRIMAH1) x[j] = (float)(Vu*(double)ray_data[m+j]/100.); else x[j] = (float)(Vu*(double)ray_data[m+j]/256.); break; case OFF_ZDR: /* ZD field */ if (period < MCTEX_EARLY) break; if (period <= BERRIMAH2) x[j] = ((float)ray_data[m+j] - 64.0)/21.25; else x[j] = ((float)ray_data[m+j] - 128.)*18./254.; break; case OFF_PHI: /* PH field */ if (period < MCTEX_EARLY) break; if (period <= BERRIMAH2) x[j] = ((float)ray_data[m+j] - 128.0)*32.0/127.0; else if (period == GUNN_PT) x[j] = ((float)ray_data[m+j] - 64.5)*360.0/254.0; else if (period > GUNN_PT) x[j] = 90.0+((float)ray_data[m+j] - 128.0)*180.0/254.0; /*Extra 90 degrees added by Scott Collis, CAWCR/BMRC 2008*/ break; case OFF_RHO: /* RH field */ if (period < MCTEX_EARLY) break; if (period <= BERRIMAH2) x[j] = sqrt((float)ray_data[m+j]/256.822 + 0.3108); else x[j] = (((float)ray_data[m+j]-1.)*1.14/254.) + 0.01; break; case OFF_LDR: /* LR field -- no 'period' here. */ x[j] = ((float)ray_data[m+j] - 250.0)/6; break; case OFF_KDP: /* KP field -- no 'period' here. */ x[j] = ((float)ray_data[m+j]); /* This conversion is taken from SIGMET. Is this right? */ break; case OFF_TIME: /* TIME field -- no 'period' here. */ x[j] = ((float)ray_data[m+j]); /* This conversion is taken from SIGMET. Is this right? */ break; } if (ray_data[m+j] == 0) x[j] = BADVAL; } for (j=0; jray[i]->h.nbins; j++) s->ray[i]->range[j] = invf(x[j]); } } /**********************************************************************/ /* */ /* RSL_lassen_to_radar */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* May 26, 1994 */ /**********************************************************************/ Radar *RSL_lassen_to_radar(char *infile) { /* Lassen specific. */ Lassen_sweep *ptr; Lassen_ray *aray; int period; /* m.whimpey changed early variable to period */ FILE *f; int q[MAX_RADAR_VOLUMES]; extern int rsl_qfield[]; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; /* Radar specific */ Radar *radar; int i, j, k; /* Listing of the RSL field type indexes, in the order that * LASSEN stores them. */ int rsl_index[] = {ZT_INDEX, DZ_INDEX, VR_INDEX, SW_INDEX, ZD_INDEX, PH_INDEX, RH_INDEX, LR_INDEX, KD_INDEX, TI_INDEX}; char *ltype[] = {"UZ", "CZ", "Vel", "Wid", "Zdr", "Phi", "Rho", "Ldr", "Kdp", "Time"}; struct compare_date { /* introduced by m.whimpey */ int year; int month; int day; int hour; int minute; int second; }; /* M.Whimpey changes made 19990422 for extra periods */ #define NUM_DATES 8 struct compare_date cvrt_date[NUM_DATES] = { {1992, 1, 1, 0, 0, 0}, {1995, 11, 1, 0, 0, 0}, {1995, 11, 25, 20, 5, 0}, {1996, 1, 1, 0, 0, 0}, {1997, 10, 1, 0, 0, 0}, {1997, 11, 20, 3, 40, 0}, {1998, 05, 04, 0, 0, 0}, {1998, 05, 17, 03, 47, 0} }; int d; /* date counter */ unsigned long vt; /* vol time */ unsigned long dt; /* date time */ /* open Lassen file */ if (infile == NULL) { int save_fd; save_fd = dup(0); f = fdopen(save_fd, "r"); } else if((f=fopen(infile, "r"))==(FILE *)NULL) { perror(infile); return NULL; } f = uncompress_pipe(f); /* Transparently, use gunzip. */ #define NEW_BUFSIZ 16384 setvbuf(f,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */ if((read_entire_lassen_file(f, &vol)) == 0) { perror("RSL_lassen_to_radar ... read_entire_lassen_file"); exit(1); } rsl_pclose(f); if (radar_verbose_flag) { fprintf(stderr,"\n Version = %d",vol.version); fprintf(stderr,"\n Volume = %d",vol.volume); fprintf(stderr,"\n Numsweeps = %d",vol.numsweeps); fprintf(stderr,"\n Time = %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d - %2.2d:%2.2d:%2.2d", (int)vol.month, (int)vol.day, (int)vol.year, (int)vol.shour, (int)vol.sminute, (int)vol.ssecond, (int)vol.ehour, (int)vol.eminute, (int)vol.esecond); fprintf(stderr,"\n Angle: start %d, stop %d", (int)vol.a_start, (int)vol.a_stop); fprintf(stderr,"\n"); } /* determine which period the lassen volume belongs m.whimpey */ vt = (vol.year-90) * 32140800; vt += vol.month * 2678400; vt += vol.day * 86400; vt += vol.shour * 3600; vt += vol.sminute * 60; vt += vol.ssecond; for(d=0; dh.month = vol.month; radar->h.day = vol.day; radar->h.year = vol.year + 1900; radar->h.hour = vol.shour; radar->h.minute = vol.sminute; radar->h.sec = vol.ssecond; strcpy(radar->h.radar_type, "lassen"); radar->h.nvolumes = MAX_RADAR_VOLUMES; memcpy(&radar->h.radar_name, vol.radinfo.radar_name, 8); memcpy(&radar->h.name, vol.radinfo.site_name, 8); memcpy(&radar->h.city, "????", 4); memcpy(&radar->h.state,"AU", 2); radar->h.latd = vol.radinfo.latitude.degree; radar->h.latm = vol.radinfo.latitude.minute; radar->h.lats = vol.radinfo.latitude.second; /* Is there a problem with the minutes/seconds when negative? * The degree/minute/sec all should have the same sign. */ if (radar->h.latd < 0) { if (radar->h.latm > 0) radar->h.latm *= -1; if (radar->h.lats > 0) radar->h.lats *= -1; } radar->h.lond = vol.radinfo.longitude.degree; radar->h.lonm = vol.radinfo.longitude.minute; radar->h.lons = vol.radinfo.longitude.second; if (radar->h.lond < 0) { if (radar->h.lonm > 0) radar->h.lonm *= -1; if (radar->h.lons > 0) radar->h.lons *= -1; } radar->h.height = vol.radinfo.antenna_height; radar->h.spulse = 0; radar->h.lpulse = 0; /* iterate for each sweep in radar volume */ /* Determine which field types exist. The array 'q' is a boolean to * force one print messages, if requested. * * Well, I tried looping through all the rays and examining aray->flags., * but, it turns out that these flags bounce around, ie. toggle, for * fields that don't really exist. Therefore, I cannot just logically OR * the field flags together to determine which fields exist -- is this * a bug when the file was created? * * What I've seen in lass2uf is to examine the first ray of the first sweep, * but, I think that is unreliable too, due to the above finding. * * The solution, now, is to examine the existance of OFFSET values. * This seems to be consistant, throughout the volume. * The OFFSET is really what is used, anyway, to extract the data. */ memset(q, 0, sizeof(q)); for (i=0; inumrays; j++) { aray = ptr->ray[j]; for (k=0; koffset[k] != 0 && !q[rsl_index[k]]) { /* From RSL_select_fields */ if (rsl_qfield[rsl_index[k]] == 1) q[rsl_index[k]]=1; } } } } if (radar_verbose_flag) fprintf(stderr,"\n Fields are (Lassen nomenclature):"); for (k=0; kv[i] = RSL_new_volume(vol.numsweeps); radar->v[i]->h.f = RSL_f_list[i]; radar->v[i]->h.invf = RSL_invf_list[i]; if (radar_verbose_flag) fprintf(stderr," %s", RSL_ftype[i]); if (k >= 2 && radar_verbose_flag) fprintf(stderr," "); /* Alignment. */ } } if (radar_verbose_flag) fprintf(stderr,"\n"); for(j=0;jh.nvolumes; j++) { for(i=0;i<(int)vol.numsweeps;i++) { if (rsl_qsweep != NULL) { if (i > rsl_qsweep_max) break; if (rsl_qsweep[i] == 0) continue; } ptr = vol.index[i]; if (radar->v[j]) { radar->v[j]->sweep[i] = RSL_new_sweep(ptr->numrays); /* 'period' is a flag for different calibrations */ lassen_load_sweep(radar->v[j]->sweep[i], i, j, period, ptr); } } } radar = RSL_prune_radar(radar); return radar; } #else Radar *RSL_lassen_to_radar(char *infile) { fprintf(stderr, "LASSEN is not installed in this version of RSL.\n"); fprintf(stderr, "Reinstall RSL w/ -DHAVE_LASSEN in the Makefile.\n"); return NULL; } #endif rsl-v1.43/LGPL0000644000102200007640000006126106600002377010033 00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, 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 companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Library 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! rsl-v1.43/rapic-lex.l0000644000102200007640000000726107025112116011406 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997, 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * 2/18/98 - John Merritt */ %{ #include #include "rapic_routines.h" #include "rapic.h" #include /* fprintf(stderr, "LEX len=%d text=<", yyleng);\ binprint(yytext, yyleng);\ fprintf(stderr, "> token=[%d]\n", x);\ */ #define strreturn(x) rapiclval.token.s = calloc(yyleng+1, sizeof(char));\ rapiclval.token.len=yyleng;\ memcpy(rapiclval.token.s, yytext, yyleng);\ return x; %} %x ATMODE %% \/IMAGE: {strreturn(IMAGE);} \/IMAGEEND: {strreturn(IMAGEEND);} \/IMAGESCANS: {strreturn(IMAGESCANS);} \/IMAGESIZE: {strreturn(IMAGESIZE);} \/SCAN {strreturn(SCAN);} "\/IMAGEHEADER END:" {strreturn(IMAGEHEADEREND);} COUNTRY: {strreturn(COUNTRY);} NAME: {strreturn(NAME);} STNID: {strreturn(STNID);} LATITUDE: {strreturn(LATITUDE);} LONGITUDE: {strreturn(LONGITUDE);} HEIGHT: {strreturn(HEIGHT);} DATE: {strreturn(DATE);} TIME: {strreturn(TIME);} TIMESTAMP: {strreturn(TIMESTAMP);} VERS: {strreturn(VERS);} FREQUENCY: {strreturn(FREQUENCY);} PRF: {strreturn(PRF);} PULSELENGTH: {strreturn(PULSELENGTH);} RNGRES: {strreturn(RNGRES);} ANGRES: {strreturn(ANGRES);} ANGLERATE: {strreturn(ANGLERATE);} CLEARAIR: {strreturn(CLEARAIR);} VIDRES: {strreturn(VIDRES);} STARTRNG: {strreturn(STARTRNG);} ENDRNG: {strreturn(ENDRNG);} PRODUCT: {strreturn(PRODUCT);} PASS: {strreturn(PASS);} IMGFMT: {strreturn(IMGFMT);} ELEV: {strreturn(ELEV);} VIDEO: {strreturn(VIDEO);} VELLVL: {strreturn(VELLVL);} NYQUIST: {strreturn(NYQUIST);} UNFOLDING: {strreturn(UNFOLDING);} VOLUMETRIC {strreturn(VOLUMETRIC);} NORMAL {strreturn(NORMAL);} [Nn][Oo][Nn][Ee] {strreturn(NONE);} [Oo][Ff] {strreturn(OF);} [Oo][Nn] {strreturn(ON);} [Oo][Ff][Ff] {strreturn(OFF);} [Rr][Ee][Ff][Ll] {strreturn(REFL);} [Vv][Ee][Ll] {strreturn(VEL);} [Uu][Nn][Cc][Oo][Rr][Rr][Ee][Ff][Ll] {strreturn(UNCORREFL);} [Zz][Dd][Rr] {strreturn(ZDR);} [Ww][Ii][Dd] | [Ww][Ii][Dd][Tt][Hh] {strreturn(WID);} -?[[:digit:]]+ {strreturn(NUMBER);} -?[[:digit:]]*[\.][[:digit:]]+ | -?[[:digit:]]+[\.][[:digit:]]* {strreturn(FLOATNUMBER);} [[][[:digit:]]+[]] {strreturn(BRACKETNUM);} [[:alpha:]]+ {strreturn(ALPHA);} "END RADAR IMAGE" {strreturn(ENDRADARIMAGE);} "@" {BEGIN ATMODE; yymore();} . | \n {yymore();} "\0\0@" | "\0\0\x1a" {BEGIN INITIAL; yyless(yyleng-1); strreturn(RAYDATA);} : {return(yytext[0]);} . ; /* Ignore. */ "\n" ; /* Ignore. */ %% rsl-v1.43/doc/0000755000102200007640000000000011747614602010201 500000000000000rsl-v1.43/doc/field_but.gif0000644000102200007640000000526106600002412012527 00000000000000GIF89adöÿÿÿ!!!)))111999BBBJJJRRRZZZccckkksss{{{„„„ŒŒŒ”””œœœ¥¥¥­­­µµµ½½½ÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷½µµ{ssskkkccZRRcZZRJJJBBB999111))!ss{kkscckRRZZZcJJRBBJ99B119))1!!)!ïçïÎÆÎµ­µÆ½Æ”Œ”œ”œ¥œ¥Œ„Œ{s{sks„{„kckZRZcZcRJRJBJB9B9191)1)!)!!,dFÿ€9  FKIH † F†—/"Š.EJ  H  ŽŠ¢ ¡­  E¹D I à ½EˆL™ D®H G.çåçœ ÍÑÀÊÑ  K CœÅ¤äÊÄ „ ”(BdS&H"@ðâ@‚ VCÀ@!H`$b")€aX"P¶‚±å 0 `ÀÀJ y5„@”û©€ÒB ¤ ƒ¨ 8ò±%‡  8i¹àÀ‘e „ k‰%ÿj èt@%5%©[L@&Ë4ÍEvÀŒ€!2¤À 5ꆚTl’GG ˜€À€¤ ~¬›BFZs„œ&€€ g Ð@Âà˜ AêåÙQ³&2z%ÛHo˸°µ˜X‰.,o*2ØÄK ,xIA@PÙ§-˜!BÞrMò^ ¢ZDP@„“T>":0Ðàƒ£”5DS™3:$@J„°È2d %áte?‹°B6  € T0˜(Ð@;(0D<Å@3 t -€4Q ´t@T’€6”ˆAtÀÿHà"<–hø(ÁE¢TA¡>¦ð(m@AO:p” 0ÁXZ AA‰4pz·àÑs[ °ÙÀ€ `Cj­yF@ :è¡­…$@ 5ª6HK´æ—j$êYΤŸÝ¨¦h @è¢zFóž7 z)ª)’@Eu„9ó)EKY#âÊ &¢€,(‘&Ó`Ó‰,$a@vxŽ,’ü¶ì1:ªê5 È7 Ž€bÄ0¡ !Ê'ðÉWHØ„Iñи2¬# ˆ0Ë{ñã&CA9Ä2ÒT[ BXôŽÿ>Ñ`GÀYÃ,€Ì-ÞР2¸R9èù¥„žÐB >N`ˆJ20ßZR—@‘ËÞÇ úЊFø}tA ûAË !¢dA30`0…ÒAàÀöÄ dA5Á¶À€#ήȀT@沈`4ÜG`@‰'ü¤€"†À6€ äCÐ8 PŠÜWÁdðî\™ÀyXž)àDtp ˆ9Óu#Ý @eôåßË808++Á¾?Õ»x`„‹$eâ#Fð£Ýh¹3øàJÛqˆ’®e €ÐÂÿ'P3ª¿Š‚а|®Q,drÄNŸhµ #0àmóie$fØNÅÈá œàFˆVY€”Åú( ŸÌAöðË€ æ²'€uyENЩ[„DL( Õ =Á‡•bà>Õ)4†OKøÈ+l¸´ @4àS^¡Õ¼‚(HÔah%TjP0Ü i=$hÀðXzqŽ`ùæ% ÁF3â‰r¼¢(X@ *V-¤EfG8H(Œ„^ A™q`„”P-#ÌÓ€5¼Á1RL)Lë…“ X `Qô¡ œÀPI@îG’ØOÿE(€,^fß8B;ª`QD"±!}ãx aP€‚´€!ÅDD°/aä‚`Âà„8 w¹°3˜Ð ½hq ÏÌq’¶@ æGR¬d¢4À ¬å kìå2¯P…‡Ðó10.àWDðÆ^P¡ƒ0„é ÈØ™GÄBAÅ\œxŽYxg_`€t³.¤¥KXV÷\ár`ŽÓ ÄÊb–‰4 úPBVÒ‰!d èANVÒ)‹ øÑ£D(Á-¨•Ï <¨ŠHCp" T`À©(ð€-Q€ˆ€ nʃœF \B&àƒ @Àa€‡–Zªþt>ÿ;Bx€$0à>@‚*²J€ 8jrªT€GU€šdH(H:’O0£a ð` à@P€‹z£”ø>Û@+Š€’ ü†AX0äŽèu GèI êXϘÀàOt_YàmÍ[íØ.Ò Ø#Mà“ ¤ Ùaõ`@Wð$bŒ%€.° %X@€Ä€p’E3Ä&‚e¥å«(‘@Z€bo WÀÀ:€1µân¶ÅZÚÁŒ#ÄhØ®Q€Ó½â>ЛU6¦ŠÊ€:#ÛŽà–ä¬rï°ÿ†ð l@ (AFúq€ûèJùOx;÷;Õ ‡{Ç-dGÀ€$ ;+.® X@Q*«€ÌB h€\Tï| Žxï#IÀcXZ1P8U pKr>¡¦V0x \€Öð.ƒ®0 R†e@#ÁMYeG0Fl@D.€Ó4 ƒÊãeça‘–d0‚aðã# Ùo` œ„±òÙ@-(ÐS+&2€#`3˜¤vÎŽDØãK’dqf`ƒÀ‘ê†0—´a$w´Ç;x‚%Ã#AX2r?`~ ô¨ÿ–ø%+4èÔJH1 7ɈH! ÈàQDÆçòBT…‰ _`€ z‰—öŒžL0ƒØ$ÂI"õRjHj žÑvÆÐN´†à‹BU4ÐTñ<™ £l›MI¢YjºG~’—Añ#ˆ1a§˜0¨Œ*Q|òK¥Ž'€B_†›Ç†âjyÖiÅ“GÑ/*¬Ô\Œî ¾"´îg71Æ[Ãq¼¿'îzrŒRà—½2J%$9 ;rsl-v1.43/doc/RSL_radar_file_format.html0000644000102200007640000000045006600002410015142 00000000000000

The radar file format is not yet documented. Nor is it supported.

It is unclear if it will be supported because we will output UF or HDF.

Author: John H. Merritt rsl-v1.43/doc/RSL_allocate_histogram.html0000644000102200007640000000130506600002405015347 00000000000000


RSL_allocate_histogram


Synopsis

#include "rsl.h"
Histogram *RSL_allocate_histogram(int low, int hi);

Description

Allocate space for the structure Histogram. low and hi specify the low and high dBZ bin values. The bin spacing is 1 dBZ.

Return value

Upon successful completion, Vallocate_histogram returns a pointer to the structure Histogram. Otherwise, NULL is returned and errno is set.
Author: David B. Wolff rsl-v1.43/doc/x_to_radar.fig0000644000102200007640000000316306600002414012715 00000000000000#FIG 2.1 80 2 6 114 409 229 524 4 0 0 15 0 -1 0 0.00000 4 19 91 114 429 toga_to_radar 4 0 0 15 0 -1 0 0.00000 4 19 111 114 452 wsr88d_to_radar 4 0 0 15 0 -1 0 0.00000 4 19 102 114 475 lassen_to_radar 4 0 0 15 0 -1 0 0.00000 4 19 77 114 498 uf_to_radar 4 0 0 15 0 -1 0 0.00000 4 19 90 114 521 nsig_to_radar -6 6 454 409 564 454 6 454 409 564 454 4 0 0 15 0 -1 0 0.00000 4 19 77 454 429 radar_to_uf 4 0 0 15 0 -1 0 0.00000 4 19 107 454 452 radar_to_dorade -6 -6 1 1 0 1 -1 0 0 0 0.00000 1 0.000 324 229 90 35 324 229 414 264 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 154 144 234 224 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 144 209 234 229 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 144 259 234 234 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 159 319 239 239 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 189 89 239 219 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 414 229 529 184 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 1 0 0 0 1.000 4.000 8.000 414 229 524 224 9999 9999 4 1 0 20 0 -1 0 0.00000 4 22 47 324 239 Radar 4 1 0 20 0 -1 0 0.00000 4 22 53 109 214 Lassen 4 1 0 20 0 -1 0 0.00000 4 22 25 124 264 UF 4 1 0 20 0 -1 0 0.00000 4 22 55 124 144 wsr88d 4 1 0 20 0 -1 0 0.00000 4 22 39 164 89 Toga 4 1 0 20 0 -1 0 0.00000 4 22 113 139 339 New SIGMET 4 1 0 20 0 -1 0 0.00000 4 22 25 549 189 UF 4 0 0 20 0 4 0 0.00000 4 22 56 534 229 Dorade 4 1 0 30 0 -1 0 0.00000 4 37 255 399 104 Format conversion. 4 1 0 18 0 -1 0 0.00000 4 22 122 174 404 Ingest functions 4 1 0 18 0 -1 0 0.00000 4 22 131 514 399 Output functions rsl-v1.43/doc/RSL_prune.html0000644000102200007640000000355606600002410012645 00000000000000

RSL_prune_...


Synopsis

#include "rsl.h"
Ray *RSL_prune_ray(Ray *ray);
Sweep *RSL_prune_sweep(Sweep *s);
Volume *RSL_prune_volume(Volume *v
);
Radar *RSL_prune_radar(Radar *radar);


Description

These routines eliminates dataless substructures. A search is conducted for any substructures that contain only header information and, when found, are set to NULL. During the initial allocation step for ingest of a data format, substructure header information is minimially filled. It is not generally known if, for instance, a volume is NULL until it can be determined if there have been no rays assigned to it. In such a case, all sweep pointers have been allocated but no ray pointers assigned. Pruning this volume will result in setting the volume to NULL. A ray is pruned if h.nbins is 0. A sweep is pruned if h.nrays is 0. A volume is pruned if h.nsweeps is 0. A radar is pruned if h.nvolumes is 0.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_new_radar, RSL_new_volume, RSL_new_sweep, RSL_new_ray,
RSL_copy_volume
, RSL_copy_sweep, RSL_copy_ray

Author: John H. Merritt rsl-v1.43/doc/users_guide.html0000644000102200007640000005773411747562744013356 00000000000000



 
 

Users Guide to RSL.

What is RSL good for?

The best feature of RSL is the ability to ingest many different RADAR data file formats with a single library call. It can, also, read compressed files -- compressed with GZIP or the older COMPRESS. The routine is called RSL_anyformat_to_radar. You give it a filename and it will return a pointer to a C structure called Radar. The structure Radar contains all the information found in the input file. The structure is intended to represent a superset of all RADAR data formats.

Below, is a table listing the input/output routines supplied in RSL. You will notice that there are only two output routines. RSL, by design, is not a format converter, but, a library to facilitate reading and manipulation of RADAR data. Output for UF and HDF are supplied because of the popularity of those two formats.
 

Data format

Input routine

Output routine

HDF 1B-51 and 1C-51 RSL_hdf_to_radar RSL_radar_to_hdf
Lassen (Darwin) RSL_lassen_to_radar None
WSR-88d (Nexrad) RSL_wsr88d_to_radar None
UF (Universal Format from NCAR) RSL_uf_to_radar RSL_radar_to_uf
SIGMET (Version 1) RSL_nsig_to_radar None
SIGMET (Version 2) RSL_nsig2_to_radar None
McGill  RSL_mcgill_to_radar None
TOGA  RSL_toga_to_radar None
RAPIC (Berrimah)  RSL_rapic_to_radar None
RADTEC (SPANDAR) RSL_radtec_to_radar None
RSL is designed to provide you with a uniform data structure so that you can design RADAR independent science applications. You no longer need to wrestle over the input data format and have a different version of your algorithm for each different RADAR format you may need to analyze.

This paper presents RSL from a science application developer's point of view. It will present some of the more useful routines and which fields in the Radar structure that will be important to you and it will attempt to cover some of the programming pitfalls associated with RSL usage. One of the most difficult hurdles to overcome is that RSL makes extensive use of pointer syntax. You will find yourself becoming expert with C pointers. However, the design of RSL makes it possible to use C pointers painlessly.

Ok, I have some data, how do I look at it?

Let's first make some images. To do that you need only 3 RSL functions:

RSL_anyformat_to_radar
RSL_load_refl_color_table
RSL_volume_to_gif

The C program you need is incredibly short. It illustrates how to ingest radar data and create a GIF image of the DZ (reflectivity) field:

#include "rsl.h"
void main(int argc, char **argv)
{
  Radar *radar;
  radar = RSL_anyformat_to_radar("radar.dat", NULL);
  RSL_load_refl_color_table();
  RSL_volume_to_gif(radar->v[DZ_INDEX], "dz_sweep", 400, 400, 200.0);
}
The line:

#include "rsl.h"

is required when using the RSL. It defines important constants and declares all the RSL functions that your application may need.

The line:

Radar *radar;
declares the radar pointer. Only a pointer to a radar should be declared, because, the ingest routines allocate all the space to hold all the appropriate substructures: Volume, Sweep, Ray, and Range.

The line:

radar = RSL_anyformat_to_radar("radar.dat", NULL);
performs the actual ingest of data. The input file is called radar.dat. RSL_anyformat_to_radar automatically determines the type of radar data being read. It can handle *.gz or *.Z files transparently. Reading gzip or compress files is faster, especially over NFS.   Generally, reading compressed radar files is faster because of how UNIX pipes are implemented and that the compression is nearly 90%.   The second argument, NULL, is optional. A second argument is needed only when reading WSR-88D data. The WSR-88D site information is provided in the first physical file on the 8mm tape, but, it is used to fill lat/lon and other radar-site specific information when reading the 2nd through last physical files on the tape.

Note: RSL_anyformat_to_radar can't handle every radar format for which there is an RSL ingest routine. But, it does a good job at recognizing most formats. Currently, TOGA and MCGILL files cannot be automatically detected. In those cases, use: RSL_toga_to_radar and RSL_mcgill_to_radar.

While basic image generation is provided in RSL, it is never intended to be anything more than a diagnostic tool. Several assumptions are made, but, the image generation functions provided are useful. This is what the last two lines illustrate. First you must define a color table. That is done with:

RSL_load_refl_color_table();
then, to generate disk files, gif images, you must call one of the image generation functions, as in:
RSL_volume_to_gif(radar->v[DZ_INDEX], "dz_sweep", 400, 400, 200.0);
This routine will generate several images, one for each sweep, mapping the image to a 400 x 400 km grid, using a 1 x 1 km spacing, by collecting data out to 200 km.

Making images of velocity data, VR_INDEX, involves two more steps that are not very obvious. Because of the limited range of the values presented in velocity data, you must re-bin the data. Do that with any one of the following:

RSL_rebin_velocity_sweep,
RSL_rebin_velocity_volume
The second step is that you must call:
RSL_load_vel_color_table();
The nyquist velocity is used to determine the limits of the re-binning. These functions modify the data in a sweep, or volume. So, it is wise to make copies of the sweep, or volume, if you plan on using the data later in your application. Normally, though, making velocity images is the last step of a program, therefore, you don't need to copy the velocity volume as your program will be exiting shortly. RSL provides a number of color table manipulation functions. You are not limited by the default settings for DZ, VR, and SW color tables. You can specify any color table mapping you wish.

Whoopty doo, I really wanted to examine the values.

In order to get to values in the Radar structure, you have to trickle down all the substructues. The structures, in order of nesting are: Radar, Volume, Sweep, Ray, Range. Each of these structures is presented in that order. You will notice a common organization across all of the structures -- each structure contains a header and contains an array of pointers to the next substructure.

The Radar structure

Ok, make the call to RSL_anyformat_to_radar as above, so that you get a pointer to a radar. The structure Radar is the most general structure in RSL. Radar is composed of two parts:
  • Radar header.
  • Array of pointers to Volumes.
The radar header, will be presented and described fully later, but, it contains general information about the entire structure. To access the radar header use the syntax:
Radar *radar;
radar->h.member;
The array of pointers to Volumes contains either pointers to Volumes of data or NULL. The number of possible Volumes in the radar is specified by radar->h.nvolumes. This number represents the length of the array of pointers to Volumes and not the number of actual (non-NULL) volumes in the radar. The index of this array of pointers to Volumes is the field type index. There are MAX_RADAR_VOLUMES (currently set to 19) field types defined in RSL. Each field type index has a specific value. That value is illustrated in the table below. RSL ingest routines guarentee that the length of the array of pointers to Volumes, radar->v, is exactly the maximum number of field types, MAX_RADAR_VOLUMES. This is done so that you can check for the existance of a field type with the syntax:
if (radar->v[XZ_INDEX]) /* XZ exists */
Normally, radar->h.nvolumes is set to the length of the array of pointers to Volumes, radar->v. Because C array indexes start at 0, you should use a test similiar to: ivol < radar->h.nvolumes. The maximum value for radar->h.nvolumes is MAX_RADAR_VOLUMES which is a constant in RSL. The value for radar->h.nvolumes could be less though. But, you can rest assured that you can test for the existance of a field type simply by using the hard coded index name as specified in the table below.

There are basically two methods for indexing the array of pointers to Volumes:

  • Use the index name, eg. CZ_INDEX or its value.
  • Use a variable that ranges from 0 to radar->h.nvolumes-1.
Here are two coding examples that demonstrate how to access the array of pointers to volumes.

Example 1:

Radar *radar;
Volume *volume;

volume = radar->v[CZ_INDEX];
if (volume != NULL) {
   /* Do something with volume. */
}
Example 2:
Radar *radar;
Volume *volume;
int i;

for (i=0; i<radar->h.nvolumes) {
   volume = radar->v[i];
   if (volume == NULL) continue; /* skip this NULL volume */
   /* Do something with volume. */
}
It is very important that you check for the volume pointer being NULL. It is very common that radar->h.nvolumes is larger than the number of non-NULL volumes present in radar. By default, radar->h.nvolumes is the length of array of pointers to Volumes. The volumes are also known as field types. There are several field types and a Volume can be only one field type. The entire list of field types is presented in the table below. To reference a particular field, you use a simple syntax:

radar->v[DZ_INDEX]
radar->v[VR_INDEX]

Each field type encountered has a specific index within the radar->v array of pointers to Volumes. The field type indexes are hard-coded and are defined to be specific numbers starting at 0. Hard-coded field type indexes simplifies the syntax for accessing volumes. When there is no volume for a particular field type, the volume pointer is NULL. This is ok, as NULL is a perfectly acceptable, albeit useless, volume. Here is a table of all the field type indexes used in RSL.
 

INDEX NAME

Value

Description

DZ_INDEX 0 Reflectivity (dBZ)
VR_INDEX 1 Radial Velocity (m/s)
SW_INDEX 2 Spectral Width (m2/s2)
CZ_INDEX 3 QC Reflectivity (dBZ)
ZT_INDEX 4 Total Reflectivity (dBZ)
DR_INDEX 5 Differential reflectivity
LR_INDEX 6 Another differential refl.
ZD_INDEX 7 Reflectivity Depolarization Ratio 

ZDR = 10log(ZH/ZV) (dB)

DM_INDEX 8 Received power (dBm)
RH_INDEX 9 Rho: Correlation coefficient
PH_INDEX 10 Phi (MCTEX parameter)
XZ_INDEX 11 X-band reflectivity
CR_INDEX 12 Corrected DR reflectivity (differential).
MZ_INDEX 13 DZ mask volume for HDF 1C-51 product.
MR_INDEX 14 DR mask volume for HDF 1C-51 product.
ZE_INDEX 15 Edited reflectivity.
VE_INDEX 16 Edited velocity.
KD_INDEX 17 KDP (unknown) for MCTEX data.
TI_INDEX 18 TIME (unknown) for MCTEX data.

The Volume structure

The Volume structure represents the RADAR data for one, and only one, field type. Upon ingest, the data for each field type is separated and placed into separate volumes. This makes it convenient to manipulate volumes based on their field type.

The organization of the Volume structure closely resembles the organization of the Radar structure. It, too, is compose of two parts:

  • Volume header.
  • Array of pointers to Sweeps.
To access elements in the Volume header, you use the syntax:
Volume *volume;
volume->h.member;
You can find a description of each volume header member later. The array of pointers to Sweeps contains either pointers to Sweeps of data or NULL. The number of possible Sweeps in the Volume is specified by volume->h.nsweeps. This number represents the length of the array of pointers to Sweeps and not the number of actual (non-NULL) sweeps in the volume.

There are two methods to accessing sweeps:

  • Use a loop index that ranges from 0 to volume->h.nsweeps-1.
  • Use RSL_get_sweep or other similiar RSL sweep retieval functions.
Here are two coding examples that demonstrate how to access the array of pointers to sweeps.

Example 1:

Volume *volume;
Sweep *sweep;
int i;

/* Assume a non-NULL volume at this point. */
for (i=0; i<volume->h.nsweeps; i++) {
   sweep = volume->sweep[i];
   if (sweep == NULL) continue; /* Skip NULL sweeps. */
   /* Do something with this sweep. */
   printf("Sweep %d elevation is %f\n", i, sweep->h.elev);
}
Example 2:
Volume *volume;
Sweep *sweep;
float elev;

/* No assumption about volume, it *can* be NULL! */
/* That's because RSL_get_sweep checks it. */
elev = 2.0;
sweep = RSL_get_sweep(volume, elev);
if (sweep != NULL)
   printf("Sweep %d elevation is %f\n", i, sweep->h.elev);
Again, it is very important to check for NULL sweeps. By default volume->h.nsweeps is the length of the array of pointers to Sweeps.

The Sweep structure

The Sweep represents the data collected for one field type during one 360o revolution of the RADAR. Like the Radar and Volume structures, the Sweep organization is composed of two parts:
  • Sweep header.
  • Array of pointers to Rays.
To access elements in the Sweep header, you use the syntax:
Sweep *sweep;
sweep->h.member;
A description of each member of the Sweep header is presented later. The array of pointers to Rays contains either pointers to Rays of data or NULL. The number of possible Rays in the Sweep is specified by sweep->h.nrays. This number represents the length of the array of pointers to Rays and not the number of actual (non-NULL) rays in the Sweep.

There are two methods to accessing rays:

  • Use a loop index that ranges from 0 to sweep->h.nrays-1.
  • Use RSL_get_ray or other similiar RSL ray retieval functions.
Here are two coding examples illustrating how to access the array of pointers to Rays.

Example 1:

Sweep *sweep;
Ray *ray;
int i;

/* Assume a non-NULL sweep at this point. */
for (i=0; i<sweep->h.nrays; i++) {
   ray = sweep->ray[i];
   if (ray == NULL) continue; /* Skip NULL rays. */
   /* Do something with this ray. */
   printf("Ray %d azimuth is %f\n", i, ray->h.azimuth);
}
Example 2:
Volume *volume;
Ray *ray;
float elev, azimuth;

/* No assumption about volume, it *can* be NULL! */
/* That's because RSL_get_ray checks it. */
elev = 2.0;
azimuth = 30.2;
ray = RSL_get_ray(volume, elev, azimuth);
if (ray != NULL)
   printf("Ray %d elevation is %f, azimuth is %f\n", i, ray->h.elev, ray->h.azimuth);
You never know when you'll encounter NULL rays, so, make sure you test for it. By default, sweep->h.nrays is the length of the array of pointers to Rays which may or may not be the number of non-NULL Rays present.

The Ray structure

A ray of RADAR measurements represents data collected from close to the RADAR to some maximum physical range. The Ray, too, is composed of two parts:
  • Ray header.
  • Array of field type measurements. These are not pointers. It is an array of values.
We're getting close to the data, now. The ray header contains the largest collection of members and describe all characteristics of the ray. To access elements in the Ray header, you use the syntax:
Ray *ray;
ray->h.member;
A description of each member of the Ray header is described later. The array of field type measurements contains the data, finally. The data type for the data is Range. The Range data type must be converted to float by using the function that is in ray header: ray->h.f(r), where r is of type Range. These conversion functions are in the headers for the volume and sweep. They are there only as a convenience to the application developer. The number of data values in the Rays is specified by ray->h.nbins. This number represents the length of the array of Range values. There is no abiguity here, the number of data values (Range values) exactly matches ray->h.nbins.

There are two methods to accessing the data:

  • Use a loop index that ranges from 0 to ray->h.nbins-1 calling the ray->h.f function.
  • Use RSL_get_value or other similiar RSL get value functions.
Here are two coding examples illustrating how to access the array of Range values..

Example 1:

Ray *ray;
int i;
float x;

/* Assume a non-NULL ray at this point. */
for (i=0; i<ray->h.nbins; i++) {
   x = ray->h.f(ray->range[i]);
   /* Do something with this floating point value 'x'. */
   printf("BIN %d value is %f\n", i, x);
}
Example 2:
Volume *volume;
float x;
float elev, azimuth, range;

/* No assumption about volume, it *can* be NULL! */
/* That's because RSL_get_value checks it. */
elev = 2.0;
azimuth = 30.2;
range = 87.3; /* KM */
x = RSL_get_value(volume, elev, azimuth, range);

No assumptions as to the validity of the data.

The RSL does not modify the data in any way. It merely, loads the data into the Radar structure. For instance, during the MCTEX experiment, the azimuth values were incorrect for the first four tapes. They remain incorrect. It is up to you to write a conversion procedure that corrects the problem.

Pitfalls when using RSL in an application.

Here are some common mistakes made and things you should observe.
  1. Not checking for NULL. It is very important to check for NULL pointers. In the RSL context, NULL is a perfectly valid ray, sweep or volume. Blindly assuming that a volume, sweep, or ray exists is asking for trouble. When using an RSL interface routine, a routine that is prefixed with RSL_, you don't have to worry too much about passing null pointers. RSL routines check their arguments.
  2. Not checking for NULL, when passing a volume, sweep, or ray pointer into a routine. Check for NULL immediately.
  3. Not using the value for radar->h.nvolumes, volume->h.nsweeps, sweep->h.nray. They represent the maximum index possible and not the actual number of non-NULL structures. Remember a NULL sweep, in RSL, is a valid sweep; you just can't do anything with it. If you want to know how many non-NULL volumes you have, you'll have to count them yourself. Do that by looping from 0 to radar->h.nvolumes - 1.
  4. Not using the value for radar->h.nvolumes, volume->h.nsweeps, sweep->h.nrays, and ray->h.nbins for the current object. Never assume that the values are constant throughout the radar structure. They constantly change. For instance, the number of bins may decrease as the sweep elevation increases.
  5. Not converting the data in the Radar, Volume, Sweep, Ray, (really the Ray) to floating point before comparing with anything, including comparing it with BADVAL, RFVAL, APFLAG, NOECHO. Do this conversion with the h.f(c), where c is ray->range[i] and is of type Range. For example:

  6.  

     

    x = ray->h.f(ray->range[ibin]);

  7. Not converting a floating point number to internal storage with h.invf(x), where x is of type float, before filling the range array. For example:

  8.  

     

    ray->range[ibin] = ray->h.invf(x);

  9. Forgetting to load a color table before calling an image generation function. If you don't load a color table, your images will be black.
  10. Not rebinning the velocity data before making velocity images. The default color table is setup to cover the range of -nyquist to +nyquist.
rsl-v1.43/doc/RSL_free.html0000644000102200007640000000206006600002406012427 00000000000000

RSL_free_...


Synopsis

#include "rsl.h"
void RSL_free_ray(Ray *r);
void RSL_free_sweep(Sweep *s);
void RSL_free_volume(Volume *v);


Description

RSL_free_volume calls RSL_free_sweep for the number of sweeps, then frees the array of Sweep pointers, then frees itself. RSL_free_sweep calls RSL_free_ray for the number of rays, then frees the array of Ray pointers, then frees itself. Finally, RSL_free_ray frees the array of Range, then frees itself. Checks are made that non NULL pointers are freed.

Return value

None.

See also

RSL_clear_volume, RSL_clear_sweep, RSL_clear_ray.

Author: John H. Merritt rsl-v1.43/doc/gv_but.gif0000644000102200007640000000524606600002412012063 00000000000000GIF89adöÿÿÿ!!!)))111999BBBJJJRRRZZZccckkksss{{{„„„ŒŒŒ”””œœœ¥¥¥­­­µµµ½½½ÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷skkkccZRRcZZRJJJBBB999111))!kkscckRRZZZcJJRBBJ99B119))1!!)!ïçïÎÆÎÖÎÖçÞç­¥­µ­µœ”œ¥œ¥{s{sks„{„kckZRZcZcRJRJBJB9B9191)1)!)!!,dFÿ€6  CHFE † C†—, Š+BG  E  ŽŠ¢ ¡­  B¹A F à ½BˆI™ A®E D+çåçœ ÍÑÀÊÑ  H @œÅ¤äÊÄàƒ ŽdS&H"@Àâ@‚ ø&CÀ@‰Àq@«‰% p& bf8‡€…˜2 #` Äœ°ÑŠ˜6èÃ`ÎAÌ Ô !掀ÀÀ€ÁŽ˜ ¤°¶@©#i!ä0r„Œÿ@p"¹ÅH²Ì ¸>_Dû("@U+, Ú#k  €€Àˆ@`„%¿zrš$`P FÇôhpR/ËŽœ5‘Ñ+Ø4S°,Á [‡‰X°b@‘MB&›x‰²/e}Ú ^Qà-×$â*)DÐ .µø æ%C”öÈP Å 1q €8=D€À‹CC• €ÄDÄ&üôS ÀçÀ€-LÓV   \&lÒÌ÷ H‰N†”@O ‘@8ð€àC„²‰øbÿ4À@E°TpAA³“ÀM1a„t“Ñ€ƒ(@‚0É´!úwK ׬ÉàL30€ŸxôŠÎDsÂ3pÆèG«ðÙ‹œÁ§éÅY¡Î ±©3'H*@7œY†D˜ixF³ž¤4 j)ª’U@BA‰™äB-fqÒHz$¢€,&Ó`Ó‰,a€uq‰nH¢Û²Ç¨€ªÄY£€{0˜p–C J¢,P‚žx%P„=>D$ÌJ2+Ä:³„`8‰bÄ‘s@,±øŠµÏ‘gÑÿ;úDSݯdÈÀA3@ q¨P ®@yzg#´@SÀŸBÀR0ÔV,±Ø€™@àÍBd #Jº ˜`bC00‚ ¤ ÄNA ƒB@®UÀ=>$ÀØ3À)”ÐU ߨ"iŒ )Ì,‚*00€Lðå7˜›!Ä€S\PÀLã"é-€S. !Ó X-Ág2D‹DäšÐƒü¥âÄàO Í0bÍ!œN„@t¨@ y cUŽ`ðá*Œ ³Øôà7G £€ž’s©V9°¤™ H€ˆ<ÄD D“«h›€ÿ,é!—…Ó@ÙX›ia$Šb@ÄêéH-‹gr~d.Г“y$" ¸ÚÍÈáŠÝbÑRÊÀZ˜C²ˆ;|¢"„ùÉ*à’'@r!M u‹UëK'2µà¯°Œe^T(#¼b0š‚Ñ`cQhpS£k¢a«?µÐG ” j˜ÃÄ BÐA/zq ÙõâAi„E 0ž#`£ñD9^!,@7«–@C á ¡‚zULè@HHµ†|L£ÖðF Έo°*u¹W“6`€OgúÐJ°ÇÿUK#ÌÆ.YaqÍZÜ=@„AU`€qe޾q ŒÄ'&0 T°7âT XÀ“‰ƒ ƒâÀ à…§‰”+ö¢Å%,“Ç™Ù-ÊIáÁY,Î%°–3¬q°"°è.ÀDúȸ,ah,Þ9ˆà i¬Ì#bÁ¤Fˆ.Q<Ç,ˆ#Ìþ¡6íò‡h°,WbgäðÁRp3¬°H)™™H> ”!ăÂó Jo2¼ñ!E„Ü‚ZϳŒºƒªˆ4Ä¡ù¹Ä'Í T€Õ‹AÔD€Â–zkx :j¦ê€ ”­Dÿè›*Œ`W2€€X% 5Mû[@`;¿ÀH„gx’O0cGHð†6í ü€0¯"œŠ8ÌÆ-„@(\Z€á¶Tô¨‹àÒuЀ\F1ÙA34p€X$³`AÙT@Ð \ÆëQ‚ž^ (âÍ xAØ´â@Å`ÏP>\àëã,<« ÐI)1‘€º0Q-Àz} EηHÈbSzÂ|°C€ÐHi¡`3úi¬ÀbÉÌbú ¨@ hA b‚= D&éß°XÑa*@+"@øXÿ |ð<0‘ç¹ 2“ãy‰`Äòå)½ã¤B+h ¦·gÀuŽ˜`­F “ീ#ÔÂORSLü{€ÔÐÐ>°‰uØCH€8p dh®P)÷ôŠZµ^—PW .³ Eˆ)2@Œ9qæla9Ðxì!üØz`60•À€<|ÐÀz†€pŸ ]Í¢(ÐkR…'M$*²Ó„ÞqŽ|ìï`10êwb5ÏF ß¦Uá0Ùïè B’'‹Œ #Fh3’ÐQhFg yb +ʃÆ rÿô8jØŒ×嘣Z„,@6;€-¡£{Ì73™É ”±€”CÉ@òØõ Ü‘¡²CE#$KÉ©”˜=91$œé2\”P€·ØpŠ6lz'L@)¸ä\àÀyN ¨JP·”eæ®—¤‹‚5x‚xô ,J,Ì8 ;rsl-v1.43/doc/RSL_carpi_struct.html0000644000102200007640000000201506600002405014207 00000000000000


typedef struct {
  int   month;            /* (1-12). */
  int   day;              /* (1-31).   */
  int   year;             /* (eg. 1993). */
  int   hour;             /* (0-23). */
  int   minute;           /* (0-59).*/
  float sec;              /* second + fraction of second. */
  float dx, dy;           /* Size of cell in km. */
  int   nx, ny;           /* Number of cells. */
  int   radar_x, radar_y; /* Location of center of radar. */
  float height;           /* Height of this Carpi. */
  float lat, lon;         /* Lat/lon of lower left corner of Carpi. */
  char  radar_type[50];   /* Radar types. */
  int   field_type;       /* Same as for Radar. */
  int   interp_method;    /* ??? string describing interpolation method. */
  float (*f)(Carpi_value x);    /* Data conversion function. f(x). */
  Carpi_value (*invf)(float x); /* Data conversion function. invf(x). */
  Carpi_value **data;     /* data[ny][nx] */
} Carpi; 
rsl-v1.43/doc/quick_ref.html0000644000102200007640000003704511747562744013001 00000000000000

Indexed Reference for RSL

Introduction 
Structures

Users guide

Programmers guide

Internal Routines

What's New
README
CHANGES

Copyright(c)1996, 1997, 1998, 1999, 2000

Functionality index to RSL routines

Alphabetical index to RSL routines

(alphabetical and grouped by object returned)
Radar *RSL_anyformat_to_radar(char *infile [, char *callid_or_first_file]);
Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range, float low_azim, float hi_azim);
Radar *RSL_hdf_to_radar(char *infile);
Radar *RSL_hdf_to_radar_unQC(char *infile);
Radar *RSL_lassen_to_radar(char *infile);
Radar *RSL_mcgill_to_radar(char *infile);
Radar *RSL_new_radar(int nvolumes);
Radar *RSL_nsig_to_radar(char *infile);
Radar *RSL_prune_radar(Radar *radar);
Radar *RSL_radtec_to_radar(char *infile);
Radar *RSL_rapic_to_radar(char *infile);
Radar *RSL_read_radar(char *infile);
Radar *RSL_sort_radar(Radar *r);
Radar *RSL_toga_to_radar(char *infile);
Radar *RSL_uf_to_radar(char *infile);
Radar *RSL_uf_to_radar_fp(FILE *fp);
Radar *RSL_wsr88d_to_radar(char *infile, char *callid_or_first_file);

Volume *RSL_clear_volume(Volume *v);
Volume *RSL_copy_volume(Volume *v);
Volume *RSL_get_volume(Radar *r, int type_wanted);
Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim);
Volume *RSL_new_volume(int max_sweeps);
Volume *RSL_prune_volume(Volume *v);
Volume *RSL_read_volume(FILE *fp);
Volume *RSL_reverse_sweep_order(Volume *v);
Volume *RSL_sort_rays_in_volume(Volume *v);
Volume *RSL_sort_sweeps_in_volume(Volume *v);
Volume *RSL_sort_volume(Volume *v);
Volume *RSL_volume_z_to_r(Volume *z_volume, float k, float a);

Sweep *RSL_clear_sweep(Sweep *s);
Sweep *RSL_copy_sweep(Sweep *s);
Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit);
Sweep *RSL_get_first_sweep_of_volume(Volume *v);
Sweep *RSL_get_sweep(Volume *v, float elev);
Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim);
Sweep *RSL_new_sweep(int max_rays);
Sweep *RSL_prune_sweep(Sweep *s);
Sweep *RSL_read_sweep (FILE *fp);
Sweep *RSL_sort_rays_in_sweep(Sweep *s);
Sweep *RSL_sort_rays_by_time(Sweep *s);
Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a);

Ray *RSL_clear_ray(Ray *r);
Ray *RSL_copy_ray(Ray *r);
Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit);
Ray *RSL_get_first_ray_of_sweep(Sweep *s);
Ray *RSL_get_first_ray_of_volume(Volume *v);
Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *ray);
Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *ray);
Ray *RSL_get_ray(Volume *v, float elev, float azimuth);
Ray *RSL_get_ray_from_sweep(Sweep *s, float azim);
Ray *RSL_get_ray_above(Volume *v, Ray *current_ray);
Ray *RSL_get_ray_below(Volume *v, Ray *current_ray);
Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim);
Ray *RSL_new_ray(int max_bins);
Ray *RSL_prune_ray(Ray *ray);
Ray *RSL_ray_z_to_r(Ray *z_ray, float k, float a);
Ray *RSL_read_ray (FILE *fp);

float RSL_area_of_ray(Ray *r, float lo, float hi, float max_range);
float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range);
float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range);
float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range);
float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float max_rng);
float RSL_get_linear_value(Volume *v,float srange,float azim,float elev,float limit);
float RSL_get_nyquist_from_radar(Radar *radar);
float RSL_get_range_of_range_index(Ray *ray, int index);
float RSL_get_value(Volume *v, float elev, float azimuth, float range);
float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h);
float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm);
float RSL_get_value_from_ray(Ray *ray, float r);
float RSL_get_value_from_sweep(Sweep *s, float elev, float azim, float r);
float RSL_z_to_r(float z, float k, float a);

int RSL_fill_cappi(Volume *v, Cappi *cap, int method);
int RSL_get_sweep_index_from_volume(Volume *v, float elev,int *next_closest);
int RSL_radar_to_hdf(Radar *radar, char *outfile);
int RSL_write_histogram(Histogram *histogram, char *outfile);
int RSL_write_ray(Ray *r, FILE *fp);
int RSL_write_sweep(Sweep *s, FILE *fp);
int RSL_write_volume(Volume *v, FILE *fp);
int RSL_write_histogram(Histogram *histogram, char *outfile);
int RSL_write_radar(Radar *radar, char *outfile);
int RSL_write_radar_fp(Radar *radar, FILE *fp);
int RSL_write_radar_gzip(Radar *radar, char *outfile);

unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range);

void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset);
void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset);
void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset);
void RSL_bscan_ray(Ray *r, FILE *fp);
void RSL_bscan_sweep(Sweep *s, char *outfile);
void RSL_bscan_volume(Volume *v, char *basename);
void RSL_find_rng_azm(float *r, float *ang, float x, float y);
void RSL_fix_time(Ray *ray);
void RSL_free_cappi(Cappi *c);
void RSL_free_histogram(Histogram *histogram);
void RSL_free_radar(Radar *r);
void RSL_free_ray(Ray *r);
void RSL_free_sweep(Sweep *s);
void RSL_free_volume(Volume *v);
void RSL_get_color_table(int icolor, char buffer[256], int *ncolors);
void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h);
void RSL_get_gr_slantr_h(Ray *ray, int i, float *gr, float *slantr, float *h)
void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev);
void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h);
void RSL_load_color_table(char *infile, char buffer[256], int *ncolors);
void RSL_load_green_table(char *infile);
void RSL_load_blue_table(char *infile);
void RSL_load_height_color_table();
void RSL_load_rainfall_color_table();
void RSL_load_red_table(char *infile);
void RSL_load_refl_color_table();
void RSL_load_sw_color_table();
void RSL_load_vel_color_table();
void RSL_load_zdr_color_table();
void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename);
void RSL_print_version();
void RSL_radar_to_uf(Radar *r, char *outfile);
void RSL_radar_to_uf_fp(Radar *r, FILE *fp);
void RSL_radar_to_uf_gzip(Radar *r, char *outfile);
void RSL_radar_verbose_off(void);
void RSL_radar_verbose_on(void);
void RSL_read_these_sweeps(char *sweep#, ..., NULL);
void RSL_rebin_velocity_ray(Ray *r);
void RSL_rebin_velocity_sweep(Sweep *s);
void RSL_rebin_velocity_volume(Volume *v);
void RSL_rebin_ray(Ray *r);
void RSL_rebin_sweep(Sweep *s);
void RSL_rebin_volume(Volume *v);
void RSL_set_color_table(int icolor, char buffer[256], int *ncolors);
void RSL_set_hdf_qc_parameters(float hfreeze, float dbznoise, float hthresh1, float hthresh2, float hthresh3, float zthresh1, float zthresh2, float zthresh3, char *outfile);
void RSL_select_fields(char *field_type, ..., NULL);
void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range) ;
void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_t able[256][3]);
void RSL_write_pict(char *outfile, unsigned char *image, int xdim, int ydim, char c_ table[256][3]);
void RSL_write_pgm(char *outfile, unsigned char *image, int xdim, int ydim);
void RSL_write_ppm(char *outfile, unsigned char *image, int xdim, int ydim, char c_t able[256][3]);
Cappi *RSL_cappi_at_h(Volume *v, float h, float grnd_range);
Cappi *RSL_new_cappi(Sweep *sweep, float height);

Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar_y);
Carpi *RSL_new_carpi(int xdim, int ydim);
Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r, float dx, float dy, int nx, int ny, int radar_x, int radar_y, float lat, float lon);

Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz, int nx, int ny, int nz, float grnd_r, int radar_x, int radar_y, int radar_z);

Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z);
Histogram *RSL_allocate_histogram(int low, int hi);
Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_read_histogram(char *infile);


Author: John H. Merritt. rsl-v1.43/doc/RSL_get_gr_slantr_h.html0000644000102200007640000000123106600002406014646 00000000000000

RSL_get_gr_slantr_h


Synopsis

#include "rsl.h"
void RSL_get_gr_slantr_h(Ray *ray, int i, float *gr, float *slantr, float *h)


Description

Given a Ray ray and the range index i, calculate the ground range, slant range, and height; gr, slantr and h respectively.

Return value

None.

See also

RSL_get_groundr_and_h

Author: John H. Merritt rsl-v1.43/doc/RSL_nsig_to_radar.html0000644000102200007640000000316606600002410014324 00000000000000


RSL_nsig_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_nsig_to_radar(char *infile);

Radar *RSL_nsig2_to_radar(char *infile);


Description

Reads a new SIGMET (aka nsig) file and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands. Two versions of SIGMET files exist: Version 1 files, and Version 2 files. RSL_nsig_to_radar is used to read version 1 files, and, RSL_nsig2_to_radar is used to read version 2 files.

The radar structure is, essentially, an array of Volumes. The number and type of volumes allocated is automatically determined from the input nsig file.


Return value

Upon successful completion, RSL_nsig_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.


See also

RSL_anyformat_to_radar


Author: Paul Kucera.

rsl-v1.43/doc/RSL_print_version.html0000644000102200007640000000110506600002410014401 00000000000000

RSL_print_version


Synopsis

#include "rsl.h"
void RSL_print_version();


Description

Print the current version of the RSL library. Output to stdout.


Return value

None.


See also


Author: John H. Merritt

rsl-v1.43/doc/RSL_bscan.html0000644000102200007640000000327006600002405012577 00000000000000

RSL_bscan_...


Synopsis

#include "rsl.h"
void RSL_bscan_ray(Ray *r, FILE *fp);
void RSL_bscan_sweep(
Sweep *s, char *outfile);
void RSL_bscan_volume(
Volume *v, char *basename);


Description

Output image format is PPM. If basename is "bscan", RSL_bscan_volume outputs filenames bscan.01.gif, bscan.02.gif, etc. as PPM images. These are simple ray dumps; aka, B-SCANS. The output file is specified as the outfile parameter to RSL_bscan_sweep. These routines assume the color table has been loaded, otherwise you will get a black image. The output image dimensions are nbins by nrays which are determined from sweep and first-ray-of-the-sweep header information.

Return value

None.

See also

RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table

Author: John H. Merritt rsl-v1.43/doc/RSL_hdf_to_radar.html0000644000102200007640000000332306600002407014126 00000000000000


RSL_hdf_to_radar
RSL_hdf_to_radar_unQC


Synopsis

#include "rsl.h"
Radar *RSL_hdf_to_radar(char *infile);

Radar *RSL_hdf_to_radar_unQC(char *infile);


Description

Reads an HDF file and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then no action is taken. This is different from other ingest routines where stdin is read. HDF files cannot be stdin, because they require seeking.. The input file may not be compressed.

RSL_hdf_to_radar_unQC differs from RSL_hdf_to_radar in that both DZ (original uncorrected reflectivity) and CZ (corrected) volumes are extracted from the HDF file. Normally, RSL_hdf_to_radar returns CZ only. Call one or the other, for ingest efficiency.

The radar structure is, essentially, an array of Volumes. The number and type of volumes allocated is automatically determined from the input HDF file.


Return value

Upon successful completion, RSL_hdf_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.


See also

RSL_anyformat_to_radar


Author: Mike Kolander.

rsl-v1.43/doc/RSL_Er_loc_struct.html0000644000102200007640000000030506600002405014314 00000000000000
typedef struct 
{ 
float elev; /* elevation angle */
float srange; /* slant range !!! */
} 
Er_loc;
rsl-v1.43/doc/search_rsl.html0000644000102200007640000000105006600002413013107 00000000000000 Search Page

RSL Search Page



Search RSL library for string in

Search variable:


rsl-v1.43/doc/RSL_ray_struct.html0000644000102200007640000000067106600002410013706 00000000000000


typedef struct {
  Ray_header h;
  Range *range; /* range[0..nbins-1] */
                /* For wsr88d file:
                 * 0..460 for reflectivity, 0..920 for velocity and 
                 * spectrum width. You must allocate this space.
                 */
} Ray; 
rsl-v1.43/doc/Makefile.am0000644000102200007640000000041007053065245012146 00000000000000AUTOMAKE_OPTIONS = foreign docdir = $(prefix)/doc/$(PACKAGE) doc_DATA = *.html *.gif *.jpg EXTRA_DIST = $(doc_DATA) *.fig install-exec-hook: -mkdir $(prefix)/doc -mkdir $(docdir) $(INSTALL) -m 444 ../README $(docdir) $(INSTALL) -m 444 ../CHANGES $(docdir) rsl-v1.43/doc/RSL_get_ray.html0000644000102200007640000000253506600002406013147 00000000000000

RSL_get_ray


Synopsis

#include "rsl.h"
Ray *RSL_get_ray(Volume volume, float elev, float azimuth);


Description

Extract a Ray from a Volume. Returns a pointer to a Ray. You must copy the Ray returned with RSL_copy_ray, if you want to modify the contents of the Ray without destroying the original Ray. elev is the elevation angle in degrees and is used to find the appropriate Sweep using the routine RSL_get_sweep. The azimuth angle within the appropriate Sweep must be within +/- 1/2 horizontal beam width of the target angle, azimuth.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.

Author: John H. Merritt rsl-v1.43/doc/RSL_get_value.html0000644000102200007640000000305306600002407013465 00000000000000


RSL_get_value...


Synopsis

#include "rsl.h"
float RSL_get_value(Volume *v, float elev, float azimuth, float range);
float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h);
float RSL_get_value_from_ray(Ray *ray, float r);
float RSL_get_value_from_sweep(Sweep *s, float azim, float r);



Description

RSL_get_value: Find a value in the Volume v using polar coordinate specification. The search returns the closest point. Although there is no restriction concerning azimuth values, other functions rely on the range being 0 to +360. This may change. Nexrad happened to use this range so I use it for now.

RSL_get_value_at_h: Returns a value when the coordinate is specified by ground range and height. Both ground range and height are specified in km.

RSL_get_value_from_ray: Return a value for the slant range r. Basically, r is converted to an index based on the gate size.

Vget_value_from_sweep: Get a value from a Sweep, s, given the azimuth azim and range r.


Return value

Upon successful completion, a valid floating point number is returned. Note, the value could be BADVAL.

See also


Author: John H. Merritt rsl-v1.43/doc/RSL_carpi_value_struct.html0000644000102200007640000000016706600002405015411 00000000000000 t
ypedef Range Carpi_value;
rsl-v1.43/doc/RSL_sweep_header_struct.html0000644000102200007640000000107407262651235015570 00000000000000
typedef struct {
  int sweep_num;      /* Integer sweep number. */
  float elev;         /* Elevation angle (mean) for the sweep. */
  float beam_width;   /* This is in the ray header too. */
  float vert_half_bw; /* Vertical beam width divided by 2 */
  float horz_half_bw; /* Horizontal beam width divided by 2 */
  int nrays;
  float (*f)(Range x); /* Data conversion function. f(x). */
  Range (*invf)(float x); /* Data conversion function. invf(x). */ 
} Sweep_header; 
rsl-v1.43/doc/RSL_fill_cappi.html0000644000102200007640000000227206600002406013615 00000000000000

RSL_fill_cappi


Synopsis

#include "rsl.h"
int *RSL_fill_cappi(Volume *v, Cappi *cap, int method);


Description

Using data from v, and information from cap, this routine fill the cappi structure cap with values from the rays in v. The argument cap is modified. The method passed indicates the interpolation used, however, no interpolation is used, yet. Normally, you should not call this routine unless you're writing an RSL routine, instead, call RSL_cappi_at_h.

Return value

Upon successful completion, 1 is returned. -1 is returned upon failure. The argument cap is modified.

See also

RSL_free_cappi, RSL_cappi_to_carpi, RSL_get_value_from_cappi, RSL_new_cappi


Author: John H. Merritt rsl-v1.43/doc/rsl.fig0000644000102200007640000000601606600002413011372 00000000000000#FIG 2.1 80 2 5 1 0 1 -1 0 0 0 0.000 1 0 0 259.248 -208.678 120 221 259 243 382 226 5 1 0 1 -1 0 0 0 0.000 1 0 0 261.382 -11.697 195 259 258 267 319 261 5 1 0 1 -1 0 0 0 0.000 0 0 1 294.102 289.759 306 270 315 280 316 297 0 0 1.000 4.000 8.000 5 1 0 1 -1 0 0 0 0.000 1 1 0 263.500 1480.300 295 149 232 149 144 154 0 0 1.000 4.000 8.000 5 1 0 1 -1 0 0 0 0.000 0 0 0 382.738 656.566 139 528 382 381 627 529 5 1 0 1 -1 0 0 0 0.000 1 1 0 646.396 318.672 655 325 656 314 646 308 0 0 1.000 4.000 8.000 5 1 0 1 -1 0 0 0 0.000 1 1 0 653.705 330.000 644 341 666 338 666 322 0 0 1.000 4.000 8.000 5 1 0 1 -1 0 0 0 0.000 1 0 0 442.278 600.608 384 382 279 444 222 549 5 1 0 1 -1 0 0 0 0.000 1 1 0 392.906 522.548 407 534 411 521 405 509 0 0 1.000 4.000 8.000 5 1 0 1 -1 0 0 0 0.000 1 1 0 378.000 503.333 352 535 383 544 404 535 0 0 1.000 4.000 8.000 5 1 1 1 -1 0 0 0 4.000 1 0 0 449.999 552.154 385 383 318 428 274 509 5 1 1 1 -1 0 0 0 4.000 0 0 0 307.559 553.507 388 383 450 430 491 510 5 1 0 1 -1 0 0 0 0.000 0 0 0 323.076 595.400 387 384 478 438 539 549 1 1 0 1 -1 0 0 0 0.00000 1 0.000 254 184 200 25 254 184 454 209 1 1 0 1 -1 0 0 0 0.00000 1 0.000 382 531 246 23 382 531 628 554 1 3 0 1 -1 0 0 21 0.00000 1 0.000 450 458 4 4 450 458 454 462 2 1 0 1 -1 0 0 0 0.000 -1 0 0 54 184 259 294 454 184 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 121 203 256 291 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 188 208 258 294 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 346 206 259 294 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 270 209 259 295 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 121 165 159 205 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 209 160 226 209 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 293 159 280 210 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 376 165 334 207 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 69 297 452 296 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 624 178 624 371 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 520 332 749 332 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 568 358 772 261 773 261 9999 9999 2 1 1 1 -1 0 0 0 4.000 -1 0 0 625 331 743 306 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 624 331 742 215 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 744 215 745 305 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 745 295 735 297 735 309 9999 9999 2 1 1 1 -1 0 0 0 4.000 -1 0 0 626 332 718 380 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 384 529 449 544 449 459 384 529 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 440 541 440 533 449 536 9999 9999 2 1 0 1 -1 0 0 0 0.000 -1 0 0 385 529 250 549 9999 9999 4 0 0 12 0 -1 0 0.00000 4 17 53 183 142 Azimuth. 4 0 0 12 0 -1 0 0.00000 4 17 58 330 286 Elevation. 4 1 0 30 0 -1 0 0.00000 4 37 89 260 116 Sweep 4 1 0 30 0 -1 0 0.00000 4 37 106 387 359 Volume 4 1 0 10 0 -1 0 0.00000 4 12 4 668 277 r 4 1 0 10 0 -1 0 0.00000 4 12 9 689 326 gr 4 1 0 10 0 -1 0 0.00000 4 12 5 749 249 h 4 0 0 12 0 -1 0 0.00000 4 17 7 456 500 h 4 0 0 12 0 -1 0 0.97738 4 17 5 405 497 r 4 0 32 12 0 -1 0 0.00000 4 15 9 380 541 f 4 0 32 12 0 -1 0 0.00000 4 15 7 417 527 q 4 1 32 10 0 -1 0 0.00000 4 15 6 675 346 f 4 1 32 10 0 -1 0 0.00000 4 15 5 661 311 q rsl-v1.43/doc/RSL_read.html0000644000102200007640000000357111410462157012441 00000000000000

RSL_read_...


Synopsis

#include "rsl.h"
Ray *RSL_read_ray(FILE *fp);
Sweep *RSL_read_sweep(FILE *fp);

Volume
*RSL_read_volume
(FILE *fp);


Description

RSL_read_volume reads an entire volume structure from the input stream fp. fp is usually assigned inside the routine RSL_read_radar, however, you can assign the stream fp via fopen. RSL_read_volume calls RSL_read_sweep for the number of sweeps, vol->h.nsweeps, as determined from reading fp. Memory is allocated via RSL_new_volume.

RSL_read_sweep reads an entire sweep structure from the input stream fp. RSL_read_sweep calls RSL_read_ray for the number of rays, sweep->h.nrays, as determined by reading fp. Memory is allocated via RSL_new_sweep.

RSL_read_ray reads an entire ray structure from the input stream fp. RSL_read_ray ingests an entire ray of data and sets ray->h.nbins. Memory is allocated via RSL_new_ray.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_new_volume, RSL_new_sweep, RSL_new_ray,
RSL_write_volume, RSL_write_sweep, RSL_write_ray,
RSL_read_radar, RSL_write_radar,
File format.

Author: John H. Merritt rsl-v1.43/doc/RSL_new_carpi.html0000644000102200007640000000114706600002410013455 00000000000000


RSL_new_carpi


Synopsis

#include "rsl.h"
Carpi *RSL_new_carpi(int xdim, int ydim);


Description

Allocates xdim by ydim of Carpi_value. The entire structure is initialized to 0.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also


Author: Mike Kolander rsl-v1.43/doc/RSL_radar_to_hdf.html0000644000102200007640000000231706600002410014122 00000000000000

RSL_radar_to_hdf


Synopsis

#include "rsl.h"
int RSL_radar_to_hdf(Radar *radar, char *outfile);


Description

Writes HDF files. The output file is specified by outfile. The organization of the data within the HDF file is specified in NASA document TSDIS-P907. This is also known as TSDIS ICS Volume 3 (Release 3/Draft). You must preceed the call to RSL_radar_to_hdf with a call to RSL_set_hdf_qc_parameters.


Return value

Upon successful completion, RSL_radar_to_hdf returns 0. Upon failure, -1 is returned.


See also

RSL_anyformat_to_radar

RSL_set_hdf_qc_parameters


Author: Mike Kolander.

rsl-v1.43/doc/RSL_select_fields.html0000644000102200007640000000417306600002411014316 00000000000000



RSL_select_fields


Synopsis

#include "rsl.h"
void RSL_select_fields(char *field_type, [char *field_type...], NULL);


Description

Call this routine prior to any ingest routine and only the field types specified will be ingested. The drastically reduces memory requirements, especially if you're only interesed in one field type. Lassen, for instance, can have more than 5 field types which collectively can occupy an enormous amount of memory. By default, all field types are ingested. field_type is not case sensitive. Specify NULL as the last argument. This signals this routine when to stop parsing the field types.

The list of possible field types is: "all", "none", "dz", "vr" "cz", "zt", "dr", "lr", "zd", "dm", "rh", "ph", "xz", "cd", "mz", "md", "ze", "ve", "kd", "ti".

Action or side-effects: A second call to this function over-rides any previous settings. In other words, multiple calls are not additive. So, to get both DZ and VR volumes, use:
RSL_select_fields("dz", "vr", NULL); -- Read both DZ and VR.
and not:
RSL_select_fields("dz", NULL); -- Read only DZ.
RSL_select_fields("vr", NULL); -- Read only VR, no DZ.



Return value

Upon successful completion, RSL_select_fields silently sets a hidden array that RSL_anyformat_to_radar accesses for memory allocation.


See also

RSL_anyformat_to_radar.


Author: John H. Merritt.

rsl-v1.43/doc/alan.mcconnell.html0000644000102200007640000000030306600002412013645 00000000000000 Alan McConnell
Pixel Analysis
alan@pluvius.gsfc.nasa.gov.
rsl-v1.43/doc/RSL_toga_to_radar.html0000644000102200007640000000210406600002411014306 00000000000000

RSL_toga_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_toga_to_radar(char *infile);

Description

Reads a TOGA file and returns a pointer to the structure Radar. The inpile is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.

The radar structure is, essentially, an array of Volumes. The type of volumes returned is automatically determined from the input file.


Return value

Upon successful completion, RSL_toga_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.

See also

RSL_anyformat_to_radar

Author: Mike Kolander. rsl-v1.43/doc/RSL_fraction_of.html0000644000102200007640000000160306600002406014001 00000000000000


RSL_fraction_of...


Synopsis

#include "rsl.h"
float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range);
float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range);
float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range);


Description

Compute the fraction of the Volume, Sweep, or Ray that contain values between lo and hi out to the range range. This is just a percentage.

Return value

Upon successful completion, a valid floating point number is returned.

See also


Author: John H. Merritt rsl-v1.43/doc/RSL_get_slice_from_cube.html0000644000102200007640000000225706600002407015476 00000000000000

RSL_get_slice_from_cube


Synopsis

#include "rsl.h"
Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z);


Description

Given a Cube structure, extract one slice from it. x, y and z define the plane of the required slice. Two of the three parameters must equal -1 and the third must be nonnegative; eg, the vertical plane y=100 is specified by the parameters x=-1, y=100, z=-1. Assumes valid ranges for x, y, z are:
0 <= x <= nx-1, 0 <= y <= ny-1, 1 <= z <= nz
nx, ny and nz specify the dimensions of the cube structure and are members of it. The range of z starts at 1 , since a cappi (or carpi) at height z=0 makes no sense.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_volume_to_cube


Author: Mike Kolander rsl-v1.43/doc/RSL_read_radar.html0000644000102200007640000000277106600002410013576 00000000000000

RSL_read_radar


Synopsis

#include "rsl.h"
Radar *RSL_read_radar(char *filename);


Description

Read the Radar structure from disk. This is the inverse function of RSL_write_radar. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands. Space for the Radar structure is obtained via calls to the volume routines: RSL_new_volume, RSL_new_sweep, and RSL_new_ray, which obtain their space via the routine malloc.

Return value

Upon successful completion, a Radar structure is returned. Otherwise, NULL.

See also

RSL_read_volume, RSL_read_sweep, RSL_read_ray,
RSL_write_volume, RSL_write_sweep, RSL_write_ray,
RSL_read_radar, File format, RSL_anyformat_to_radar

Author: John H. Merritt rsl-v1.43/doc/RSL_get_linear_value.html0000644000102200007640000000174006600002407015020 00000000000000


RSL_get_linear_value


Synopsis

#include "rsl.h"
float RSL_get_linear_value(Volume *v, float srange, float azimuth, float elev, float limit);


Description

Find a linearly interpolated value in the Volume, v, at the polar coordinate specification (srange, azimuth, elev). The four surrounding data values that are azimuthally within +/- limit degrees are used for the interpolation. Limit is measured in degrees. Srange is the slant range in KM. Azimuth and elev are measured in degrees.

Return value

Upon successful completion, a valid floating point number is returned. Note, the value could be BADVAL.

See also

RSL_get_value
Author: Dennis Flanigan, Jr. rsl-v1.43/doc/RSL_get_closest_sweep.html0000644000102200007640000000156506600002406015235 00000000000000

RSL_get_closest_sweep


Synopsis

#include "rsl.h"
Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit);


Description

Return the closest sweep within a volume. Closeness is determined by the minimum absolute difference of sweep_angle and the elevation angle of the ray. The difference must be less than limit. If no such ray can be found, return NULL.

Return value

Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_sweep

Author: Dennis Flanigan Jr. rsl-v1.43/doc/RSL_cappi_to_carpi.html0000644000102200007640000000264206600002405014467 00000000000000


RSL_cappi_to_carpi


Synopsis

#include "rsl.h"
Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar _y);


Description

Produce a Constant Altitude Rectangular from Polar Image at h out to the maximum ground range grnd_range. h and grnd_range are expressed in km. The dimensions of the Carpi are given by nx and ny. radar_x and radar_y are the location of the radar within the Carpi structure (the rectangular grid). lat and lon represent the lower left corner (SE) of the rectangular grid. The routine allocates space for the resulting Carpi.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_free_cappi, RSL_volume_to_carpi, Carpi, Cappi, RSL_new_cappi.


Author: Mike Kolander rsl-v1.43/doc/RSL_volume_to.html0000644000102200007640000000676606653365505013564 00000000000000

RSL_volume_to...


Synopsis

#include "rsl.h"
void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range) ;
void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range);


Description

RSL_volume_to_gif: Given a Volume pointer, v, output a series of GIF images. Output filenames are basename.00.gif, basename.01.gif, etc., for the number of sweeps. It calls RSL_sweep_to_gif once for each sweep. When making images of velocity data, it may be necessary to call RSL_rebin_velocity_sweep to rebin the values from -nyquist to +nyquist.

RSL_volume_to_pict: Identical to RSL_volume_to_gif except it writes PICT files.

RSL_volume_to_ppm: Identical to RSL_volume_to_gif except it writes PPM files.

RSL_volume_to_pgm: Identical to RSL_volume_to_gif except it writes PGM files.

Efficiency note: The functions RSL_volume_to_gif and RSL_volume_to_pict. and any other output formats that may arrise, all function identically with the only difference being the output pipe command (ppmtogif, ppmtopict, etc.). Each routine performs a polar to cartesean mapping via RSL_sweep_to_cart, then calls the appropriate write function. If you plan to output many image formats at once, it will be wise to perform the polar to cartesean mapping once, then call RSL_write_gif, RSL_write_pict, etc. This could be done, for instance, in a function called RSL_volume_to_pict_and_gif. 


Return value

None. 

See also

RSL_rebin_velocity_ray, RSL_rebin_velocity_sweep, RSL_rebin_velocity_volume,
RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm,
RSL_get_color_table, RSL_set_color_table.

Author: John H. Merritt rsl-v1.43/doc/RSL_rebin_velocity.html0000644000102200007640000000407206653365503014552 00000000000000


RSL_rebin_velocity...


Synopsis

#include "rsl.h"
void RSL_rebin_velocity_ray(Ray *r);
void RSL_rebin_velocity_sweep(Sweep *s);
void RSL_rebin_velocity_volume(Volume *v);


Description

Rebin the velocity data to the range -nyquist, +nyquist. 14 bins are created centered at 0. It sets the proper color look up indexes. This function modifies Volume v. Use this function prior RSL_sweep_to_cart. The binning is done in RSL_rebin_velocity_ray. 

Return value

None. 

See also

RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm,
RSL_get_color_table, RSL_set_color_table.

Author: John H. Merritt rsl-v1.43/doc/RSL_cappi_struct.html0000644000102200007640000000174106600002405014212 00000000000000


typedef struct {
  int   month;  /* Begin time for this Cappi; month (1-12). */
  int   day;    /* Begin time for this Cappi; day (1-31). */
  int   year;   /* Begin time for this Cappi; year (eg. 1993). */
  int   hour;   /* Begin date for this Cappi; hour (0-23). */
  int   minute; /* Begin date for this Cappi; minute (0-59).*/
  float sec;    /* Begin date for this Cappi; second + fraction of  second. */ 
  float height;      /* Height for this Cappi. */
  float lat;
  float lon;         /* Lat/lon of lower left corner of Carpi. */
  int field_type;
  char radar_type[50]; /* Value of Constant radar->h.radar_type */ 
  int interp_method; /* ??? string describing interpolation method. */
  Er_loc *loc;       /* elevation and range coordinate array */
  Sweep *sweep;      /* Pointers to rays of data */
} Cappi; 
rsl-v1.43/doc/RSL_free_histogram.html0000644000102200007640000000106506600002406014510 00000000000000

RSL_free_histogram


Synopsis

#include "rsl.h"
void RSL_free_histogram(Histogram *histogram);

Description

Deallocate the structure pointed to by histogram. Space for the structure Histogram was previously obtained via RSL_allocate_histogram.

Return value

None.
Author: David B. Wolff rsl-v1.43/doc/RSL_new_cappi.html0000644000102200007640000000244106600002410013451 00000000000000

RSL_new_cappi


Synopsis

#include "rsl.h"
Cappi *RSL_new_cappi(Sweep *sweep, float height);


Description

RSL_new_cappi allocates memory for a Cappi. It allocates space for it's header and space for for a Sweep structure. The Sweep allocated is a copy of sweep with all the data cleared. The height argument is copied to the height member of Cappi. No values are assigned to the rays in the sweep. That is done in the routine RSL_fill_cappi. This routine is not, normally, called unless you are developing a new cappi routine for RSL. Call RSL_cappi_at_h instead.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_free_cappi, RSL_cappi_at_h, RSL_fill_cappi, RSL_get_value_from_cappi


Author: John H. Merritt rsl-v1.43/doc/RSL_set_hdf_qc_parameters.html0000644000102200007640000000170306600002411016027 00000000000000

RSL_set_hdf_qc_parameters


Synopsis

#include "rsl.h"
void RSL_set_hdf_qc_parameters(float hfreeze, float dbznoise, float hthresh1, float hthresh2, float hthresh3, float zthresh1, float zthresh2, float zthresh3, char *outfile);


Description

Initializes paramters prior to a call to RSL_radar_to_hdf.


Return value

None.


See also

RSL_anyformat_to_radar

RSL_radar_to_hdf


Author: Mike Kolander.

rsl-v1.43/doc/RSL_print_histogram.html0000644000102200007640000000201506600002410014712 00000000000000

RSL_print_histogram


Synopsis

#include "rsl.h"
void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename);

Description

Print the structure pointed to by histogram to stdout. min_range and max_range specify the minimum and maximum range of the radar that was used to generate the histogram.

Return value

None.

See also


RSL_allocate_histogram, RSL_read_histogram, RSL_write_histogram, RSL_get_histogram_from_ray, RSL_get_histogram_from_sweep, RSL_get_histogram_from_volume

Author: David B. Wolff rsl-v1.43/doc/RSL_range_struct.html0000644000102200007640000000072606600002410014210 00000000000000


If #define USE_TWO_BYTE_PRECISION when building and installing RSL, then

typedef unsigned short Range;

else,

typedef unsigned char Range;
rsl-v1.43/doc/RSL_histogram_struct.html0000644000102200007640000000031206600002407015106 00000000000000
typedef struct {
  int nbins;
  int low;
  int hi;
  int ucount;
  int ccount;
  int *data;
} Histogram; 
rsl-v1.43/doc/whats_new.gif0000644000102200007640000000200606600002414012565 00000000000000GIF89a%ó¿¿¿¿¿¿¿¿¿ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù,%CÿðÈI«½8ëÍ»ÿ`(ŽdifIª®¬ \.¥¢ì{‚«}ËmÔ“^lwk~®£N2Ä— %ÌÇì騫ˆeƒ©e%·ó%«gâ©&î²iéͳöÎbsø¦ýNÇ?iX[uhaS.IWoFF‡†rzN}BG~•m{–{œQ/O`¡€˜$a™^ŸR¤Ú¦ZÃ⫈M¡fÑÇÎÝÜ´ü²yTb0JxIzËgðT' £òµj‰ž¡JçbÅã•bÛB[ìÿ°‰B‰<’(Sª\ɲ±–#{Üêõ’HĘMÐœÕ &D:;5þœDS]Å/ø”$™T'«‰{-…9Ê蔩Ãô )‘¡Ðh7uÍjZÂ$œ#yú¼Öë¸\ûÀ±:¶iTÍKð2>ä(´@ql³vÄÕØÝy}ûiu““qÂpŠbX›ëmRµ-7Ž«m¹ºsî]ÆŒØí[¢%âÚYÞíû8刧UÕÈ®Cáþ6ýMPÁ£gJ…SÙcs—róæVt:£§\Ý)®ôÝ'¸a;§`ÌøueË?{’ˤ[õÜ{~}â>óëßÏ¿Êþ‰äEÿ€e³^ nV l»]W"è wÊ7 $¶– …#8ø`8^džQ~˜‡%zB—‰ªA–_˜T³ˆýõ 5³•h–££vbÝÈI‹Å 7Œ)Èf'}äÙˆxñÈšVáÙbœ’ÿøåša‰M•ŽØ^ÐÄV†N]¸U7.&)åbkù†K\Âå¢M)kf…_n ê¥e|XÉ9H3:)$^kÆ[hÒi]2HùاW§DF#t“ŠDg˜¥Õ2ª¥w@¶'ŸBšu7UÒ”¢Á Z䕾ŒXh¨½ú¢žÂÉê(Pg&÷X«¶òäëYI˜–j}f)³«¸Ây,—|);êdÁ‚Jè°'êvÍ´Œu›¦´5û”©©v çp™e¦,¶Ãj›mA䨥ªv¢æÆn¾Š-6Öm‚!™Ú¶ˆyh¯‡’;eºŸ~Ùq“kF›®»ÏR÷ª›]W ,”ÝåH*¸Ëþ!•‘Âï­SºG{ú¬ÊÿY»ž6(™§#nGÖk2˜xlß|vâ)]Ìü4Ê./{¾Œ4…@£ôÞÑŽš5œ;rsl-v1.43/doc/RSL_free_cappi.html0000644000102200007640000000155006600002406013606 00000000000000


RSL_free_cappi

Synopsis

#include "rsl.h"
void RSL_free_cappi(Cappi *c);


Description

Free the data structure Cappi, previously allocated via RSL_new_cappi, from memory.


Return value

None.


See also

RSL_new_cappi, RSL_cappi_to_carpi.


Author: John H. Merritt

rsl-v1.43/doc/RSL_reverse.html0000644000102200007640000000146306600002411013163 00000000000000

RSL_reverse_sweep_order


Synopsis

#include "rsl.h"
Volume *RSL_reverse_sweep_order(Volume *v)

Description

Reverses the order of the sweeps in a Volume. This function is most useful if the original ingested file provided the sweep elevation angles from high to low. This routine alters the input Volume v.


Return value

Upon successful completion, RSL_reverse_sweep_order returns a pointer to the structure Volume. Otherwise, NULL is returned.

See also

RSL_sort_volume

Author: John H. Merritt. rsl-v1.43/doc/RSL_get_next_cwise_ray.html0000644000102200007640000000261706600002407015401 00000000000000

RSL_get_next_cwise_ray

RSL_get_next_ccwise_ray


Synopsis

#include "rsl.h"
Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *r);
Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *r);


Description

cwise, means clockwise and it is defined to mean "in the direction of increasing azimuth angle (don't ask)." ccwise means counter-clockwise and it is defined to mean "in the direction of decreasing azimuth angle." Dennis Flanigan defined cwise and ccwise.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.

Author: John H. Merritt rsl-v1.43/doc/RSL_rapic_to_radar.html0000644000102200007640000000261506600002410014460 00000000000000   


RSL_rapic_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_rapic_to_radar(char *infile); 

Description

Reads a RAPIC (data from Berrimah Austrailia) file and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.

The radar structure is, essentially, an array of Volumes. These volumes represent several field types, including but not limited to, reflectivity, velocity and spectrum width fields. 


Return value

Upon successful completion, RSL_rapic_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set. 

See also

RSL_anyformat_to_radar 

Author: John H. Merritt. rsl-v1.43/doc/RSL_get_sweep.html0000644000102200007640000000210306600002407013467 00000000000000


RSL_get_sweep


Synopsis

#include "rsl.h"
Sweep *RSL_get_sweep(Volume *v, float elev);


Description

Looks in Volume *v for a sweep that has an elevation angle +/- beam width vertically. If found, then that sweep pointer is returned, else NULL is returned.

Return value

Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_volume, RSL_get_ray, RSL_get_first_sweep_of_volume, RSL_get_ray_from_sweep, RSL_get_closest_sweep, RSL_get_next_closest_sweep

Author: John H. Merritt rsl-v1.43/doc/Makefile.in0000644000102200007640000002323511747610602012167 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 = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(docdir)" docDATA_INSTALL = $(INSTALL_DATA) DATA = $(doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign docdir = $(prefix)/doc/$(PACKAGE) doc_DATA = *.html *.gif *.jpg EXTRA_DIST = $(doc_DATA) *.fig all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(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 doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ rm -f "$(DESTDIR)$(docdir)/$$f"; \ 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docdir)"; 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 clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-docDATA install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-am install-man: 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 mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-docDATA install-exec \ install-exec-am install-exec-hook install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-docDATA \ uninstall-info-am install-exec-hook: -mkdir $(prefix)/doc -mkdir $(docdir) $(INSTALL) -m 444 ../README $(docdir) $(INSTALL) -m 444 ../CHANGES $(docdir) # 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: rsl-v1.43/doc/RSL_volume_header_struct.html0000644000102200007640000000065206600002411015732 00000000000000


typedef struct {
  char *type_str;  /* One of:'Reflectivity', 'Velocity' or 'Spectrum width' */
  int nsweeps;
        float calibr_const;        /* Calibration constant. */
  float (*f)(Range x);       /* Data conversion function. f(x). */
  Range (*invf)(float x);    /* Data conversion function. invf(x). */
} Volume_header;
rsl-v1.43/doc/RSL_write.html0000644000102200007640000000433506600002412012644 00000000000000

RSL_write...


Synopsis

#include "rsl.h"
void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_t able[256][3]);
void RSL_write_pict(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]);
void RSL_write_pgm(char *outfile, unsigned char *image, int xdim, int ydim);
void RSL_write_ppm(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]);


Description

RSL_write_gif: Writes a GIF file. It uses ppmtogif to convert the image to GIF format, via a pipe.
RSL_write_pict: Writes a PPM image file.
RSL_write_pgm: Writes a PGM image file.
RSL_write_ppm: Writes a PICT image file. It uses ppmtopict to convert the image to PICT format, via a pipe. This is only the image portion of a PICT formated file. Additional programs, like mcvert (when I get it I will automatically place it in the pipeline), need to be run so they are viewable on a MAC.

Return value

None.

See also

RSL_rebin_velocity_ray, RSL_rebin_velocity_sweep, RSL_rebin_velocity_volume,
RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm.

Author: John H. Merritt rsl-v1.43/doc/RSL_anyformat_to_radar.html0000644000102200007640000000616511747562744015423 00000000000000 Title rsl.gif


RSL_anyformat_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_anyformat_to_radar(char *infile [, char *callid_or_first_file]);

Description

Reads radar input files. The format of the input file is automatically determined by using magic numbers. The input file may be compressed (with old unix compress or GNU gzip) and the magic numbers are obtained by passing the data through the GNU gzip decompression filter. Magic numbers are standard for the following file formats and, thus, are recognized by RSL_anyformat_to_radar:
 

WSR-88D (NEXRAD)

HDF (TSDIS format)

LASSEN (version 1.3 and version 1.4 files)

Universal Format (UF)

NSIG (SIGMET version 1 and version 2 raw product files)

MCGILL

RSL output format

RAPIC (Berrimah Austrailia)

RADTEC (SPANDAR, requires PKWARE compression tools)

DORADE

For TOGA and KWAJALEIN files, there is no standard magic information available. It may not be possible for RSL_anyformat_to_radar to recognize them. The optional second argument is valid for reading wsr88d files. See RSL_wsr88d_to_radar. Once the file type is determined, the appropriate ingest routine is called.

In order to reduce the memory requirements during ingest, you can call RSL_select_fields to specify the field types. For instance, you can select to read only DZ from the input file. The input file may contain other fields, but, they will be ignored.

PKWARE compression tools are required for the RADTEC module.  The data has been
compressed with implode and must be uncompressed with explode .


Return value

Upon successful completion, RSL_anyformat_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned.

See also

RSL_wsr88d_to_radar, RSL_lassen_to_radar , RSL_read_radar, RSL_uf_to_radar , RSL_toga_to_radar, RSL_nsig_to_radar , RSL_nsig2_to_radar, RSL_mcgill_to_radar RSL_kwaj_to_radar, RSL_rapic_to_radar , RSL_radtec_to_radar.

Author: John H. Merritt. rsl-v1.43/doc/RSL_structures.html0000644000102200007640000000220106602216317013740 00000000000000  


These are the structures of RSL.

Azimuth_hash
Cappi
Carpi
Cube
Er_loc
Hash_table
Histogram
Radar
Radar_header
Range
Ray
Ray_header
Sweep
Sweep_header
Volume
Volume_header rsl-v1.43/doc/john.merritt.html0000644000102200007640000000034206600002412013407 00000000000000 John H. Merritt
Applied Research Corporation, Landover, MD.
merritt@trmm.gsfc.nasa.gov.
rsl-v1.43/doc/Example_RSL_copy.html0000644000102200007640000000075306600002405014141 00000000000000


#include "rsl.h"

main()
{
Radar *radar;
Volume *dz_copy;
Sweep *s1_copy;
Ray r33_copy;

radar = RSL_wsr88d_to_radar("nex.file.2", "KMLB");

/* Copy of Volume for DZ. */
dz_copy = RSL_copy_volume(radar->v[DZ_INDEX]);

/* Copy of Sweep 1. */
s1_copy = RSL_copy_sweep(dz_copy->sweep[0]);

/* Copy of Ray 33. */
r33_copy = RSL_copy_ray(s1_copy->ray[32]);
}
rsl-v1.43/doc/RSL_cube_struct.html0000644000102200007640000000040406600002406014030 00000000000000
typedef struct
   {
   float lat, lon;
   float dx, dy, dz;
   int nx, ny, nz;
   char *data_type;
   Carpi **carpi;
   }
Cube; 
rsl-v1.43/doc/RSL_radar_to_uf.html0000644000102200007640000000276206600002410013777 00000000000000

RSL_radar_to_uf

RSL_radar_to_uf_fp

RSL_radar_to_uf_gzip


Synopsis

#include "rsl.h"
void RSL_radar_to_uf(Radar *r, char *outfile);
void RSL_radar_to_uf_fp(Radar *r, FILE *fp);
void RSL_radar_to_uf_gzip(Radar *r, char *outfile);


Description

Output the Radar structure, pointed to by r, to disk. The output filename is specified in outfile. The output UF file incorporates the NON-UF conforming NCAR record structure. Each UF record is surrounded by a 4 byte integer leading the UF buffer and a 4 byte integer trailing the UF buffer. The integer value represents the number of bytes for the UF buffer. This comes from the unformatted Fortran record descriptors. No UF library needed; the UF code in part of RSL. The routine RSL_radar_to_uf_fp takes a file pointer and is called by RSL_radar_to_uf and RSL_radar_to_uf_gzip. RSL_radar_to_uf_gzip passes the UF output through the GNU gzip compression filter; basically compressing the output on the fly.

Return value

None.

See also

RSL_uf_to_radar, RSL_write_radar

Author: John H. Merritt rsl-v1.43/doc/RSL_volume_to_cube.html0000644000102200007640000000300006600002412014505 00000000000000


RSL_volume_to_cube


Synopsis

#include "rsl.h"
Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz, int nx, int ny, int nz, float grnd_r, int radar_x, int radar_y, int radar_z)


Description

Convert polar coordinate Volume v into cube cartesean coordinates. This routine allocates space for the cube header and an array of pointers to carpi's. The routine RSL_volume_to_carpi is called for each dz.

dx, dy, dz specify the kilometer resolution of each cubic cell.
nx, ny, nz specify the cube dimensions.
grnd_r specifies the maximum ground range to load from the volume.
radar_x, radar_y, radar_z specify the location within the cube for the radar. Typically, radar_z equals 0 as there is no data below the radar. Specify dx/2 and dy/2 for radar_x and radar_y to center the radar within the cube.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_get_slice_from_cube, RSL_volume_to_carpi


Author: Mike Kolander rsl-v1.43/doc/RSL_free_radar.html0000644000102200007640000000141606600002406013604 00000000000000

RSL_free_radar


Synopsis

#include "rsl.h"
void RSL_free_radar(Radar *r);


Description

Frees the space allocated to the Radar structure radar. It frees all substructures, Volume, Sweep, Ray, Range, by calling RSL_free_volume, RSL_free_sweep, RSL_free_ray respectively.

Return value

None.

See also


RSL_free_volume, RSL_free_sweep, RSL_free_ray

Author: John H. Merritt rsl-v1.43/doc/RSL_copy.html0000644000102200007640000000213311410462157012471 00000000000000


RSL_copy_...


Synopsis

#include "rsl.h"
Ray *RSL_copy_ray(Ray *r);
Sweep *RSL_copy_sweep(Sweep *s);
Volume *RSL_copy_volume(Volume *v);


Description

RSL_copy_volume calls RSL_copy_sweep for the number of sweeps. RSL_copy_sweep calls RSL_copy_ray for the number of rays. And RSL_copy_ray copies the array of Range of size nbins. All header information is preserved. This may or may not be a desired capability.

Return value

Upon successful completion, a pointer to the appropriate structure is returned.

See also

RSL_free_volume, RSL_free_sweep, RSL_free_ray

Author: John H. Merritt rsl-v1.43/doc/RSL_sweep_struct.html0000644000102200007640000000037206600002411014235 00000000000000


typedef struct {
  Sweep_header h;
  Ray **ray; /* ray[0..nrays-1]. */
} Sweep; 
rsl-v1.43/doc/RSL_get_range_of_range_index.html0000644000102200007640000000116606600002407016477 00000000000000

RSL_get_range_of_range_index


Synopsis

#include "rsl.h"
float RSL_get_range_of_range_index (Ray *ray, int index);


Description

index represents the bin number of the Ray's range. The geographic range is calculated from the range of the first bin and the bin size.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

Author: Dennis Flanigan. rsl-v1.43/doc/RSL_azimuth_hash_struct.html0000644000102200007640000000035406600002405015601 00000000000000


typedef struct _azimuth_hash {
  Ray *ray;
  struct _azimuth_hash *next,*ray_high,*ray_low;
} Azimuth_hash;
rsl-v1.43/doc/RSL_add_dbz_offset.html0000644000102200007640000000232607146621746014474 00000000000000  

RSL_add_dbz_offset...


Synopsis

#include "rsl.h"
void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset); 
void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset); 
void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset); 

Description

RSL_add_dbz_offset_to_ray Adds a calibration factor 'dbz_offset' to a ray's range bins containing valid values. Valid values are those other than NOECHO. 

RSL_add_dbz_offset_to_sweep Calls RSL_add_dbz_offset_to_ray for each ray in the sweep. 

RSL_add_dbz_offset_to_volume Calls RSL_add_dbz_offset_to_sweep for each sweep in the volume. 

Return value

None.


Author: Mike Kolander. rsl-v1.43/doc/programmers_guide.html0000644000102200007640000004742206701166367014537 00000000000000



 
 

Programming Guide for RSL.

Design philosophy:

The design philosophy is simple. Routines are functions. Routines are short and simple. And, higher level routines are built upon lower level routines; a hierarchical modular design.

Each procedure in the RSL is a function that returns a pointer to an object that it is designed, or self documented, to return. In the case of scalar functions, scalar values are returned. There are exceptions to this rule wherein we have procedures that modify their arguments, but, these are few. Also, each function does one thing well. This makes the implementation of each function simple and easy to understand and, therefore, easy to maintain. The power of the library has come from building higher level functions from many lower level functions. Eventually, the highest level function takes a filename as an argument and returns a Radar pointer.

The Radar data structure is designed to contain values and header information making it a superset of all the radar data formats currently encountered. Currently RSL can ingest the following file formats: nexrad, lassen both 1.3 and 1.4 file format versions (MCTEX too), UF, toga, new sigment (nsig) both version 1 and version 2 file formats, mcgill, kwajalein and rapic (Berrimah data).
 

What's New?

Future plans.

There are no plans for added functionality to the library. However, there are always new functions that pop-up. The documentation must be improved. Other than that, bug fixes and optimizations will be incorporated. Therefore all furture releases are expected to be minor.

Can read compressed files automatically (new since v0.41)

Transparent, to all ingest routines the capability of filtering the input data file through the GNU gzip program for decompressing the file has been added. This feature does not appear to slow the I/O time and, in some cases, especially on 486 pc's, improves overall throughput time. Two generic, internal routines, have been added: compress_pipe and uncompress_pipe. Each routine takes a FILE * and redirects it through gzip. Each routine returns a new FILE *. Wsr88d files occupy 1/10 the disk space when compressed and the TRMM Office plans to compress wsr88d files to CDROM and 8mm tape for overall throughput savings for the production system. It will no longer be necessary to decompress the data before processing level 1.

Similiarly, UF output can be saved using the gzip filter. The new routine added is RSL_radar_to_uf_gzip which utilizes the gzip compression filter.

Can read stdin (new since v0.39)

A new routine is provided called RSL_uf_to_radar_fp which takes an open file descriptor and returns a radar pointer. That file pointer can be stdin. This special interface syntax, for the UF ingest, is an exception to the interfaces that the other ingest routines have. All other ingest routines, including RSL_uf_to_radar, have been modified to read stdin when the input filename is NULL. The complete list of routines is: RSL_wsr88d_to_radar, RSL_nsig_to_radar, RSL_lassen_to_radar, RSL_uf_to_radar, RSL_mcgill_to_radar and RSL_toga_to_radar. The only routine that will not accept stdin will be RSL_anyformat_to_radar. That routine will not be able to handle reading stdin because it needs to read the first few bytes of the file to determine which ingest routine to call. If you plan to make a filter program, you'll just have to know what file format you expect: UF, nsig, wsr88d, etc.

Verbose print mode:

The function RSL_radar_verbose_on() and RSL_radar_verbose_off() control whether or not the radar library prints diagnostic messages during execution. These routines simply toggle an externally defined variable, radar_verbose_flag. If you're writing a new library function and you want the user (another programmer) to control the printing of diagnostic messages or not, you simply place print statement as the consequence of testing the variable radar_verbose_flag. For example:
extern int radar_verbose_flag; /* Define before usage. */
 /* Somewhere in the code. */
 if (radar_verbose_flag) printf("I'm here now. Whatever.\n");

Writing methods (structure specific interfaces for routines):

The natural hierarchy of Radar makes it easy to construct routines that have interfaces that work on each of the substructures. When writing a function that manipulates the Ray data, it is easy to provide the interface for the Sweep, Volume and Radar without much extra effort. I will illustrate with an example that adds two Rays.
Ray *add_rays(Ray *ray1, Ray *ray2)
{
int i;
Ray *ray_new;
if (ray1 == NULL) return NULL;
if (ray2 == NULL) return NULL;
ray_new = RSL_new_ray(ray1->h.nbins); /* Allocate the new ray. */
if (ray_new == NULL) return NULL;
ray_new->h = ray_new->h; /* Copy the header information. */ 
for (i=0; i <= ray_new->h.nbins; i++) /* Add each range element. */
  ray_new->range[i] = ray1->range[i] + ray2->range[i];
return ray_new; /* Return this new ray. */
}
It is valid for the routine to accept NULL's. This should be checked and appropriate values returned. In the case above, we return NULL. We could easily return the ray that is not NULL, too. The choice is up to you. The routine is a function and returns a structure pointer similar to those it manipulates; or self documented to return. Space is allocated and header information is copied. You might ask, "Why don't we call RSL_copy_ray, then call RSL_clear_ray?". This is a viable approach and it will work well at the ray level, however, for the sweep, volume, and radar interfaces we don't want to recursively copy all substructures because it is more troublesome to copy, clear and set all the levels, than to simply allocate and set at each level. To construct the interfaces for Sweeps and Volumes is easy. For the Sweep interface we recognize that a Sweep is an array of Rays. You will notice that this routine is coded almost identically to the ray routine.
Sweep *add_sweeps(Sweep *s1, Sweep *s2)
{
int i;
Sweep *s_new;
if (s1 == NULL) return NULL;
if (s2 == NULL) return NULL;
s_new = RSL_new_sweep(s1->h.nrays);
s_new->h = s1->h;
for (i=0; i <= s1->h.nrays; i++)
  s_new->ray[i] = add_rays(s1->ray[i], s2->ray[i]);
return s_new;
}
The pattern continues for making the Volume interface.
Volume *add_volumes(Volume *v1, Volume *v2)
{
int i;
Volume *v_new;
if (v1 == NULL) return NULL;
if (v2 == NULL) return NULL;
v_new = RSL_new_volume(v1->h.nsweeps);
v_new->h = v1->h;
for (i=0; i <= v1->h.nsweeps; i++)
  v_new->sweep[i] = add_sweeps(v1->sweep[i], v2->sweep[i]);
return v_new;
}
And finally, for Radar.
Radar *add_radars(Radar *r1, Radar *r2)
{
int i;
Radar *r_new;
if (r1 == NULL) return NULL;
if (r2 == NULL) return NULL;
r_new = RSL_new_radar(r1->h.nvolumes);
r_new->h = r1->h;
for (i=0; i <= r1->h.nvolumes; i++)
  r_new->v[i] = add_volumes(r1->v[i], r2->v[i]);
return r_new;
}
These four functions allow us to add two radars, add two volumes, add two sweeps or add two rays. The development was simple. For the radar routine we loop on the number of volumes and call the volume routine. For the volume routine we loop on the number of sweeps and call the sweep routine. For the sweep routine we loop on the number of rays and call the ray routine. For the ray routine we loop on the number of bins and perform the work. Simple. This is how many of the RSL routines were written.

Using h.f and h.invf and defining your own function:

The header members f and invf are provided to allow you to define the conversion function for internal/float storage. These header members are in the structures Volume, Sweep, and Ray. f takes a value of type Range and returns a value of type float. invf takes a value of type float and returns a value of type Range. f and invf should be inverse functions. That is, c == invf(f(c)) and x == f(invf(x)). Range is a datatype that represents the type of data for internal storage. Typically, Range will be unsigned char or unsigned short depending on the configuration option USE_TWO_BYTE_PRECISION the file makefile during the build and install step of RSL. There are several predefined functions and they are based on the WSR88D, or NEXRAD, encoding. There is a function for each field type: reflectivity, velocity, spectral width, etc. However, only two distinct functions are provided because the other field types can use these functions as well: DZ_F (and DZ_INVF) and VR_F (and VR_INVF). DZ_F and DZ_INVF apply to reflectivity data and VR_F and VR_INVF apply to all remaining field types by default. There are no restrictions for f and invf. Typically, you either pick the default functions DZ_F, DZ_INVF, VR_F and VR_INVF and assign them to the header member h.f and h.invf, appropriately, in the routine that is ingesting data from disk and constructing the Radar data structure. You can define your own encoding functions and assign them to h.f and h.invf. To illustrate:
static Range invf(float x) {
 return (Range) (x/2 + 10);
}

static float f (Range x) {
 return (float) (x - 10)*2; /* Not quite a perfect inverse function. */
}

Volume *volume_routine(Volume *v)
{
 v->h.f = f; /* Assign the float function. */
 v->h.invf = invf; /* Assign the Range function. */
 return v;
}
So far in the construction of RSL, the only location where you assign h.f and h.invf is in the ingest routine for a particular data format. The routines RSL_uf_to_radar, RSL_lassen_to_radar, RSL_wsr88d_to_radar, RSL_nsig_to_radar, RSL_toga_to_radar, and RSL_mcgill_to_radar each define the invf and f functions; in some cases the default functions are used. The file volume.c contains the default specification for DZ_F, DZ_INVF, etc.

Image generation:

The image generation section was initially written to test and debug the development of the library. However, some of the image generation capabilities are becoming a permanent feature of RSL. There are two parts to image generation. One, defining the color table and two, making PPM images. Assigning colors is critical to making color images, otherwise the resultant images will be black. The color table in RSL is global to the image functions and is statically allocated so that once the color table is defined, that's it. There are several routines that load color tables, but the main idea is that there is a red table, a green table and a blue table. Each of these tables is a separate file on disk stored in /usr/local/trmm/lib/colors The /usr/local/trmm prefix may be different on your system. These are the default color files and so you can use any file you like. Each file can contain up to 256 bytes, each byte represents a color intensity in the range 0 - 255. The color are ordered, in the file, by color index. The first byte is for color index 0, the second byte for color index 1, etc. There is only one type of image made, PPM. Well, I can make PBM and PGM too, but I consider them similar to PPM. To make other types of images like GIF, PICT, etc. I pipe the output into the ppmtogif, ppmtopict, command appropriately. I do this because I don't want to include all the different conversion sources in RSL. If you don't have the pbmplus software on your system, you can still use these image functions by either making your own ppmtogif command which is a csh script with the sole command 'cat' in it or modify the RSL library routine to not pass the data through the pipe. Also, when making PGM files, I pipe them into gzip so that the output files are small. The image generation functions are designed to meet our specific needs and I cannot say that they will be suitable for your needs.

Writing a new ingest routine:

Here we explain how to interface a new file format into RSL. This means we read the file format and assign values to the appropriate structure members. The interface will return a pointer to Radar, allocating all memory. Or, it will return NULL indicating an error.
Radar *RSL_something_to_radar(char *infile);
The file added to RSL will be called something.c. All the code needed to ingest the file and create the Radar structure will be in that file. It may be necessary to rely on another library that can ingest the data file utilizing a nicer interface. That is ok, go ahead and use it. This new interface definition will be placed in the prototype section of rsl.h so that other routines are aware of it. Also, code to automatically determine the type of input file must be placed in anyformat.c. If it is not possible to automatically determine the type of file, then this must be documented as such and an explanation that when anyformat_to_radar returns NULL, it may be necessary to call RSL_something_to_radar directly. Memory allocation routines you will need are: RSL_new_radar, RSL_new_volume, RSL_new_sweep and RSL_new_ray. You may not know ahead of time just how many substructures to allocate, so allocate some reasonable maximum. You can reset the value of nvolumes, nsweeps, or nrays after the ingest is complete.
radar = RSL_new_radar(20);
...load radar->v[i] ...
...keep track of the max index for v[i] ...
radar->h.nvolumes = max_vol_index;
return radar;
You don't have to worry about deallocating the extra memory. Output routines -- to disk -- will ignore it. And, after re-reading it, the right amount of memory will be allocated.

New in v0.41 is the implementation of the radar structure member radar_type. Assign a descriptive string indicating the origin or the format type of the data. Currently used strings are: "wsr88d", "lassen", "nsig", "uf", "mcgill", "toga", "kwajalein". The string may not exceed 50 characters, including the null character.

Common problems that have occurred are:

  1. Not setting the beamwidth member in the sweep header. This affects image generation because the pixel size relies on it.
  2. The number of rays, sweeps, or volumes is not set or exceeds the amount allocated.
  3. Not calling RSL_rebin_velocity_... before generating velocity images.
  4. Not calling the RSL_load_..._color_table(). This results in black images.

RSL_copy versus RSL_new:

It is important to note the differences between these two routines. RSL_copy_{radar, volume, sweep, ray} returns a complete duplicate of the input structure. It duplicates all of the substructures. This means that it allocates the exact amount of memory that the argument occupies. If a Radar occupies 15 Mbytes of RAM, then a RSL_copy_radar will result in 15Mbytes of new memory allocated. The total memory occupied will be 30 Mbytes: 15 for the original and 15 for the copy.

On the other hand, RSL_new_{radar, volume, sweep, ray} allocates memory for the header structure and only the pointers to the substructure. You have to allocate the substructure yourself. For instance, if you call

RSL_new_radar(4); /* Four volumes. */
you will have to call RSL_new_volume four times. Do that with,
for (i=0; i<=radar->h.nvolumes; i++) {
  radar->v[i] = RSL_new_volume(40); /* 40 sweep pointers. */
   ... construct the volume ...
}
Here only 40 pointers for the sweeps are allocated and not the space for the entire sweep which would include all the rays. For each sweep you must use the code,
for (i=0; i<volume->h.nsweeps; i++) {
  volume->sweep[i] = RSL_new_sweep(400);  /* 400 is a good max. */

  ... construct the sweep ...

}

Using RSL_new to copy instead of RSL_copy:

Let's say you want to create the triplet, or quadruplet, set of routines that function like the RSL_copy function in that they allocate new memory and return a pointer to the appropriate structure, but, the routines are executing an algorithm on the data and so the result is a mathematical manipulation of the input structure. In other words:
my_new_volume = RSL_some_function_of_volume(volume);
The natural hierarchical construction will be:
Radar *RSL_some_function_of_radar(radar);
Volume *RSL_some_function_of_volume(volume);
Sweep *RSL_some_function_of_sweep(sweep);
Ray *RSL_some_function_of_ray(ray);
As I've stated before, the radar routine will loop on the number of volumes and call the volume routine. The volume routine will loop on the number of sweeps and call the sweep routine. The sweep routine will loop on the number of rays and call the ray routine. The ray routine will perform the actual function. One approach might be to define the radar routine as:
Radar *RSL_some_function_of_radar(Radar *radar)
{
  int i;
  Volume *volume;
  Radar *new_radar;
  if (radar == NULL) return NULL;
  new_radar = RSL_copy_radar(radar);  /* This is bad, bad, bad. */

  for (i=0; i<=radar->h.nvolumes; i++)
    new_radar->v[i] = RSL_some_function_of_volume(radar->v[i]);

  return new_radar;
}
Now, why did I place the comment /* bad, bad, bad */ in the code? At first, it seems, it may not be all that bad. But, remember that RSL_copy_radar will copy all the volumes and sweeps and rays and bins. The line that assigns new_radar->v[i] is allocating space for a volume too. Therefore, we are more than doubling the memory requirements, if we code the volume and sweep routines similarly. The amount of memory allocated will be nvolumes*space_allocated_to_a_volume + nsweeps*space_allocated_to_a_sweep + nrays*space_allocated_to_a_ray. That is a tremendous amount of memory, you're talking 3*15*15Mbytes (675Mbytes). In order to use RSL_copy_{radar,volume,sweep,ray} you will need to clear out all the volumes, sweeps and rays with a call to RSL_clear_{volume,sweep,ray} and you will have to pass the target structure to the routine which will make it an argument that is modified. This goes against the design of the typical RSL interface where a pointer to an object is returned by a function. A better solution is to allocate a new radar and copy the header information. Instead of writing,
new_radar = RSL_copy_radar(radar);
you write,
new_radar = RSL_new_radar(radar->h.nvolumes);
new_radar->h = radar->h;
The volume, sweep and ray routine can be coded similarly. For example, here is the sweep routine:
Sweep *RSL_some_function_of_sweep(Sweep *sweep)
{
int i;
Ray *ray;
Sweep *new_sweep;
if (sweep == NULL) return NULL;
new_sweep = RSL_new_sweep(sweep->h.nrays);
new_sweep->h = sweep->h;

for (i=0; i<=sweep->h.nrays; i++)
  new_sweep->ray[i] = RSL_some_function_of_ray(sweep->ray[i]); 

return new_sweep;
}
rsl-v1.43/doc/search.gif0000644000102200007640000000145106600002413012035 00000000000000GIF89a„!³ÿÀÀÀÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷ÿ!ù,„!@ÿÈI«½8ëÍ»ÿ`8!äuœbº‘ÈH†Á¢³Q1ªî+…àU)õZ®£ÄH12?,ÁGN£S›µpàí|¬°X|¿ÊˆÚü2T A‚¡Ûné»”ëíKÜVpU„†ƒ„R‚B‰R†s0ˆŠSx'6“š8:~!a¡¤.HG§>KO¥"ª?n…s­¢LQRX·‘B{˜´a0BDy$1%šÇhÇœ«0É“0 E$p1A¸ÖØZ¾À£°ÂÐsmU$†/×ë„Dé†q|MO”ÄO1ƒYà+¯þ©0SMŒ@W¬ÖJe«á)… DïÄ{  bq‰Å K8ÿ.b7Àà*q'«©T²p·+$\j»$ÒÔDmÅ’°\uR"ÏPbf™©K(¢!ú´ ‰HéJ¦y±.Ò'4rÚ]»!éר`ƒ|«‡fMTyŠ^Rv vÉ!`f¨×±#oéYõšPË 'úÙ;Û©¬-Yæ ®›X›”ÇØ`‰ôfp&@{1a†“”°ç& &ü<’tÄШP›F»:ë×[§”,ö Ø-ÈvVVŒY¤q_“Š€ ³áj"Ÿíí³iÜvcf}ªˆP$àÚAòçÊŸ£#.¾ £o5UQrn唽øäëeQ‹¡OŸ ç\÷ÉÖxó‰7Ôõ!E˜zäô Æü÷€yü‘Uöq„‚ ¦ÃpæÀu ëÜWÜ ( Ã7ØÐ"_5(&–09Ø·›@ Îh%¶£ èh4ž ëÈ0×5‡Tô`:þR–eÙ1H<šFrÄ‘d’Pfð¤“òwJ•3TÉ…rA5—‘u%"Ï‘o¥vëý•‡~rÜ(’~ȨäMqbh/½˜uerê ÃLyÞÉh—ŸÙ`×@"Ç j@¢Æ Ú<¢Æ¦“ØÐϧV *Š˜,J)5D;rsl-v1.43/doc/gv_sites_but.gif0000644000102200007640000000532306600002412013266 00000000000000GIF89adöÿÿÿ!!!)))111999BBBJJJRRRZZZccckkksss{{{„„„ŒŒŒ”””œœœ¥¥¥­­­µµµ½½½ÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷½µµŒ„„{ssskkkccZRRcZZRJJJBBB999111))!­­µkkscckRRZZZcJJRBBJ99B119))1!!)!ïçïÎÆÎÖÎÖ­¥­”Œ”¥œ¥{s{sks„{„kckZRZcZcRJRJBJB9B9191)1)!)!!,dFÿ€:  EJHG † E†—0#Š/DI  G  ŽŠ¢ ¡­  D¹C H à ½DˆK™ C®G F/çåçœ ÍÑÀÊÑ  J BœÅ¤äÊÄ@„ ’ 2dS&H"@ã@‚ fCÀ@•Àq@«…P°7↔ƒLÀ`v!eƒ LA€C 4à²C/ )5,ÐwPAÊ j¨!å7´8àƒ0+ȶԑ´r iÂÆ€Nÿ Ha#TãX²Ì9M¯|\b‘NIf€D´GGýü8Q°*#0‰ûI§·BN@à  Ô8Âà˜ Aê%ØQ³&2z%‚f –%xaË01 ^ 8²‰ÈD`(1°à¤àd˜>m3†(ð–kRð „0¢€‚!œ(Ša  ¤Ž(`€@‚„ P²@Ì0€ d0ÈC0½ QÁ,E<5BEDàB)E` Pp‰8Р!H@ .4sÀ=ˆÒD „“À ÝOp@A D0ÿ ¤°@ ¡Wð—@ 0Àd\€‘/¥TAúD`L@PCÀÁŒe$a Ÿ+]VåCÒEà¡,ö X€#À ’€ˆ8 ÌHÂSlaàB/èl‚”H#Ù@;°ƒœ´,΀4Ë€ ŠRÐą8!%€+A€Ôƒ¥ëÀB7`G(@ € À܆FpÎ…&‚ Z<Ű$Ð (¡…a?0‹C¤3@‹ÚÇŒk5B¿X€ÿ `‚¤¾â#@Ù€^ÐÇl&!À6Là4jÜ3¹Û\¨ 8Ѓ§H`ø ’¬¤˜Cƒ`„|$¥)^㤈*‰1T„}¼ )Ì,0 ˜H¥3`€O V>!YøÐ…TáÑW<PúÜ€&° Áš ÈRPp€%7 É8 Ú+<’„œ`"/ÈW øI€šL 40ÇS:÷h€7éh"  )H€Ê €OiÈFp¡¤@ƒû±J$  H *‚ªNæ`ÌRè#5¹BÔIñ‚MJ„"Ѐ$Â×`-øÿq ‚ÆQ•Þ"ƒÄà7Ô’r4ÈK:zÇ 3Ї ôÅFƒ9uOzb 6ÊJž%Æ Ì&ºDÜ%°ô»¨Ñ I<ÉÞ³¿9Á Ÿ@'8@!¬ù$@ÝLÕ:] ¥™ÄÙÌ0l#9t"W< a{+*c¬Â÷†3¸j¤””ÌIó–SuBëê9"¢ ‚^éHS¢"Ð;rsl-v1.43/doc/RSL_write_radar.html0000644000102200007640000000266306600002412014017 00000000000000

RSL_write_radar

RSL_write_radar_fp

RSL_write_radar_gzip


Synopsis

#include "rsl.h"
int RSL_write_radar(Radar *radar, char *outfile);
int RSL_write_radar_fp(Radar *radar, FILE *fp);
int RSL_write_radar_gzip(Radar *radar, char *outfile);


Description

Save the Radar structure to disk. This is useful when it take some effort or time to build the Radar structure from data; you can save the Radar as an intermediate result of processing. RSL_write_radar_gzip writes gzip-ed files by passing the data through GNU gzip.

Return value

Upon successful completion, the number of bytes written is returned.

See also

RSL_read_volume, RSL_read_sweep, RSL_read_ray,
RSL_write_volume, RSL_write_sweep, RSL_write_ray,
RSL_read_radar, File format.

Author: John H. Merritt rsl-v1.43/doc/RSL_area_of_ray.html0000644000102200007640000000221306600002405013754 00000000000000


RSL_area_of_ray


Synopsis

#include "rsl.h"
float RSL_area_of_ray(Ray *r, float lo, float hi, float min_range, float max_range);


Description

Compute the volumetric area of a sweep given a range of dBZ, a minimum range and a maximum range in km. Ranges are specified in km. lo and hi are the minimum and maximum dBZ values within which the fractional area is computed. The name of this routine is unfortunately misleading. The area is really a volume. The total volume for pixels present within the range of lo to hi is computed and returned. This routine is used by the routine RSL_fractional_area_of_sweep.

Return value

Upon successful completion, a valid floating point number is returned.

See also

RSL_fractional_area_of_sweep

Author: John H. Merritt rsl-v1.43/doc/RSL_rebin.html0000644000102200007640000000400606600002411012603 00000000000000 RSL_rebin...  


RSL_rebin_...


Synopsis

#include "rsl.h"
void RSL_rebin_ray(Ray *r, int width);
void RSL_rebin_sweep(Sweep *s, int width);
void RSL_rebin_volume(Volume *v, int width);


Description

Rebin the data from -width to +width, centered at 0, to a positive value, such that -width corresponds to 1, and +width corresponds to the value 2*width+1.

NOTE: This function modifies its argument: Ray, Sweep, or Volume. Use this function prior RSL_sweep_to_cart. The actual binning is done in RSL_rebin_ray. 


Return value

None. 

See also

RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm

Author: David B. Wolff rsl-v1.43/doc/rsl3.gif0000644000102200007640000003652506600002413011465 00000000000000GIF87aHd÷ÿÿÿ{{{RRRJJJBBB999„{{Æ­­J991ÞµœJ9)kµÎΜ”ΔŒŒcZŒ{Ö¥”ÞJÆR!ÿ„Jÿ”Zÿ{9ÆRÎ¥ŒÖ”cÿŒ)½Zÿƌ֥s­s9c1ÿ”!µc{BÖ¥k”k1ÿ¥)ÿœÿ½ZkŒk1sJçΜZBÿµÿÆB¥s÷µï­÷½çÖœçÎ{ÿÎ1ï½ÿÖ!ÿÎRB{kçÖs½­JÿÞ91÷ÞÿïRRJ991µµBs{kss„RcÎçZµÎBœ½1sŒ!kŒÆïJ­Ö9”µ9RsœÖŒÆ{¥)ŒÆ!ZŒ1J”Ö)œÞ)¥ÿk­9c!9¥ÿ1sÆ¥ÿ9RœB{ÎÖÆœÿ9ZµcÎR9ï)!ÿ!¥!Î9B9c”cJ„JRœR!R!J½J1„1)s)9¥9J!k!!œ!)Î)!Î!”!Þ!¥ÆŒœ­ÆcÞ„”­ÎïïÖ­”scB!¥½Î9­BŒR¥!ZÆsB½cZÎ{J½k99¥c1„RB½sRŒk{B9Ö”)µ{µscB½Œ½„sR9{k!„k!Æœ­„¥Œ¥Œ{k¥”„{BJJJJœœ99!”œŒ”JR)1Rcc{Rs9JRBŒÆ9„½œ¥­1œÿŒÿ!Zœ!„÷„ÿ)„ïR„Î){÷)RœRç){1J„9„)cBÖ9Æ!BœJÖ)Jµ9çc{Î9JŒ1ç!œk{½!1s1Þ!­!Æ”­s{µJRŒBJ„9B„!kRŒRRZkkŒ!JJŒ99s!!Z9JBcZ1„µ¥½ZBZJRŒJZ),Hdÿÿ H° Áƒ°¡Ã‡Þ»'pâAŠ)j´±£Ç räˆð’¥J™€õêÖÍ\·wïÜ¥k¸cÈ‹7jü·³'O›m-ˆÑâΊ<“ú\ª´)Ó§N£ú48Ô!I‘R³Bݪµ+W¦«þ³w­˜µF•Y²ÔØ­lØZ¾;÷.œÀaÃ<]êµ/Ö¯]‘ryëÀbÄ @´h_À7 :R,Ä|#k–¼yëÄÏUÉ£Vé$¥I“rÝ–­\¹wÔ` m,¤朕7TÜIňù &Nˆýí\=u–…N¯ôëÕ§;‹3¸=wSÿÎŽÝ:ùóæÓk_|zEºè¶+¶–’#A–¦MÛNæ’×TóN6ÃCØPê•ç^‚è­Ç•n… „I‰ FÉZÁøb;a9Ö™o .„D ô;ë„g“n¸QDâ‹IÁèbŒ4Îhã?2âX£Ž7æ#O˜m÷Ï\îØ£_ÿü2 %”¸M9t!°Ð?˜ôqˆ% UV\ˆNmùáoç 6&xLòÈ$‹2 “Ó`ƒMì5¨àœr6Å"uÙ3N9ýqHX‰9*èeâ6]îhãÌ4½À‚¤"–4wÎ9îÐO•ä!Þ9Yæý'ƒ™Mv”AdRBÈ$ŽD"‰#ŽdÿRI6æ<×Ý—\nÖbPDÙcÍ6èI@¡±hTO)•ì²Èþ¤¬³Ì>k´ÍU”§Ž9Ø`ãLiJ2‰H%ʼFM¥ÃRõAwö¸ã+båã»»žêᮘèf$ ¹ˆ$¨ubI6á ^F Žª0¥žê,•}R‰3¬•#SFÄÕ«qpÖîÆñǦz|ïÇ#·«#RæCN7ådSI%ÄcÉj’U=ä<6îdl¼7AtHñ6ô@’Hâª)¤h°À"“ÈÑÈ0¿´hKgÍãÖóºë5×;Ë]Ai}RÉ“À¦Û¨!·Ý±Û ¿-wÜtãh™5Çè×ò-¹ÿbÉ$‰ÌáÈ4ƒ[1swÉbJ[-UU+yv¡TÉ!’<‰$qDâ9ÔdÓKk`Yaª:¶xþƒš#<3é;Lè4çÜÛá¾ñȼ‹ìû^ÁíÑÇ-½Ø£ÍåWÞH“ü¹öÃ$G/}O&wœ;Ȭ{*$•ú:‚ææ›»ê=ZzrsN I¨G˜ìVÔäÑÆO­ãÒ²MP¾ž«9Î7΋wë§S‰ŠûDÕ0p€NUèÐücI”ÀÏþP r CÖ¸_ðÐ>è‰m*ºûÔÖ¬·;Ê ÅhqDÙ̉8ä’€%¡E,Êô@Hÿª÷»ön÷ŠŽ™ÿbK€Œ‰?>(¶àhk'ÓÅÄ)âæ‰Xt"»ftAèÁo—¸" ±– fãé€éf£ŒR\B0A‚(‚Ì=ŠÃÄôàºIXÂJûÜšTh‰˜í$KðÆ8l ¾PqŽÓë!Ý‚ˆ'LðÁ…@ƒ(Q dcÀÁ¤3ᔨÂ?RyÊ´r7­¼Ç+…òÊö”Rd ú`û‚†– D%P$žKˆ¢Qìa%uR‰‘T®2–’ ï*Ó:¤õ 5¨ID [?š†xîàM€iŒÃ<‘G‰d©Ê¤ÌR™îD%Rà9IìÄLd Â\@ÿ2¬ MœÆB dL h”'Oä)OvªÒ& Uh3OIÂqÑ0@É—}4áˆ?¼Ì¹Æþsw0Cé ‹n M….t–í™#X&´˜ºChºÄ(P“4H¸ ˆhÄ3bs zÂE.†ÑŠÜLË”-EX*Õgª’¢VÍêoH%<ð‹ aÐâ +xá…¹ …ÚlI<€ð€SêU_éÌ—b•™P…ædžè0•žÎ™Ë!ˆ: M”¢k5Œ0„U„ªqEedïK‡¶s²B¸SçA›c>Mš÷z KâçrÂô›6¤x„#Ò€F5ãI×vÿR5¯Ël¥d{c‹ éîp# \àÓΡa b)AŠ”Ëíðp·YÝ­2á9]¼ž¬u| [¯p: =¢4z¸…/‹TfÌ‚dšUÚº’²s¬VÇEâ,(7M…*øå9²ž‰0”„0×òÇ5Åì¾¥0‚ÁAa–vÕª35rÛ&^PùBS?c! ¸ h˜ÈÀ1ô!fÊ_{"QV^ÖÅÊ´,Œw%À;ò 80~þ¨2õ!½É¢pcUØ¡Ái(’ç‹[‰Ú؃)g%1‰AŒâჄ&q&K@J§!j%„ª†@\Ëõ(`“,ˆ€ÐÄ!‰ Ä+X‘R‚€{ðÃ*šj™ª°ˆ½Öm¤ç*é‡úîz©#ˆ|!‹—õÈ`F‰ T¥F(ºrg-êdë5Š{UE”T‚|8&, » –‡ÈÄZ^ö‰9#e¶ÈE3²A㉺¹ªs“±‚é‡8Ó\‚?{î§ „%ð’h ]òv‘‡7"ìFï­*ª¡mÛzÓªyí%«":ܺÉaÕ$˜:¼iÊz°»Äm&KV¾ó…8Xm~|¶4fJNÒ°@xî4Ž D½Œš.;s ÿ¦ä3ójïˆK¸ÒN½¨A‚ÉSI¸ñ#ˆÁÀ?GÄð Q€Ç?ÂáŒèF7ÌqÆ@¯µ“S4¢–vïÊÓj:Z+:KÇ5,¡G$‡ŒŒÀOJ)â+‚¢p7ÈnÙ¢¸TºOo9„{S8%ò)Ææ&ˆ&íï’ÈÄ!6±&`S§/ôj¦=:ÂòE2ÔÛËö9£j™ë±çb `иݘ€¡ ¼Æ7ºäÀ˜È.:$–ÈÏû¥-bõeûj}c´"OtÇMÇaL8"š ÔÎ)}£,@eŽBO$Oô¡K†3›•ì ({I‚Eÿ.*”´ »ŽØœ#4Q¡£Å$#¾àrðƒv· ßñœ¶¼å¼ÞWoéÂz4Af2 j²%æa#@ÃõB8 1pªÐ zD8s Á:pR9݇ ¤8…@ ÁÝ0 ¾ žS!jR|$ ¢vŠÀ 1!ÿ'BBÂo–Ç È[R)€ña ‚0€ðv4WæS[v&§á7–Ð [À*4VAÐn$DE¥bK”ƒërƒcrÅ÷w‹ð. 8à#@VíÆS G`ÐòÀ jCê¦=$á"wÈ1ËÂ[$ô>[x}E¾p ~S À;-ô/ް Ž0Ãÿ êäßP …ðŠàTØ""Ñó8ö3öPE#X àu=6AÇ¡4 D3T §‘kMà"/ðÈP ÒóH[…qÄ=3Zv“#0nœã*&ç9Œf D×`'D^7q½åI\%@ ·`ÈP >·žs|J³9ø1†#9#{€ EB_ëò5v=$(B0Û0 ß²*“ lØ4 üòw5gâ7·– AE ËX` Úx0È0vâX‘aÞ3 I3bOh\²Œ:u&ÅÖMŒEN ÷ÿ@ßp îð ¤Ä:´o~!Múè1³E'!:”Pýå9®òwˆuÂÀ ©0 ö7g‹W¤„="1â J V%3Ã*LÒŸ€Mq q5°8C§áe~r ;°{X26ö²‰ýè3Ö¡BLÂuJÐyWÆm8ðG– –Pj@…žÐAÂr@‚àh”oõ88Sã´…Ç”?¥4/ô/ËÑí€N»ð˜1cèe¡©rZ@ “@Qé° öYÄ ¨š^÷…-T! z„zY °?J|‰ÓD¿¨o“áe~ÿ€ •N€ð¶É\P ðgdU!i¡Ž#æ`A‘î€À—³õ—’!šª\5˜¾òGƒåw’`IOÉŠdÂÒÀZÿÐM[€Ç` ê¢+ù!FY‰¢ Ü  Ùp<³<^vˆ€bøKrK•2Ù€Ô  6€ÐH`žù{x82€Ø¡ÏÂ+db ™À*Ðfr  vÆžì™va@L(FšC407C÷åÀמ2lC”9xG3E`r%h Œp„4t|fRˆO·€ ݲ0^ÿ§_p±™1GG D &º…ãÿèå`í Jå ^F&kb Ÿpùr&wŠfy2¡úQã@1tjÐ3±]ÙÄYÖ¶ÒÉ$…G `íà:5Ðyµ(Ä0 ÿ2NÃB0  ð£7fð¢Yô$ài­Øz]@¹¨± óq˜͉&èÇSP °p È Æð&(0iÀ ¤ùª&˜™…³1)çðÞò2/3lŒ€–”Тï( ŸpÍéQÓÐ (Ò|$œÖ‰Ð>I×Ê%¼ˆÊ‚®¬âF† oàa8`†:°ŒÂ$”kplМéõÀ'¥ÿƒ­!íRhE '"©…ø{à MÈ•€–“М€w&-” °€sP ÃÀ ÅP ¼° ùkߨ¦5ö]9޳%9 ËQ –ðFx€ À`!I;§à9€’àQÚà pè€  Öàp@ Á ¡@ˆ ¤¼iyÁ7J8H=Ö9À ˸Œ[@‰©~àS@ ¹¸·Ò  ä€ â ŠéJ¹d@[[?" zh?±KE j!>H>,p&® ·`®ò[€ò›¥­WD¦v³›Õ*¼x)£-Þâeöp g[¬‘ù˜…™ CgÒ¢Ò&iš§ÿp ¯5{°Z”Yø—ßimz°°§ˆŒP£M’vÆ”g^àaÀN ’Ë ¸ Ëà+ÑðZç@æ Ðz‘¨ É¡§Ëº9»Ä²°B€ˆ°&?õSìY|Ú  Â0 @èuåæ?·tO4[ta= ¡7SµŠP Ë0 R¬S&²È$ÞÃq’0Aè—4´` º È $Á0 -Z)´w2XŒKƒ÷`I¢&yÁ‘ |á»O FbÐ9÷_Wðð•0×Я5€dÃbƒ |¦½É[qE|kÞ#xj&s0 ù´9š„Š¡$±ùXÀ>ÒÿZ4iêkz¯€1iÜ Ý Å —@5TSC…å=^63‰àÿx—P Y;Ƴ`Hê °(î 8³°V¯øÚ‰%©W‚- `á£4qàïPzËøBha`ùG%@>Ðß±(bš·t!° k…‡èµµŒ¦lš­ QVx€0š ^@–Ä$¶p î0–ÜMxʳͷp " ¨Àªû<Ó&å° {¶ö2¬’ hATÀqàã*qpÎF+¢KÀ\§qx À ç0,éU9ø\¸û§q9–·( 0`b¾ìYzÇì\àaÆÒ¢s¡búèÿ@<ÓÏu{Í¥ôª}¨0k ¶£4 § Ç¢Ù›ƒà9éQ'jÙ ”³Ñ.A9 Å›¦ bèPúñ}°&QCóš#êè¢ÏØBICVó¸õð ÄÐ hñ~–!Fç3ÓgºjZÏ@Á*˜3Cˆpj h NºgbŘ#n€j@?ðK$ ã° æ2}ÚàÙ8¼Œ*ŽX}º¥’³æF%{p’wf}÷wÇ&|À{€S¨€À- óµHA­ÆERôyë .c ãykÁÛ'QXæ— '™~-Ô9qàs›Ë` ̰”_ÿ Ø`iA1êÆ_9ÇŠ*84etúWF^0!Öy:ð,ÉQP£_@@º`Ò`AåÞÝpåÀÌS <¤ÞiÇÙLÿ1ëã=¹hŒð ˆ  j·ƒP³9pP ¾0 z`Ñ’¸ò¡rB¯÷ à®3~Ó&ô~pc8g5-ÊSðÙ9ü g"¢tÀÓ~# è”ןQSE¡ PåR>åP'÷ÃàŸð=Ö²C@ )í#f»IÓP _0  p£tÁÝ€5ýZÜÁCÚ1T.Êp;‡‹x°¨Aˆ²1äSVÿžƒ&špžóWp ˜µóéBSúJT>åvò‹ÃÍ6&%e‰À°Ø§!'ÁCôŽë· ’P¥/´Œ–‹1Dj€ ° ÎP _}¯žž‚-QŽR®¨ùÒ¢ëg&±@ ›—e¬xe—˜ á=@/pn° ¤ð ã஦­±2“"G®Ê›ÁNUþU>šO|çF%N« y©øc`˜p ;3ò½Œ]`ò]{­x.êžîôáÖQÂd‡ ß5e´(ç=”à7 úýw, NÊž8 e  @Ð,pŸ…$Obépt]˜‡šåÿyî•€ð”@XxNIV‘ðBÏOØ9nÐ0M0̰ZÚï 2,ñÔrA OåÛ=½éîU.ó†k¯îΨà-:C®ò+ÒY †Ð9D¥ipeàI¶s#\å{¸‡ÍÖµM¡G5hÃÇq°r!‚ n”° á ¸ê4…@ ÅZ¬né=†þÛ°l:sèç.Á¶ùrž“vOˆ™ð/¶Ö³.o€ `ÕBr РÓ@0ÙÀåD1«…Rõ-*Rž÷»ñôŒ#» Ì¢àzkÇù]W°ËQ¯à |p QÐfÿÐr4ÂèßÍ\{ü"! ×#`I C´HZ&ñ7“ T@~g" W&¥j 1ÖÖ| ŒŒš)Qˆ– 6wöî pàßE‹ÿÝÛØQÙÇŽ!C~T¦‘#ÇŽýa$ R q"MZ$©¦$Iq AÒäÈ%/¢0]*5‰’›380æŒ:rÙ°…Û6ÍY¹l \äg@£I‘_Qz,y,G’Q®UûìEŽ.29ðm#Jz0é¥D Q¥¾>ÑŒ‡è¤DD¥€CeF¸m%O6›ÖìåÈc1cv‹Òž5-S.‚$é%K€))JÝèСE“QúgÇfÿ¤HÂb-Ðgž:ò À®[À-[6mZ;{½j\Ùí?’lÍ^Ì.rì?J“>UšM˜<˜Jãf/ wìØ9 šÔ™0 (ÈòµíÜ9nr.šr°)‡ ë¼k %þ©N£´é#Í$Äè;¶à¢Ã€ øæšJéK¯J:©Ä’CA,’G"¤”KpŠ2Èå–ÌÂúÇ¢Í$D) 3´PÁ“0û•d~Ða .>YíK2©D5𙤕y'Iè›÷‚æŸúøç ' *†˜‡°Éæä©èº·~IA²Êšì"I±Ä.¼å’D&!J&D Áÿ­ÏH¸¬)D ±„&Ôf´cwÞ1sºÁ†çÈé&‘ Û.¬ -;+2zòŽx¼î €ç]ê/¨pÀd0㉿ ‰3j'”¶Zøƒ,>Cx[ .pÚµDv½Bàtˆ]£n‰š¨$Ž09–@–!@à F8ÞAAYL#Ó©Pw,´ÿ°=U‚¤0Å%N„Á 5!ƒª‰ôà&=8ÜÇa RÌÆßèF7Ê•ll#Ö°F5ꑯ@†2tâNòä·¾ù•JhêKš%˜œÄAøX¼xvlÏ„}:ÈÅðÔbYÚ~Æ–îP«gÍ‹ß?ìq † ˆPÑ•|" G¢48ùÃJgBQ\¢z׸Æ).ш °Ð†4Ô6r`ãïÀÆUÊİ4¨x ³NçÔwJ8‚>¸AŠLpâd1˜xndB“ØD ¨‹Dð¬m,³ 8°±Fk¸cZCúYò¤u-:ªe-A»2‰-ÿAâb;iTa `Œ ÈÉ»$ñ,° MÅ"WI(B:£cÏØ÷à ¡ §ÛU_â³öh1ŒD \0‚êiÑè‚>0+¬!à ©þ±‡;\„)Ùª=@€êdîYÑÒÓHæÙ¾Ðdc’pC˜Ä¤A"Kä Fà‚‰¹)€Öª§Žk¸CäèT7ˆŠ tàÐaâØ¨åÌä iŽB’¦[ð'ÂÄÁö NÒ À²t7u ^@‚`˜ØCSá·ÄjmîžS]&Μ391|a€‚ ((.1±7`‚–ˆÀMI öD)(€A”@ bСÿÓ)ÆrÙ#sJ)T£:¶]ÄJ|ÀDG|K5œ. £ñë7o  À¤4Âê¶êÁyœ5ì¡ o8cw|L³ä÷Dìxö™õĈF`ÅDä8‚V ‚:µx½H0 &(' Á$*|!1`ƒ. ÊŸtyy’jéj¡ÔðB‡é£‹X‡Ÿ‹0©0* Á* GRÄâz’è60qT#ÎHšêp‘ϸCÚàÆ. Òá)-‰cÚÜb%G\בh8Ã~Pƒ¨ ŒŠXM¨E.V¢úéCÌ4€{„#¼ëá7´ÜÏÀií€ÇW.×¾œÙI¹éÿÅÓFNùȦ‡uD6'æŽwÀ’–ZüÄ!Ü'x­ Øå“ïùF“*c®M^sÎ@÷…,J•øÃ ÙŽvŒ`$ø J˜X®d”ð ´C Yˆa›@õh›;€ƒ1ì}MT3h¿3›Lb^œQmaY¾BL zôÂÅ¡‰^Q 耎pô°‡î`Æ?• sÐA¿m‡2›zܺ&ªñ„aí@Éì5³Ñ¶fnÏJ¬Áæ|ò"Lèù¦˜][±Bà‹íÐOÿ PŽm0Å—‡5þQsLãS ü?Ћ!“Ì3Íîl–Q¾´ê¹á . \€âø jqÀD)¬4%=Ã`fè‚§x§Žzðî!m«‡:6iw<0aïL7rÓÍiRªmU9À`ŽlT¢%’°„ F§Î›v€þvO$`„ì#? I¦èZz".rEs•¾=ˤP•0„l ‰/Á„7´Üžÿ6Øš0=üûá2 _T²ámcŠÓáôÖ‘”$¦FR‰ü –¼¥ TÀ5|Ë„¯#íÇÀª=ü#t¸Æ¯ÑCtl#çÈ:,â ¤ð\:vxÿ¿gº}#<ŠUÐîñѸ#Ù˜F.ˆ‘+¹¨Ú*ø<H!‹ðLb2•ð~:3Ñáì³z«ó0£ûþ½I¾ˆLæV¨ËK"ˆÀÉÂÐyX¦`¡±!ÌÝÏ)~£¹[À…^çh 0v¨«@l`ò+¥;IS*ðð ú³%XÒ¢‹ÙžoÑ31pƒI@„R …AyÀNox8@nІn0éÙ1Ìwè‰[†q7’#ìh£g‰ªœ9ž¯X‚twøKhú„I@ ›r¸„Pà¿Mxµo9°°€/ø‚Êr‡›y§ò­4[3h³öºžè'ÿ—У»;¨Sƒ ¨TBŒB²9hÈ™m€¬;ʤvøi°†ÃÄ%0„¹ˆ‹k ‚£;A©‡i„ œ-¢.°Ò³ƒÚH‘™ãè3@f¸£ *t™no¨q‡søŒцw6#‹¢{ ú=œ š0€]Ð: ¡²<ø‡šÈ[ ®R( D’ %T‚ h€W€q¸‡±§%:¿ <ºhy7¸2 [ŠƒØˆ?&¡¡Áj /‚R Gr>Š*è<È”Ã!™ò­wÈP™†n€ 7²ˆ T6¸úŠ?Œ-Y„ÿ‰FØ•8оp4} Àž*„J(¶;{ÀÁk‡Ú¤`‚D‡r®l‡¦s+™D§’HuËŒç2‰{X‚€Z …/i”„J°L($= Âð€˜vðA:F¢|+ï`»ªJ.wB¶µñ+(ŒšX–ã„s‰Ñ³jë–DúÀh'ȸÄsu  ‰ë! ªÃqiP4΂ %:)µàåQœ¨õ¤OØHŸx4ÀÐKLã˜ð_]€ :@¨è! j‡áY_›†g8À0òë å¢ ÿâ=É ‰%€£ ¢ªÃ B0—AÀoYâ &I#8‚A¡ÔèŠ'³@gs¶â¢¼33=i#ºB LȃDiÎÄ*Œœ©ô€OL( XRpà)ð€!X ‚´q8Þ š9ßbf"FÜ Œ¨ Ÿ‹Î)ϯÐ"Ü’ÂI(¤ò F*Qƒ-€  9þPB [:Gq¨¬ ÍM’©ø—e¿È;%à£2TËv3¸øv¸†»…\˜-DH%=Ûb‘ ™P5 >1@ƒø3š˜F¨„Jb"jŠ•]Lí™çZ®^4¿PAÙˆ ÁÒà¢ÿ45 Ö!=Š€  øÒj¸»x¢ÊI™‰½³„K(DL;²9R6hú,´Âôt÷Ø’BzµërÃ(™” ØÆ¸„.0Lw°L+€Ø$¡’= Ò±³çh‡jp+M NHüRõJ˹‹@Qwh…Z IOÒ£=A.H$ÏcøP+“’>@±4¾e2I,)M#Çõëˆê!­œÀ™ +)ÌÓ#Ò ™ŠØò"ã@V,Ð3]Ð…L’™¢ÅÓAOA†b€›™ñ¥QžÐºwØ%rÒØ‰ëù’뉃x¹p€ @Áˆ ÿ­@€(€è9‡Ø#rø¡ÿØs°f®û‡é˳H 5ÇË ‰ýN'ûŽ]8€%PH"] J ³©Y„AQBc…¥p¤ñÉTÀ€ƒºÞq²ÎÀÑ‘•µ8›Y}Ù Œ§Ø‹@š28ƒb‘‰×) :Œ‰8ØÇHÐ3%ô€ @V)(°€Ã={xŠˆè$æÐ\uD7Jº“ð¬=¹‡”;¨‹Y¹œHO-Ò¢Br-âJdíwXè €€Á¹s¨W™‘žØ³Šæ`iðM¢s¡Z  Sy'Ί€ãsÏ€…[ˆBiÊH F¨™ð¼ XÝ(Ú#Ø .øÔÿQhUÙæ*®$b1];"\Ë.½ˆ½@Œô8Òq% Å6Q ÂÐÓ³Ò) À€`#x€¯àµÙ›,ª‡`昸‡ñ›Ú%ËÑáüŠ”+X"X%t rTI Dð& ˜deTx¼9JÜ‘‹w †à!ªLaIN)¨ÙŠHÙeÉà[íQ碦 €s‡bÈ÷À ½(§I8„OÀ!X‚-¿Š€X X€Iúc°¨²¼óD:åúaµ[¯±8 ôPB*  H$/šÞ8ý‚Cû^X8¹Þi ÂÜm(H{ø…Ü ™5Bz"Ã=ù‡Ðû&™r$ÿGªaܨ-±’œÈÔØ=š]pDZ¹(‡\ë†àéÌMá ¸ã‹)ót#±±ZY9 ie‚@qh‡a¸l’‰wy„-{„¹Ñ¾‹à)n 4V`©¨vÐ õ1‹ÒE;žÔwÃVø /+/ò¢ =«Õ9ØG©ÐT ;j‡Çë”ÿ@ªM!*…t“‡ ˆC.ÎuKdJü=JÑðH¸]-â#Äè‹=ÀXjPX(€È|AdÌ¡JÕ&б ˆ`%FXíQ2Â2î[ékÙÐ>ÒÒä ‰Œ”„ÒÙ%Й‘«(ˆ‚c°ŠkÚÿcs/æ2ËBí“ Fú¦‹9Û—à2(ýG ø À0¡C™%N€¥Ói©:Ý*žJ4pƒˆ Î*`‚%x¼¬™”îsp…ütÖÒçoÓg¢ „¹*Cg.±¯A‰¾„„‘Ò¸’#H‚!€Q£ þ\·x.!qlÌhdÿï^¦±ˆ¤Ò!(wh.ƒ0pÜ 5ˆ…Š 8€%°¯H8ʆ4€ꦙL᤮>tàjÈý.B¶n6ç̓Û£®ÛK½òùà)’v‚&„JÀ,§Ê 2€ #å áLyŠØ+gp“sP€û.•¥f$ç`i½Õθ#Äà#™"-Äüض.s‰FÉ„C¸¶HÀ˜+õm@¦b#âû\oÞ îá°ø&÷£‚Ó\Qx¡&ƒ€}˜ññ™ñ—dH:X‚¸¨ªzø†Ç“™¢2‡Ç5ÒEý.G1¾ˆp:Dš ˆ01ä)¾L ¥Œ ÿQBuR%x‡zøÓÊe>l˜vxðŠl2‹øDöÎñ½ÕÁ&d—¢€%Ñ¢zû›ÚQA¿”©@¨[¸Bf£·Æg$wžæú ãR£/úëØ3‚œp‡{ ›(ø„6Pƒ(‚a†%Ü胯„!•þ¡LˆQ¬øtX£(3â]ëd»ܸÒBŠLõ{€€} S¥ð+a[°¦³g‹pº`]à‡PeÅtáš8pèÍÈ›Ö þw`t–%° ‹˜ðAñ *aJÕ"ü€‘×ý˜E;R1'0‚Û‚,ZsÙ‡ôöª–le2´K¹q…ÿù”„¹),ñæIÐ+P4€(x è˜c°“xR5L”Sµ‡ÇS¾ÇÛ$V¯ïf?&¢¥­W™à ®¬‰…*õßBüÀÿÎñCg† žL¡×’½rþ,x¯  \ØÐ Âˆ#RDxP@¸w ’%IRœH”=š„¨HH‘BJ‚4Å %J“L:rT‚5g\&Là„÷MtaÑI‰F<š°âDŠ%V$hÏÝ 8br´’ H’MŠiÓM›7˜2ÀpààÔ¥A¸›G`Àãêµ›wî\:wÕ¹SWϽOÿ/”J•!ÕÆ ‡.ŒÇEŠA“L‘:r 0V€†±Ï°aׯ%TðAþ00ÀÝ:Â﨡+.œ9lÙÊý@p ÅÈÊ'N… ùáQ‡ëuÈIŽÍ,¹è£ØR—¹ñÃň™k¾¨„3©«-XìzºtrrÈúóWêxjT*WP,Œ0ÂG‰A$‘|4Ò$ÞCx@M1üCÀlLܳ„<0@:õ†Î6WÑ!À;ï„€†BA4àC5B4C’Y¶ÿØ1Ê%?È€Á,p˜¼!à SÀl1JöO}Eá5KØÓÎ;áüÕ¥9ä0ÿ›2Ú¨ßc6ªù\Žm.D·äa‚2 !‡’I‚ bñÅ'–¨á&˜pÂ%•DN;ßÌ–cCS ØÜ}%åØ~™Fµ˜=ö„¤’ƒàIª$‰‚aÄnÈ€ÃeàA‡mH‡5î €´SböðÃK0@`ÆÈS¦€Ë±‰¦à8(—D`Á ŽˆE-Qèa 2‰“®-†PQe„€ëVÏ9ïàãÎ_`îŒÎ­ù˜½Ì…ŸÚ¸ƒ‰ N’ÈGˆ "Ç“ 2ê¨VP¡&•XbÉ%B–#‚Xr .ÍË&Ž9ŦÉ&·æ™ÉNI&yXfÿY·‡$pµ´@t«`0c Bt0×?LüãŽ;ïœÃÏ Àà=±ÛSýå{¯È új¸ÑgƒhŒ±ƒ@R‰“ðè2®õpÀ°ÐŽ= @˜ÔôÞ8`š§¬Ü¥ L%¨ôGÅ’ ¢‰#€HòÈG”¤ñÄdpA6ÍÄÝL}èãÆAälÈÎT©Ê7wï¤UÔ2H—„²’žŒO²^ á:„0ÄÚ—ðñÌ Sî†AáÕå8î°ãŽlŠpÀË‚Lc½¯£©¤Ùa AVI“¯Ab‰M6õسإOPß?ó¸ÿ@ðØb”µðmM_šJ¥ZA Kb%ˆ°V‚"ĸB8b“5±JT‚Œ³Ä!1-Lc³Ù^ÜB¶º–¬… ¹ø¸„„ä¥À>Q ™L—0AÄ3LáŠXMA zˆìò H÷–P”ðCQŒ6.­ïLþQÝP.Å Œ ×pKF‰Kœ‚‚€¨D3Â1›{<Ñ>ùÙAè !ÄÌÊü8€ˆ².’23º“–ðŸ‰#&ç¹I\eݘ†3ˆQ J‚%Æ/¤á yÜCÚ@“êòC²ÿdJ•ÊŠìžÒ2q‡ÿ° 'u ¤`A B‹,HQ=‚H~ˆMÜ”B·î Q@¬¶·.rm•-¬Lp ÑÄà<¹„(BR’?T"á(rà¦N‚ȃ¶Q@ÔP8ÀþÐóùrŽ}B€V‚Oà„#)‘ K8¢1‰I%‘†/`£Ù˜Æ%,í€&­Ð…\üàÇd^ܳV(Rÿ …"EYYA.‘‡®Ì„Œ K0H„ÀiPÃî0á Yø¢ÅøÇ€ñÓ¡š· `n¥:º `ºèc§/k¢)"Òåð(ôƒô [áŽÄ¶Žl„~[§:¥7ÂÕÓ{ÿuIù3(]rb3!Ë&Q¹I4²üC†°r`c–PD%(°…œuìÚ=Ì%ר Re›âbU1ËQ‚PЈHèàÐ  G X@ƒ`ƒëü0Á FjœÔG6À i€%È“R­',é锄xfUø…€”WCXÂIÐ"À„@F_Ȥ ‡¶øÊí^vY(%@a5ù‹ahG–˜ Äf"‚á Çû‹/‚qØÝ}„-i@´˜ºªέ¬e ×&rvœ`BáW* aUapƒXvHÎ$¢È v+ÀÚÀ¬¹ê@ÒÕÂu2•JÿP-l‰$èÓ͔РÀ4« Å˜UA½Ä×Ver\ˆo.l1Œb”ebTï!A‰‰u ((!1ˆ‘¸XÆ 5h#,!bú Ž»ùZêWVR{! sÄ?ú¨*˜ÁBèùÁ® … #€¬qÖCBèe.©™•¬Ioý,d©ÊpJØ´ÏTà‚I é#ãm‡8҉Ȍ$W™õ^Bæ†ù¸ö nÖ–€ <0רÈD%q ™Är³%4Ǥnt£ä*à '4¡%ÁðE‚|R’Žš3ü­DHŒÏqá!&ˆ D%ñ…4°e+baD¬-ÿAùý#ÄèCu rB?¯NjÔ1£-‹Rþ£@/¸÷ ÄÀ…®¢3”ËÅŒùdfn«ÖL–%ä²1À} Ä2B;=ÄÄ ±  ‡­„!&‡ßÔ g&„únuV¶Ùÿvw™Ôµù%±Iz–¤€#€.nQØ=øáiDðA;òq]²êS)æŠRAÊ$%‹ Ò»‘ Y¤ÔI¡à@ Iâå´§Ô¦^2´ß­´[jh·nSÀ0rKä⵫I¾UJD@_¸žQJ`g%‘à‚ØÂbZÐbå”yVÌ_®&¶üÙÒ1;Ëòð…ÿ/< ;øAjÐÕLdBc·‡4Ô•eYÀâí qŒB(æíj'2+%õèŠDÀ*PÁ=Üa¾;Ùã×ø©^UV¢ÕàC&q™cHnh#¾3a®%.ò»ÞµßxÀÄæ© <ü£D $Ðp†4Àø’Ï|Dö—Šý…PÿûðoýüʤÒbÏ ˜AHtÁ%È%üÁƸB1 C98üe:\B Ä£m°£åæÕœ:MÈf¬Í’5Ê]0ÄÊ%Gþé_ó½àþ Aåá‹©]B¼ƒ6XB'Äsõ[%t‚$,‚ÁÀšzUèC Aâÿ&ØÁG¬DpXèC¿¸ƒòqÔAäŸ *DþÁNÜ8Ų1³ ¹ TBD€ pÁh@MQÄÄ’a9ƒ“ïhQó„Ôpà ra*‰aSì_¬YH5_ïé’ÏB9•Ã5ˆƒty AláýñŸ:qaCh"Ì\àŒKLäIB•ÅLÐÉN&ìÁ÷Y‚ ðS#”"ï„L8iŒ(B .ÆRÄ.¾ ý-„/ /FD0þr!¦è˜ìdUèèLx@Y˜›Ã- 9`C®LRiˆ%ê2Æ’E ccÀu%ĸ€ …Ya•Ã9Fòi¡dpbA c ÿ£ ã%î# Þƒ=ú£/~#&þÀ¤_aÂGhG„4ÈLÙÝ¡[)ê$hEÎý¨AYB;M bâ7Π>ê@b"ÿib>ŽdH–˜6‡¸E·e|ÁÅÈ„y‰Õ8\ƒƒ0D6dCÖ5‡™#ÿäýmâ0 $ Þ£HjMï…D'T‚3XR7xI‹l`ÌÉ Q‚cQ¦$1n¥PjeR–¤X’$?êÇLœD^=—ÅÁ AKtÂaYÀPÂ!ˆœ(`yPÈL=˜ML=TmHFHÑ#J¢$2j"0Ú#=~e+)ãòLZ8@AKLÂXP1Ã$@~=Mu¡ÿáS|¥%‚dJö">ŠäIª“™×2L6Ø¡9,€é ×d$¦Wò£nòâ/‚$c"eXnåH'B:èÚ%ï©} êö§Ân.ƒ ©}bßàTÔ±Aì{( ÌÆ$@B ¸@2z­špO±úºÐ?;rsl-v1.43/doc/RSL_fix_time.html0000644000102200007640000000157206600002406013321 00000000000000  


RSL_fix_time


Synopsis

#include "rsl.h"
void RSL_fix_time(Ray *ray); 

Description

Fixes possible overflow values in month, day, year, hh, mm, ss.  Normally, ss should be the overflow.  This code ensures end of  month, year and century are handled correctly by using the Unix time(2) functions.

Return value

None.

See also

mktime(3)

Author: John H. Merritt. rsl-v1.43/doc/RSL_mcgill_to_radar.html0000644000102200007640000000202106600002410014620 00000000000000


RSL_mcgill_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_mcgill_to_radar(char *infile);

Description

Reads a McGill file and returns a pointer to the Radar structure. The input file is specified by the string infile. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.

The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields.


Return value

Upon successful completion, RSL_mcgill_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned.

See also

RSL_anyformat_to_radar

Author: Mike Kolander rsl-v1.43/doc/RSL_radar_intro.html0000644000102200007640000001464511607151352014036 00000000000000



 
 

The Radar Software Library (RSL)

Introduction

By John H. Merritt and David B. Wolff; NASA/TRMM Office
Software Verson 1.42 (released 7/12/2011)


This library is an object oriented programming environment to keep application programming simple, for the casual C programmer, as well as for analysis software applicable to all RADAR data related to the TRMM GV effort. This library reads the wsr88d, lassen, kwajalein, mcgill, toga, UF, RAPIC and native RSL file formats. The most important functions provided are those which load any one of the radar file formats into memory; see RSL_anyformat_to_radar. Additional functions are provide to mainpulate the RSL objects. Nearly all of the functions return objects. When they don't, they usually perform actions like output, making images, etc. The most general object in RSL is Radar. The structure Radar is the method used to define the ideal or universal radar representation in RAM while keeping the natural resolution of the data unchanged. More simply, Radar represents the super set of all radar file formats. The Radar structure is hierarchically defined such that it is composed of Volumes, each containing one field type. Volumes are composed of Sweeps. Sweeps are composed of Rays and Rays contains a vector of the field type. Some field types are Reflectivity(DZ), Velocity(VR), Spectrum Width(SW), etc. There are approximately 20 field types. See the Users Guide and the what's new for more information.

An example of a function that returns the Radar object is the Lassen ingest function. The function allocates all memory required to store the values from the lassen file in RAM.

Radar *radar; radar = RSL_lassen_to_radar("lassen.file.22");

Syntactically, the object returned is a pointer. However, the functions provided in RSL treat this pointer as an object.

The names of the functions in the library are very descriptive of the function they perform. In the previous example, you may infer that some conversion from lassen to radar is taking place. Knowing that lassen is a file format for the Darwin RADAR datasets and that radar refers to the data structure Radar helps you understand that the function ingests lassen files and loads it into the Radar data structure.

The data structure Radar is composed of other objects called Volumes. You will notice that throughout this discussion, the natural vocabulary of the scientists who talk about the different components of the data received from a RADAR is used. This vocabulary is used to describe each component of the data structure. The Radar data structure holds RADAR measurements of a volume of physical space for the smallest unit of time possible. Typically a RADAR can produce a volume of data in 5 to 8 minutes; that becomes the smallest unit of time for a volume. This volume of space measured is referred to as Volume, in the RSL, and represents one particular measurement type or field type. The types of measurements are: reflectivity, velocity, spectrum width, quality controlled reflectivity, total reflectivity, differential reflectivity and LDR (another form of differential reflectivity). Normally, the RADAR records as many fields that it is designed to record and that really is one volume. However, I have split the fields into seperate volumes so that you can concentrate on only one field type. Thus, the Radar datatype is composed of an array of Volumes; one to the number of fields.

The Volume data structure, a single field type, is composed of several 360 degree revolutions of the RADAR. These revolutions are refered to as sweeps. The first sweep for a volume, commonly known as the base scan, is the sweep made by the RADAR pointing nearly horizontally and directing a RADAR beam toward the horizon. Then, the RADAR is tilted upwards slightly and another revolution is performed. This process continues 10 to 16 times, depending on the RADAR. These sweeps are referred to as Sweep in the RSL. Thus, a Volume is simply composed of an array of Sweeps; one to the number of elevation steps.

Similiarly, a Sweep is defined as a collection of rays throughout the 360 degree revolution. The RADAR takes measurements continually while it is sweeping. The number of rays collected is typically a function of the beamwidth. A beam width of .95 degrees will yield 379 rays for each sweep. For nexrad data the number of rays collected for each sweep is approximately 366. These rays are referred to as Ray in the RSL. Thus, a Sweep is simply an array of Rays; one to the number of rays.

And, a Ray is one ray measurement from the RADAR. A ray is a series of measurements from the minimum to the maximum range of the RADAR. Think of it as a meaurement from zero to the maximum range while the RADAR is at one azimuthal angle. In reality, the radar is revolving continuously. The number of data values in a ray is represented in KM and it defines the resolution of the RADAR. NEXRAD is typcally 1.0KM and the new SIGMET RADAR is .25 KM. Thus, a Ray is simply an array of Range values; one to the number of bin. The number of bins is defined by the range of measured space divided by the resolution of a measurement less any to the minimum range.

Finally, a Range value is simply a floating point number that represents the data.

It should be obvious that the Radar data structure is an array of Volumes which is an array of Sweeps which is an array of Rays which is and array of Ranges. Whew! This hierarchial description is easy to understand, when you only think of each object as an array of the next subobject. Thinking of it as a 4 or 5 dimensional array is very difficult. rsl-v1.43/doc/RSL_radtec_to_radar.html0000644000102200007640000000250006600002410014615 00000000000000  


RSL_radtec_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_radtec_to_radar(char *infile); 

Description

Reads a RADTEC (SPANDAR) file and returns a pointer to the Radar structure. The input file is specified by the string infile. If infile is NULL, then stdin is read.  The data is compressed with PKWARE implode.  RSL needs to be installed with -DHAVE_PKWARE in order to used RSL_radtec_to_radar.

The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields. 


Return value

Upon successful completion, RSL_radtec_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned. A valid Radar structure will be returned if the infile is valid. 

See also

RSL_anyformat_to_radar 

Author: John H. Merritt. rsl-v1.43/doc/quickref.gif0000644000102200007640000001012006600002413012372 00000000000000GIF89a¤2ôÿÿÿÆÆÆ”””{{{JJJ111!!!ÞÞÖÖÖεµ­ŒŒ„sskccZJJBBB9¥¥kŒŒRkk9œœRRR)„„9kk)­­BÆÆ9„„!­­)ÞÞÆÆµµççÿÿ,¤2Dÿ ‚’e¢&´B°C $Š0IJ¹¾,ͶÂm½ß)‡2í§h3†*µN74‹ZÅ¢‹D8PÓÙvNßÖu•uæ X„S‘€* ;€  x Œ ’ ;%’ x—;ˆ‘B ƒ  ‡ «š‰š;°­(œœŠ’Š­’¬‘‘¼v‡v¢› ƒ 4‡w ²ƒ,D­ß ž €ÛÖ  ô ÒˆÎÒxô –Áß (4€Öª*;8¤áQ©@ÖŠ¹”H€ƒxά!rÀ çì@Î) §Yr¿)0.‘ò‡3ÌP¶ ¶ håÙ‹Š{“XbUÈ}9é¨È‰ñ(g<ŽôÈ@ŠÅˆXÜÐLzÙË‹„õmŠÚ´x‹ÅBh7"éÙÿgìTYe6±²§pür®áñ ùÛßHv˘pDVOX jó-Œ/×75¶÷G$y¢Œ'ò‹d–àÎ䓳 Ù|hÇ'G8ð·bí p€  =•ìÝ¡núT²O{“ ºP2qõD<0 Ú&µP,(àx‚ò¡ 2—¸|R…(ü€}{ÉH¢‡*hlÃpɪ$$Œ—¼äT’ðLõ*ð¬£TøàÄP²D™x[(r k¼Ð:@D( at"eŽàa%*ƒ²J(±¹ÊQ¦CixDUÔS ® ÿ D OJnQ qºà…,@T‰Ðm<ÚrÄ"§¡;$HZ–`†ƒFqO%eãðÐ!ŒåYÊ/ÙÄ-®ñND¢X5©QMèpKì$z”d8î!‰•häv .4²Q|‚‰b.JPŠ hÒ:ÙG”}0C‘úp#/Êq$ˆD$f$@¡N|cÐÜ3g›= ¡¤x(æˆÂ(¥¬¨Ñ T €NNT"] ¸ÃªA–²ÔÒˆ8_Ò•txlbêð¨\Å€`B/@á;:êxâ ÀÚS ±3¥E‚ð-ÕÿÄŒr‚@–Aˆ¶DÀ` ‹SÚrN›À¤WÑ@»ä¢¯ÅY‡,,;Ç⼂±ž&*ðŠ_<ÀÆ@©I«ÖÍPŨF¡@?p/¯,ò­Ð6Jv…DDVš€ê9$ð²Ÿa%g´Y—Ôtö5 PÀ*6;‡Ã”äµœÖÆ+¨ÀÕ0à²<Í(¸š9àµß¼Ìn•ÀzJTƆ °_³³P@È@õd$8ȉ'ûY–#ÁµPà&Ü,KZÏÁÖÄe!9#«\¶“3uaåp¡×Øœb­•å6…µÉQ‘:›ùöf¹5Œàͨ2€h>ªRïÊćñŒÿÃ@¡1õh¤”Î(’|V‰8h8ðÈn<· ’ÜáøVGïÆ<¤•HÕ2| üŒÓyÊ0‰°B¢Ý'1§D³—,>§¬|tÄ)F– žIhÉsÁÖ‚¤ÙŠÝau‘ñÐ Š‘¹ÌÑ‹qgG†ëF7ô•šd¥)º†ãé@µ;äݤ»sÿR ÷&=ó>)JÚ`ŒŽ‚#cÆîJÌûÑŒ ']³È&¡É4¨0>ÔÉ ;Ð}¦"°'`£´à§H}AmmWx lV 0M¬ §ää„ZÿIm¸Æ5ÅI¯Z3}UÔ5ñ´`: ÀRQ(Ó% °òíÙz€ŸOäÇI ªÝ )O ¥AA »‚M°Á¸d@Áqu!âúZ@ì› .€8À´éNz`ß»=¦ F0OUÈG M&D¦ ‘À+ƈM¶bØBa&™¸-!¿0Öð-ØA +¯•˜8”ƒ•[$e èC8Sô-ÀçAgÆÛÿÄd)<±¢8¹4*á*‹ð|Ϊìü­‚dô6¥p‡‚E¢Ð$á°‚Ð. ZÆPzd`‰“ÉÃðOq8 d*BA "‹vFh´á…8ÒÈLƒµ’óv“’ÁÝfÍ :Æo4¦-b7>'Y¿”q,pÂ×8ó§#E´maÙ./àC’ÆÁcÊZÆEgs?nC†îùªchÉp-à`Ñöº£»¾À„§ 1 1aó” $ ä5« ´âs‡Q¼~ž¥ðý/qx!‹$‰ñôèNõsbXŠGØéÏÝK&F,{à@Ffÿ- ‹GQJ”F(KT-B°±_r]$ó1 µdEç±Ý’A¶ f”… ,†]åc`W€ð€)°P ‚Žçñbak^…]ŠQwß&2»"ZO´ ð-J7 Bà:ág MdIÕÑøsQu×HUQÕO éÉè €;3@e²JJd"ÿ÷òŠpu[ÉV6ÓW¼…`9“–m^±°`1^C^±–kÉ.^ƒÉØlyp\Œ¥51 d¡kI6è"ƒ”×yJ±VLá4ÇeVÁè2•3x¡¸1–G\ã46Cb³4ç`šUQYv©CŽšà3Xs3••34[¸‘¨FAÞqK1ÅÈSk532S™XŒXƒ¤WñVb1vem›°[SC°y`0È3TzXÉÅÉå3Ü4xaœÆÙ†Ö#Iúóë€GE2 POIx³–4Ã81ÿÞ¤€±Ø‡~¹7+i0µ‘W¸8 b#%CÕMÇa™æŒ^qàXÇuÚ‚Í…×a8ÙA<$„D¤Gbf*ª pØX·ƒ7¥À8p !³8²A:Bc¨ „`—c4q•^Á7äEÊÁ£†_ÐQ=65$Ñ^8!+íŤÊ!y5Ð ! b68îD ü•h¬±9˜68J2CcÅмé#Êà8YºrÊ8¨–Ér|‚p%µhg*•Ö±›Éñ#¡›ówÙ{góüæ&pó$“@-«T t'%X¢bÞ“˜c(dŒ1N-rj¢âg±£%`hƒÿÖ¡zó¤‡#ÛP#ìH<Ÿ¡yÛ dEø$–8#Í€hÚqjÜ l[p° aw*å+»p‚"³si¯c¨Æi¤Ë"¦=šæ^¹Ñ$d{:<‡?2nu+%Ar^ÔC$fÓ7Žv7”Æ%YB¼Äj²[a²iñi ¼eSi<Úñ8xS¹ŽV¶ŸZaýe:Áñ P„;rsl-v1.43/doc/RSL_lassen_to_radar.html0000644000102200007640000000215306600002407014652 00000000000000


RSL_lassen_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_lassen_to_radar(char *infile);

Description

Reads a LASSEN (data from Darwin Austrailia) file and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.

The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields.


Return value

Upon successful completion, lassen_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.

See also

RSL_anyformat_to_radar

Author: John H. Merritt. rsl-v1.43/doc/RSL_new.html0000644000102200007640000000647311410462157012323 00000000000000


RSL_new_...


Synopsis

#include "rsl.h"
Ray *RSL_new_ray(int max_bins);
Sweep *RSL_new_sweep(int max_rays);
Volume *RSL_new_volume(
int max_sweeps);
Radar *RSL_new_radar(int nvolumes);


Description

RSL_new_radar allocates memory for a Radar. It allocates space for it's header and space for nvolumes pointers to Volume, it does not assign anything to the new header. It does not allocate any volumes, just the pointers. You have to perform the allocation of volumes yourself. Do this by looping on nvolumes and calling RSL_new_volume.

nvolumes does not represent the number of volumes in the radar structure. It represents the number of volume index slots or the maximum volume index. Reserved values DZ_INDEX, VR_INDEX, SW_INDEX, CZ_INDEX, ZT_INDEX, DR_INDEX, and LR_INDEX are the numbers 0 through 6. They are volume indexes. If you have 2 volumes (non NULL pointers) that are SW_INDEX and ZT_INDEX, you must be sure that nvolumes is, at least, ZT_INDEX+1. All the other volume pointers are NULL. It is perfectly valid to have NULL volume pointers.

RSL_new_volume allocates memory for a Volume. It allocates space for it's header and space for nsweep pointers to Sweep, it does not assign anything to the new header. It does not allocate any sweeps, just the pointers. You have to perform the allocation of sweeps yourself. Do this by looping on nsweeps and calling RSL_new_sweep.

nsweeps does not represent the number of non NULL sweep pointers. It is the number of index slots or the maximum sweep index. It is valid to have NULL sweep pointers.

RSL_new_sweep allocates memory for a Sweep. It allocates space for it's header and space for nrays pointers to Ray. It does not allocate any rays, just the pointers, nor does it assign any values to the new header. You have to perform the allocation of rays yourself. Do this by looping on nrays and calling RSL_new_ray.

nrays does not represent the number of non NULL ray pointers. It is the number of index slots or the maximum ray index. It is valid to have NULL ray pointers.

RSL_new_ray allocates memory for a Ray. It allocates space for it's header and space for a Range array of size nbins. It does not assign any values to the header. Since, the Range type is not a pointer, this function allocates an array of Range of size nbins. Currently, Range is just an alias for unsigned char.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_free_volume, RSL_free_sweep, RSL_free_ray
RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray

Author: John H. Merritt rsl-v1.43/doc/RSL_get_nyquist_from_radar.html0000644000102200007640000000122206600002407016255 00000000000000


RSL_get_nyquist_from_radar


Synopsis

#include "rsl.h"
float RSL_get_nyquist_from_radar(Radar *radar)


Description

Find a velocity volume. Find first sweep in that volume. Find first ray in that sweep. Return the nyquist velocity, a member of Ray.

Return value

Upon successful completion, a valid floating point number is returned.

See also


Author: John H. Merritt rsl-v1.43/doc/RSL_cappi_at_h.html0000644000102200007640000000211606600002405013576 00000000000000


RSL_cappi_at_h


Synopsis

#include "rsl.h"
Cappi *RSL_cappi_at_h(Volume *v, float h, float max_range);


Description

Produce a Constant Altitude PPI at h out to the maximum ground range max_range. h and max_range are expressed in km. Memory is allocated using the system calloc routine. A Sweep structure is used to store the data of the cappi. Thus, it is easy to make images by using RSL_sweep_to_gif.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_free_cappi, RSL_cappi_to_carpi.


Author: John H. Merritt rsl-v1.43/doc/t2do.gif0000644000102200007640000002031306600002413011436 00000000000000GIF89a¤2÷ÿÿÿ÷÷÷ïïïçççÖÖÖÎÎÎÆÆÆ½½½µµµ­­­¥¥¥œœœ”””ŒŒŒ„„„ssskkkcccZZZRRRJJJBBB999111)))!!!ÖÎÎÎÆÆ½µµµ­­­¥¥¥œœœ”””ŒŒŒ„„{ss„{{skkkccZRRcZZRJJJBBB999111)))!!!ZR1sk9”ŒR{s)¥œ)¥œçÞÿÿ÷ïïçÞÞÖÖÖÎÎÎÆ½½µÆÆ½µµ­­­¥œœ”””Œ{{s„„{sskkkcccZRRJJJBssc99111)””{ccRŒŒsZZJ{{c))!JJ9ŒŒk„„cccJ¥¥{BB1!!””kRR9œœk„„Z11!””c­­sccB¥¥k„„R­­kkkB””Z¥¥cRR1µµkŒŒR))99!œœZcc9­­cssB„„J””RJJ)¥¥ZZZ1{{Bkk9œœR­­Z””J„„BRR)BB!ss9cc111½½Z­­RŒŒB{{9kk1ZZ)JJ!„„9­­Jss199cc)µµJŒŒ9RR!””9kk)„„1ZZ!BBss)½½BŒŒ1ÆÆBcc!””1JJ11ÎÎBœœ1„„)kk!½½9ŒŒ)ss!99ÎÎ9””)µµ1{{!œœ)½½1ÆÆ1„„!­­)ÖÖ1””!kk½½)œœ!ÆÆ)ss¥¥!ÎÎ){{­­!µµ!„„ŒŒÎÎ!””ÖÖ!œœÞÞ!kkçç!­­ssµµ{{½½ÆÆ„„ÎÎÖÖÞÞççï便µµ½½ÆÆÖÖÎÎÞÞçç÷÷µµ­­ÆÆ½½ÞÞÖÖÎÎïïÿÿ÷÷ï省c„ŒBs{1ÎÖε½µ½Æ½­µ­¥­¥œ¥œ”œ”Œ”Œ„Œ„s{s{„{kskckcRZRZcZJRJBJB9B9191)1)!)!!,¤2GÿܱÀA Š$P A?~a@Áº òäuX¤ƒ" ~@@; ôòÃAÆBQÄz,8@ræ>>."¤y!ä)X€ã‚!(Qð€A!íf&(H‚1Ù‰`¤ñrùÁ@^¶q0“ÁQ ˜:ø!ï‡D>öPЃĂˆ@2!IY<Ø‘H0ä„&qgd’*H’d‚<’<ˆ`^ŠsH(2j ó&³=LR¼Sž<ñºßû Á²  ñÀH Á¦ÐœFPB>!O Á€G A„wIX@\Ó (Ð DÐ@´  !ÁQzˆ£ãŽ::sÈŽÂ8ÐyDHPÍŽzP0Aj@PÏ;DTB  ñÀ,AC8@ôX@hTPD ñ R3Õ0` Ä©@Ð@y= Ç1À ñŒ@BFX@O ÷8Àv+Г‚UÐúL€úØÙª4Á„\ÀBI7íáˆr¤8äDsH)hà5h‘Af`€çÆ€AˆETàšJG Ï ZhpAôó ÿF=Àh©b ´ÝšAÞoʘ‚Ü$ÔãÂ<¼lFÁkD@à]â.D½PS tpa Ûy\…0!–CT`àÁ„aRpD<$X „ÑðÜ:Ï; fdDï%±è†h†uÆœ«%$á@ îD`ÁÁòLLÀ2E&Qùø<@Â8![Š"Ô3O (!ÏÿÑG®B£„xð*÷蟠:g䃠ÉU… `¸&\àTòHÁ襴ÅYUúÈÀŽ·¶ ô£ 8[4`-\pmTC>š¦` `A ûaª±¥*Dü°À ÿ–f6^€„dzᩨւ}Œm ÈG ”pÁ)Ø­OúÀ@ òAÅ&˜-†`Â>˜†Uàfh‚ø!B´ùŒ ÈÀ ×4|h@ ÐfŒ‡6 L!qlÕö ¼ÀhÀB*â„>@€˜‚4(À`ð¶4 †Y .r€ 8À AÀª¦2˜"€ëHÀDòb"º4r˜ N°Ž¤0 ˆ¤z`– ü UJäƒüà (€p€è’i‰`€…8€˜?°&„p€´…"íX@H€”¡$!@¦¢€t!"©•<Ž ÿ&(ùh@t"„Œ$áBR¤Ç”àw áxV:=¶C‚#ˆ)E€Ñ;’P/P¡‡î¡"H4Û' huyT`ñBÌŒÀAz@= ÑØ©ÄÛЬÐ|¸€ØŸ<‚—„!¬@:%›ÐןMÀBË$€Ý0¡ral€>BE!×@è‹XŠðŽ 4ÀV"Á=°„Ô[5!úH:hR­àÑÙB-€»>IWhA˜ G×#G¬À]q˜>yBäO¸ÝÈÀÅJcæ&4a‹¤¢À=0p{ØÐTk\Õ.ÅäCÖfk)0…}›^Ôvf¨è¦Qѹû`ÁÚDx}LñTÎÀÍæ¡p'!ix¶±xÁñ!I šøÑ$ÿhÀB@€ôÀ! JY°@dD¨" IØDMÀ~Âͽ¨ƒXÉa‡‚“ü`=à:°ƒ©ê˜æNxÐd aÝ´y°ƒ ÁóTÀ–R€v4' àAà&;à€àƒ ðÁܱ"!¼#pª9k–è (¢I",`§jb€w,€ ‚$ðŽ¨ öÁ0U¢†e8<"°˜*±fxÀ[u‹„¸9Fä#ÂêÁ€Èñ8ì<„@¢8`x$ÐTcØÊG(ÿç+GQ „àx@" „^#A} €¶S„¼Ÿ+Øgê_‡Q)í`ò`C Pð@Jðä#¬AòPP&pÀºµÎµ†‚øp PƒðÐU6%>Ò°±z´ó&0WF)ð\’ð~Ýá;ºb(+@ fR?“e~E pìT) (@ú0U¢ö .à.(ˆ9ÿeG³]ÈEò0HB`' E}$З Nå(S@˜rXC€U‹vSkòðOkÃ{“fB M `q%•q @Eÿ" @0!Kãnç’¡"ƒ¢áB}ÙH¾£Ü¡´ñ Zf€þH`:B à_f0[:Ò ÝÒ#` ;"—:bÀ@[¥Œ0Ëañ`;’ F ¦ ;bùÀHPͰ#i€—:Ò‘å/£#·e’}ôc,F` ™J&0¯ñ 7E5.Pún;Àд¡öv618ÄS$€e¬ùò%oP' ø%câ` à_ _Ô ÔPþå<2›` ªÿà ¶ð ;bÆ–¹°#  ·°#”p/:2§ò!¦#x°œy _Òà ; IðE-”F¿ã"£ÑÖ8ù1E1’£%SƒR bC±t<°”ë<ó`+DÀ<ÅÓãÏc™ ÙS†°#Òàm‰ð¢#~ _Ê –:b Ü™Y‰CŽ@bâ@ K#h£¨@;2€<’ ºr*ù€Yà :" $æ€Æ˜;¢ Jœ #¤pŸ2°##€$0/(7šÃD 3C`<ôàWZÂ4+@" Q ðà% «|²F×W!VX; ~¦q8ÿd6àû€€L`©Ócp7bã4CG™]çbq´³bqdkeƒÞs3¢qCâV~FB4aFf‹ÅÁ4‡f3ûB-°8PC¦BE¦âª‹vñ0I ±6#8Cro“¶tAЖÛÁS@9F@¦”˜[F¸V6àn¬g)òWIà»Áe¡'p ¯.À²R>ÌÈ%Fð8ìtàLÉ2RI )Àžïa6ø`‹{J)È–r«~µ4—S%˜R"@>-pš– &PšE0 ;S[ÿBã¥3üÐ.ÀЭÈDÊufb3¿j-‡`z/`´ r+¡+NK'àQCws7[2Œe–G4$€*ðS(à€Q";ØXij³"ù` ×÷%MÀò 3…b:y·‘Q eGÐ÷0gâšLP`<%ž2^–>H@9²c·‚)`A}ël‡>G¼7“C+”*ÆE,°8ùÀg PD¡—ªGd´Bõ‚žZ„6¨ö%>c°kckÀ "8´h—Z¬÷f©œš¬j£R87FÀh¡q©—zC6©ÿ„fª>óG§âG&Hý ¼Æö5cSªÛ!,DE³[©[Ò' ÈT0Q¸´i×èÐÕI•÷* àsñ= PeÑBðÀ*ÅÄpO÷DxCp=€§@Hò 2C@MB¯¢S÷À€áJá ¡d"SîPìÀ‡!A MÜ„6Á*1€;ATWNêÐLy‡ÁòpOéлÉàhåE'¬9?ÀCðÅ),é0ë AÀ-!•IðÀ#tJ)ñì°Æ °v?Ñ…çCÿþëø¤Jñ<»YÇLÁÀ 0Ð}‡ ð*&üé`>°f¡dAð>P7ç~¼d P"ð t ðV0¡RÁ jT¬1 x.A†G±FÀ>‘r}ÏqÉ>ˆP ÄÀ&Í@ ÕP ­Àkâ Çâ%³à Ä ÛŽÆQ«8‡ä¡[ö0+35S]EÀ(†B±ò1CàÍzsвâFæ€ ÂP Ø^ `@%¿aàQîØõ™ Ò¦@”ÆSçÍ!±¯{¿SkF€)©GAt|·í §¼ÍÒÆQUÕÿ.àãFûâòYf°#Ä] []a0 i`RðZU€Š`dö WPVp±êƒ[Šât@a@>UÒåÑ.:¢ àÁ U`æ>´ÁïP¦é×e€ ÉŒítðW ${,ù7m±‘ ³B*@Šÿ‘[¡kÍšäs7  oÑ•Âdšú`3 ¬ñ²‘?ÞXâÐã³¢9/­àϰ#Ž¥Ÿ’Ð ­ÿ¨Pú‹@&`âB ö 9? U»’¸ÐúvP»óذ!§U±c Hà ãóà¬{š²±ä 3ñØ4®:LÿÃÄÄR õô +»í\kÿì4>…¢—`]3°#Ì@-mIX*‡p ;2 PYÄÄ œ3p a±õ1(¬‰x$X¼å ˜AL ê!„gõ43ÈÇŽAf  Ú’d‚„ ôqPD^‘E©P }õæå+2aH {óRy/C -Z h @'äA@¢ “L* ap¤ÁF" B¤ÁIô.ø1˜¬ŽÁi¤dƒÆ`3D(+X3è×àJÅ‘ûUaH…I(Ä28 ÂÅ™ö,E„ Å™ ÉyÞaS]Gƒ#øXT ÿRÏÈ# j77¡#ˆ$)2D ‘\L¸÷Zƒu „‘ R¤ !I)æIò­‘#ñT3˜F [L(@|ÌC*øl6(d¢áïŒà¬P€yc¸Š#X|Hôq¶òUÀá[Q $ -<' ÈG’ð9ëJ(P„ $!2H^#•\`q‹ËÛG”@ÖT€ ºÀ2ÐÒ+ÚGö´€µð10UÛ€.p–âD `A"@„¢±Aú0Б¬8€--ÈG Œ@»ËÑcÉÂC‚  G@‚$Q@„ PP  Á{À4Æ࣠ò¸x@yüðE€€ À{H Y¸ óÿç“#D ‰€ø‚ÓŒ`tÅ<Š(D ˆM3œ Id:‚ Ð"¸ Ä+oà#ÈÃt-¨Ç%-P`l®“µP$,-Èzàƒ @A`Œð¯L –ò°Àlc˜D@礀 ê±¢#`ÿ€‹) @%Y༠kQ’&`ÔhxÌchžU‚×d˜¢ìhÀ@à ¸ÀM ŸŠ2°Ç ¼€ øXA €6Å™q¢U»€ü( P€zS_>²—áª5Ák@›€7&Î{rLBÕ¼‡¤2ñ»úÉÙ ¬7Çðlt“côæÀ&0ÐŒU6Ð[Àù¡Ñh-¸ã ΖÚ×'€Ê³¼bê&TÀrDcÑ0°Qí#†¾€É0Ђ ˜kÙË^^3mïQ*N1Ûć|˜øð ÖNôDXO´„ÒÀÆ(E%(!jwú°æBécÝ€¥›#϶@=W Y°ÒBÕZ€¿ÁúàŽd0?X? ”RoRâl4°GG³(ÕÙÓ@´á]`@,Þë’åHį~xóÉW,à}/\ØÄ¾ È”ˆ|E„7TX oÄu¼‘åþ” ôƒPa^5²Ð–a³)ñàH"YƒÔ„}(‘18ì›ý¬Ž_ÀÞS(úµ›À 0¡Xc‘ ´p|œOEN{>9H½qÝdüÀ@ÈÅ^€4 ;rsl-v1.43/doc/home_but.gif0000644000102200007640000000311306600002412012366 00000000000000GIF87adÄÿÿÿ„{k¥œR½µJ””{¥¥cÆÆ9ÞÞÿÿÞÞÿµµÿŒŒÿkkÿBB½JJÿ!!„))½))Ö!!ÿRk{„­Æï91ÿB9„ƽÿcZ”„{Œ,dÿ ’p ãDšöhó ÑÃHÏÂiŽGy®Á‘`P²@¯V“Ä4 œƒAuHœCÏä”8 ^Fää€V”DhS‘JaKµâ9Ê)aþÄvó '90PF<ƒweBB‹X9w?y}  œ QqA–¢A€?(e|)x)ƒ“c?b  ¬©«¨}z¦wš _0/ÍW(9ÍÛNÛàØÙwc3ÎÑÍÖðƒ“WäåÚù)çÄþ¼ÊeÀp¡`†+,ÐÀ!ƒÃjqHØpàA‡-RÌ€î`¸sLàȈÑÞ•‰ö2ÿ¦¬8ðà *Xâ!Á‹ÕUc9ðä‡ 'ôñJcO{V•8Ô畯RžœZ3a… I~\{‰Óe ’*=ö|X²ZA—Cƒ~œ˜´âT§'_E}jòbM ‹5²YñfPŒ#ƒ²hPޥɉh3*ýVÍ'Ž›MQ6ð À€åߦ4J°B1 rµiWe‡R§¾6‘ÙHÁCìÙ=;:°ƒIتƒƒÛïÏÅ|i#iåÔ© `Á‡ ÌP]u‡ GÐÀ!ôòNRo¸{|ôámº”ÿt!Фëf€Ðßu€ÀÀ¦ÁA'@ÿ´'[  M{h# zPXÀwàÀׇ ‡”ˆ&šTé!pfÛeˆY‚Ú¥˜Út*zçu»àb†Ñ5a)Æ×FÕ—ˆ6'JåѹvÑ0d‹¨v@yøÈ#Sä阀j0år™i†‘‰ŠQt¼ OB¥‡(IPYA¶}TÝLÔ#D€A„Ø€…6a@a0GPˆ5µ4Í+"YN•…^°`˜ZåY$]JÈVeŽH:À†æÐ@e–©æè]Š”Úý… ¿Rú&OG"ÙP 1Y D¥ÑÅ›5ºõ7žo©igQ†À>Ä*yû©A„8ÔQ¨mßÄñ5¤&1†Â¼EôÕPº\Ã@”ÛÒ²í}“™9›w •§6¥€1 BÇÓR+kjWn°•ô8ôjÊ–ªØm楆™€U†«)Ú,2… L½›Ã@ÄZŠÐ]aY9šÌ¤o^€pÓö$¬\Xè˜`†½žù.=Õ W+eEÚcx‘JØÛ…ÒÚ±ÊRl)¹d@Ê>ÀåA>îÖ¥ÿlU7@  ” [ÔtHDÔ#5¯Íã¿q Û'Qž¥©¸œRXZ·6@§²~ƒj»e¥ŠÅª6]SÝ¡uI9ÔÀ Ù9É B­'IlІ.@ÔÇËùP­oú«"ýÉšØîÜG0gI —N6­>I}$¹B~ÂáEì£|ÈÊnÐ. Fc{ŠEæÁ¤ªNILJ¢‘}ÀG}}aÉ|L´œ‰€)Äœ =ªm'Iù^LHÑ 4Ãgy CÔ°%„ˆ g)HB`ân%'A‘KæãCx<ˆ97¦†!$ߣÀ*°ÅÐ Ã* I㨦¡F6¢1/è‡1d’FR©ÑŽõjcLè>=Ãu2#©°;‚/Ž…¬“éhŒ8ž±W‰ã÷˜ÇŒc—Ä$¦Ið ÒŽÈQ}êd•3‚Ï3ÿð‡³êTHC6wìÌhIHÖÇ”Œä-ý!ÆTŠÑYüß-/ÙÈÏ\eD{ô%*'àRµR‘ªtÖ™È \eŒ‘¼¦-éT§Ž1cÿ ¤1ÆØÊ „s˜èܤ.ã8Æ?ž³þ°¦80MsNSšbÜ€C;rsl-v1.43/doc/RSL_copyright.html0000644000102200007640000000324106701166366013542 00000000000000
  



    NASA/TRMM, Code 910.1.     This is the TRMM Office Radar Software Library.     Copyright (C) 1996-1999             John H. Merritt             Space Applications Corporation             Vienna, Virginia     This 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.     This 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 this library; if not, write to the Free     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
rsl-v1.43/doc/RSL_hash_table_struct.html0000644000102200007640000000032406600002407015206 00000000000000
typedef struct {
  Azimuth_hash **indexes;
  int nindexes;
} Hash_table;
rsl-v1.43/doc/RSL_return_zmax_sweep.html0000644000102200007640000000223306600002411015265 00000000000000

RSL_return_zmax_sweep


Synopsis

#include "rsl.h"
Sweep *RSL_return_zmax_sweep.html( Vertical_structure *vs);

Description

Given a Vertical_structure created by RSL_get_vertical_structure, return a Sweep data structure that contains the maximum dBz value found above the bins in the base sweep of a Volume of dBz data.

Return Value

Upon seccesful completion, a pointer to a Sweep data structure is returned. Otherwise a NULL pointer is returned.

See also

RSL_return_hzmax_sweep, RSL_return_eth_sweep, RSL_get_vertical_structure, RSL_free_vertical_structure, RSL_get_column,

Author: Dennis Flanigan Jr. rsl-v1.43/doc/RSL_enum_sorted_type.html0000644000102200007640000000024106600002406015072 00000000000000


enum Sorted_type { NOT_SORTED, SORTED_BY_ANGLE, SORTED_BY_TIME};
rsl-v1.43/doc/RSL_wsr88d_to_radar.html0000644000102200007640000000322306600002412014517 00000000000000

RSL_wsr88d_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_wsr88d_to_radar(char *infile, char *callid_or_first_file);

Description

Reads a wsr88d (NEXRAD) file and returns a pointer to the Radar structure. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.

The radar structure is, essentially, an array of Volumes. These volumes represent the reflectivity, velocity and spectrum width fields. The string callid_or_first_file contains the filename of the first extracted file from the NEXRAD tape or contains the 4 character callid (eg. KMLB). The first file on the tape is the only place where the site information is stored. A warning will be issued if it is detected that the file callid_or_first_file is not a proper NEXRAD tape header file.


Return value

Upon successful completion, RSL_wsr88d_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned. A valid Radar structure will be returned if the infile is valid, dispite callid_or_first_file being invalid. Thus, it is not required to have callid_or_first_file.

See also

RSL_anyformat_to_radar

Author: John H. Merritt. rsl-v1.43/doc/RSL_sweep_to.html0000644000102200007640000000725706653365504013373 00000000000000


RSL_sweep_to...


Synopsis

#include "rsl.h"
void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range);


Description

RSL_sweep_to_gif: Given a Sweep pointer, s, output a GIF image with the filename specified in outfile. This function calls RSL_sweep_to_cart to do the polar to cartesean mapping, then calls RSL_write_gif. When making images of velocity data, it may be necessary to call RSL_rebin_velocity_sweep to rebin the values from -nyquist to +nyquist.

RSL_sweep_to_pict: Identical to RSL_sweep_to_gif except it outputs a PICT file, by calling RSL_write_pict.

RSL_sweep_to_ppm: Identical to RSL_sweep_to_gif except it outputs a PICT file, by calling RSL_write_ppm.

RSL_sweep_to_pgm: Identical to RSL_sweep_to_gif except it outputs a PICT file, by calling RSL_write_pgm.

Efficiency note: The functions RSL_volume_to_gif and RSL_volume_to_pict. and any other output formats that may arrise, all function identically with the only difference being the output pipe command (ppmtogif, ppmtopict, etc.). Each routine performs a polar to cartesean mapping via RSL_sweep_to_cart, then calls the appropriate write function. If you plan to output many image formats at once, it will be wise to perform the polar to cartesean mapping once, then call RSL_write_gif, RSL_write_pict, etc. This could be done, for instance, in a function called RSL_volume_to_pict_and_gif. 


Return value

None. 

See also

RSL_rebin_velocity_ray, RSL_rebin_velocity_sweep, RSL_rebin_velocity_volume,
RSL_sweep_to_gif, RSL_sweep_to_pict, Vsweep_to_pgm, Vsweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm.
RSL_get_color_table, RSL_set_color_table.

Author: John H. Merritt rsl-v1.43/doc/RSL_fractional_area_of_sweep.html0000644000102200007640000000203606600002406016512 00000000000000


RSL_fractional_area_of_sweep


Synopsis

#include "rsl.h"
float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float min_rng, float max_rng);


Description

Computes the fractional area, of dBz values, between lo and hi, from min_rng to max_rng. This is the fractional area of the 360 degrees. The algorithm used is to compute conic volumes based on beam width and range of the pixels. The routine RSL_area_of_ray computes these volumes. The name of that routine is unfortunate.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, NULL is returned.

See also

RSL_area_of_ray, RSL_fraction_of_sweep.

Author: John H. Merritt rsl-v1.43/doc/RSL_get_volume.html0000644000102200007640000000445406600002407013666 00000000000000


RSL_get_volume


Synopsis

#include "rsl.h"
Volume *RSL_get_volume(Radar *r, int type_wanted);


Description

RSL_get_volume extracts the desired volume from the Radar *r. type_wanted can be one of: DZ_INDEX, VR_INDEX, SW_INDEX, CZ_INDEX, ZT_INDEX, DR_INDEX or LR_INDEX. Only the pointer is copied for the returned value. If you want to optain a seperate copy of the volume, from the Radar *r, for modification purposes, then use RSL_copy_volume. The different indexes are described as follows:
 DZ	Reflectivity (dBZ), may contain some	DZ_INDEX
 	signal-processor level QC and/or
 	filters. This field would contain
 	Darwin's CZ, or WSR88D's standard
 	reflectivity. In other words, unless
 	the field is described otherwise, it
 	should always go here. In essence, this
 	is the "cleanest" reflectivity field
 	for a radar.

 VR 	Radial Velocity (m/s)		VR_INDEX

 SW 	Spectral Width (m2/s2) 		SW_INDEX

 CZ 	QC Reflectivity (dBZ), contains
	post-processed QC'd data 		CZ_INDEX

 ZT 	Total Reflectivity (dBZ) 		ZT_INDEX
 	May be uncommon, but important

 DR	Differential reflectivity 		DR_INDEX
 	DR and LR are for dual-polarization
 	radars only. Unitless or in dB.

 LR 	Another form of differential ref	LR_INDEX
 	called LDR, not sure of units 

This function is a one line C function. Observe the following:
Radar *radar;
Volume *v;
/* The following two lines are identical. */
v = Vget_volume(radar, DZ_INDEX);
v = radar->v[DZ_INDEX];

Return value

Upon successful completion, a pointer to the Volume structure is returned; only the pointer is copyied.

See also

RSL_get_sweep, RSL_get_ray
RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray
RSL_free_volume, RSL_free_sweep, RSL_free_ray

Author: John H. Merritt rsl-v1.43/doc/RSL_get_slantr_and_elev.html0000644000102200007640000000146306600002407015514 00000000000000


RSL_get_slantr_and_elev


Synopsis

#include "rsl.h"
void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev);


Description

Given ground range, gr, and height, h, compute the slant range, slant_r and elevation angle, elev. Range and height units are in km. Angles are in degrees. This is the inverse function of RSL_get_groundr_and_h.

Return value

None.

See also

RSL_get_slantr_and_h, RSL_get_groundr_and_h

Author: John H. Merritt rsl-v1.43/doc/RSL_return_eth_sweep.html0000644000102200007640000000242306600002411015067 00000000000000


RSL_return_eth_sweep


Synopsis

#include "rsl.h"
Sweep *RSL_return_eth_sweep.html( Vertical_structure *vs,int index);

Description

Given a Vertical_structure data structure created by RSL_get_vertical_structure and a threshold index, return a Sweep data structure that contains echo top values. The threshold index corresponds to the original set of threshold values used to create the Vertical_structure. Index 0 is the first index.

Return Value

Upon seccesful completion, a pointer to a Sweep data structure is returned. Otherwise a NULL pointer is returned.

See also

RSL_return_zmax_sweep, RSL_return_hzmax_sweep, RSL_get_vertical_structure, RSL_free_vertical_structure, RSL_get_column,

Author: Dennis Flanigan Jr. rsl-v1.43/doc/RSL_edge_to_radar.html0000644000102200007640000000325506701166366014316 00000000000000


RSL_edge_to_radar


Synopsis

#include "rsl.h"
Radar *RSL_edge_to_radar(char *infile);

Description

Reads the EDGE format and returns a pointer to the structure Radar. The input file is specified by the string infile. If infile is NULL, then stdin is read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands.  However, the EDGE format uses the lzw compression and requires a supporting library to decode the file.  The supporting library is called ETOR and is distributed separately, since it is not free software.  Contact Enterprise Electronics Corporation to obtain the ETOR library that decodes the EDGE format.

 Enterprise  Electronics  Corporation, Enterprise,  Alabama,  USA  36330 (334) 347-3478.


Return value

Upon successful completion, RSL_edge_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set. 

See also

RSL_anyformat_to_radar 

Author:  Don Burrows @ Enterprise Electronics Corporation rsl-v1.43/doc/quick_ref.gif0000644000102200007640000000142206600002413012536 00000000000000GIF89a„!³ÿÀÀÀ½½½ÆÆÆÎÎÎÖÖÖÞÞÞçççïïï÷÷÷ÿ!ù,„!@ÿÈI«½8ëÍ»ÿ`$$E&Èa‚ˆð9í ßx%KÈI$!ø*IŒ¦ÄQÙÙHƒŸ¡@úÙž¹ìç&„¤Â4X ~˧4)U ˆË­$Ыªïjúô×úé)*m|{en,Sb+p.m’bW)B‘]eQo„e}iKH¨©y­°®su Qn ”§±O³'“|»»N´?AC_ku€}Ë%ŽÑ–¼i™VuQquÉ5˜ÜÓÁx -inh £,a£kOl£nº2+¾’’ªö$}ñºá0à™P “‚D(‡Ãp «t e ¬ˆ xøg˜/`ÿÄaÅ ‹I¡DðŠAŽ{UyÌ@&%—èlb$M—dP* 1šaî}ñ’lJ '0•a´Ñå@>Ø*¥¨"¦Å#Q,ˆ®:a ©ºtîÚ1z·F‘˜y–RÖºF›2‘6þY«†r£wu«È&„›Â`¯@'ä›dªi¿˜ù+ç%_Ïœ[ í’´h’9â1í#:w¨b£¡®{OÏ![17í 'NP®€Ÿ¿eM E) Ë/7uì ¸Q|Z¶¤-·Ø—šÑWIºA®§c‹gT7Ýݬa$9©+_õÓ ñ“Éy-ÿhŒˆÉÔòñ¤Ä¿9]¸…K¸`‚œµ×ßRLyáÍHÈ”ÐTS6Ñ2ÐrèH;ÉHÕwü}׎éÒÕ]^è1Õ:7m8ÓVõæ…V!Â`hzRZi6P<¦žLy‘ÇjUBšö£ä o!Ɖc ÏW„ÅeµL”þæ›jjheÍlöâˆ<ŽŽü d’IFI†MÙç™0Ñ •'Œ¼™ÈT…u3…p¹X”ÙÇMtÜ<‹Rb #„ôA;rsl-v1.43/doc/RSL_get_groundr_and_h.html0000644000102200007640000000147206600002406015164 00000000000000


RSL_get_groundr_and_h


Synopsis

#include "rsl.h"
void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h);


Description

Given slant range, slant_r, and the elevation angle, elev, compute the ground range, gr, and height, h. Range and height units are in km. Angles are in degrees. This is the inverse fuction of RSL_get_slantr_and_elev.

Return value

None.

See also

RSL_get_slantr_and_elev, RSL_get_slantr_and_h

Author: John H. Merritt rsl-v1.43/doc/dennis.flanigan.html0000644000102200007640000000032706600002412014025 00000000000000 Dennis Flanigan Jr.
Applied Research Corporation
flanigan@trmm.gsfc.nasa.gov.
rsl-v1.43/doc/RSL_write_histogram.html0000644000102200007640000000122106600002412014710 00000000000000


RSL_write_histogram


Synopsis

#include "rsl.h"
void RSL_write_histogram(Histogram *histogram, char *outfile);

Description

Output the structure Histogram to the disk file outfile.

Return value

Upon successful completion, the number of words written is returned. On error, -1 is returned and errno is set.

See also

RSL_read_histogram

Author: David B. Wolff rsl-v1.43/doc/RSL_radar_struct.html0000644000102200007640000000632606600002410014207 00000000000000


typedef struct {
  Radar_header h;
  Volume **v;   /* Array 0..nvolumes-1 of pointers to Volumes.
                      * 0 = DZ_INDEX = reflectivity.
                      * 1 = VR_INDEX = velocity.
                      * 2 = SW_INDEX = spectrum_width.
                      * 3 = CZ_INDEX = corrected reflectivity.
                      * 4 = ZT_INDEX = total reflectivity.
                      * 5 = DR_INDEX = differential refl.
                      * 6 = LR_INDEX = another differential refl.
                      * 7 = ZD_INDEX = another refl form.
                      * 8 = DM_INDEX = recieved power.
                      * 9 = RH_INDEX = Rho coefficient.
                      *10 = PH_INDEX = Phi (MCTEX parameter).
                      *11 = XZ_INDEX = X-band reflectivity.
                      *12 = CR_INDEX = Corrected DR.
                      *13 = MZ_INDEX = DZ mask for 1C-51 HDF.
                      *14 = MR_INDEX = DR mask for 1C-51 HDF.
                      *15 = ZE_INDEX = Edited reflectivity.
                      *16 = VE_INDEX = Edited velocity.
                      *17 = KD_INDEX = KDP (unknown)  for MCTEX data.
                      *18 = TI_INDEX = TIME (unknown)  for MCTEX data.
                */
} Radar;

/*
 * DZ     Reflectivity (dBZ), may contain some   DZ_INDEX
 *        signal-processor level QC and/or      
 *        filters. This field would contain 
 *        Darwin's CZ, or WSR88D's standard 
 *        reflectivity. In other words, unless
 *        the field is described otherwise, it
 *        should always go here. In essence, this
 *        is the "cleanest" reflectivity field
 *        for a radar.
 *
 * VR     Radial Velocity (m/s)                  VR_INDEX
 *
 * SW     Spectral Width (m2/s2)                 SW_INDEX
 *
 * CZ     QC Reflectivity (dBZ), contains
 *        post-processed QC'd data               CZ_INDEX
 *
 * ZT     Total Reflectivity (dBZ)               ZT_INDEX
 *        May be uncommon, but important
 *        This is UZ in UF files.
 *
 * DR     Differential reflectivity              DR_INDEX
 *        DR and LR are for dual-polarization
 *        radars only. Unitless or in dB.
 *
 * LR     Another form of differential ref       LR_INDEX
 *        called LDR, not sure of units
 *
 * ZD     ZDR: Reflectivity Depolarization Ratio ZD_INDEX
 *        ZDR = 10log(ZH/ZV)  (dB)
 *
 * DM     Received power measured by the radar.  DM_INDEX
 *        Units are dBm.
 *
 * RH     Rho : Correlation coefficient (MCTEX)  RH_INDEX
 *
 * PH     Phi (MCTEX parameter)                  PH_INDEX
 *
 * XZ     X-band reflectivity                    XZ_INDEX
 *
 * CD     Corrected ZD reflectivity (differential) CD_INDEX
 *        contains QC'ed data
 *
 * MZ     DZ mask volume for HDF 1C-51 product.  MZ_INDEX
 *
 * MD     ZD mask volume for HDF 1C-51 product.  MD_INDEX
 *
 * ZE     Edited Reflectivity.                   ZE_INDEX
 *
 * VE     Edited Velocity.                       VE_INDEX
 *
 * KD     KDP (unknown)  for MCTEX data.         KD_INDEX
 *
 * TI     TIME (unknown)  for MCTEX data.        TI_INDEX
 */

rsl-v1.43/doc/rsl_big.jpg0000644000102200007640000014510006600002413012224 00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ&"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?﮵I.u=©30ÞGÌžƒýÊu¤³G¦³†q%¹V_᨞>Û¹¤eùÙ¾wÏeÿ¦Ób.€@‰þäDòZ–}Jhâ%£ÎÑü31ãŽÄÓ#Is$–ˆ,áŒC¾;œúTK̲)3Ÿ”/¯uÏjÖ»uY'ˆGËEÖMÞþÔYâcˆH"UŒåJŽàú š}BÒ 7ÉgÛXp@õÍWµº•ÅÔŽñ°žƒßëUžä4q3]G‚¸ À;‚{¸/bi“ȵV;gç ÔB}*H¥w23ÄÈw§Eìp=(²EecdbJgoOñj´eóŠ¨ ª3ÎÐ(e˜Msws÷Wï/µNÒ¤sº˜âÆìå‰ôúVZéÆÌßhb$pz¥Q›íÚ,ŠÌ3óDÇù0ô  MQ%O5£Î Hß*œs´UÆ\@†XĉÉSØ}}ª9$’Tt.~RþᇗԚ§C>w|íŽHéøP[9_ÈòÒU@³/3è;jf  :~É 3Œ±AëRÏslÖŽBvn6‘ýáè}ê¢;Þ¢¢¼À · žþêhiwÉ ›P±m‘}ÚŸ¹V…]wïM‡qÝOj¦>вÛnguEÁpin„i´Dle8=ð=MÜrˆTC«ÕŸ,³ZC33ƒˆäþ.Ç4ß4¢¯‹mŽFýÚþ·‡úT¹“í sB%¿‡ë@4ÑùÁšÜpS%àÞ÷j4è-í’V/ÍÉ8(£©úZ†ê•ÔH@ß9÷|úU‚ëmÈ‘2«…_áÔVñÒ¥1 Âer¤u½…?OŠæâ;8ÇER¼ þæ?½V—71Ü8p½øIþµf"Ó:™Ábj±ËÛ˜bŒg}ÏÖ¨ ŒYÍ€Nf ÷{nÝéïYzŒ¥.ËÀêB0#k縕£ W/FÅvœ‚ Lv ¦1+NÞd¨JÊÇŸâoozH¦t]Hÿ)8`ƒÚ¯Û¬Ig3œ+"<úîûÕI/1#”± &@;çû”{.бíÉ?pv>ÕI¬îfßûíªU† c‚PÔ°jxĤ|±àŽÿðRÈ`Øíæ¸ùGO÷G ö  Ù­VMEãù[˜IŸDíWá¹–Ý]¶ÉȆµ©†;˜þiYŽîí能2ýn]@…n{Œa~¿Þ÷  ÖcÚÍäÌPFNð­d_H×7®†G]èªÐ:ÿבÝ,‘7Ë.>eø¾¦¨+YI2Ìð°Ú7!=Êú}(Ý¥£Gzèe`¦9¸aÛéN–Ôæ)c]ø¸ôôo§½P¸¾Óå¼Ì@Ž kóC“ËßëV¬$ócóƒâR~XÔûZžéÞ5¸‘­œåœSíP8[‹”v~ïg²š¹žÌшð0AßÇR~¾µ5ÍòE%Ì@˜Ãpàÿ=(:æÎ(dBä·c´}å>žÕ$r9µ(¥S’©ê«ëõ¦ã(ýÖõð¸_Oz„“m<¨‰"–àe»õ>Ôñc%ø× ód¦ô¢¤†îhï `FͳÔÿµíED¾I¼Ý‹œ3‡=Q?Úö¢ÞÄLî“¶IWæB3ïK:¤9JÍ… õÒ«iÒ8ÔdUTw'–oF=µM2CNßi+òï*pG$…WŽ{f¹Y¼¸›)Ô¶?‰Ú÷«ÑÛÁ%”ä19‡J{­Go¦E‰v.9—=0}O¥lXeF`ƒfIŽB;Z-­ìþÌC_I• Øi‡ ãZ²Å˜þÌÿ¼r€í·ÓÚ¸ï\k:kA6|¶ÖþKË"¹ãv®2[®G_¥&ì®\ ç.Tn½ÞÒ±Å#8y1ÅÈþî}j«…ŽÓ:êß4Ùïî+“×u?xN %îõTy%³’IÌÖ~nÉãЍB™ŒœÝ猓OÕ¬ëÄ~&Óu!=ÙººÓ 6éo´ùì–6Ü¥YßÉ#±‡<âŽ`ö/º=.$šhÐnR¡†ãÒ•WÈÙ+«®F3Ž€v¯/“ÅZôzôÿðè–6³¡.–Dˆ.àÆ4Ýœð¹$óÈÁăÆZÄú\öÃQÒ®î-FÃ-¾ I[®ˆ°²Ç^yàóG0ýƒ¾ëñÿ#Ñmîj’… Êàã$Žª‡Ö˜e»7ì¢;`»åÇ-ýÐ+þÅñ¦›¦Zjrë^\Ä[:8V&eD£vHã8Aœ9Ær¥ñ†±ya‡u¥›Ù¦ -’ýægÝ÷ƒ+B ã“sG0½‹¶®ßùƒ=̆yT®Cé':©ïnL3yL«ò€8^¹í{ן_ë¾*Ð5©áÖ®tˆã™Wì¦KƒY¶ÉääŽÄsRéZψüG5ýÄzΛÈ‘¨H>҅†;\ú ¼sKœ¥‡of¯óÿ#¸žd%d Å·“‚‡ø>§ÐU{+tŽæ&òÙFþ£ÿ­ô®2 W[µ‚äßkúl2[ÎUšâÀŒ£Tÿ­p:{dMI£x–öãK¼¾Õ®ïÒ7Vû$Öú,á0&ÎÆ#æqûè>¯.­­Ì‘y$yä´i· »ü÷©a¼ÿOxÈrÙ¸vcé^ršÎ­5­¤÷—v¶ó^ºæÒ§fA1@”³.qõÆ6î˜ô÷  77âm@ýü "ôèGÿ^®ùÓÛͳª’IÃ>zþ56>Z»;öÇ÷êéþÍ>ù%Y'eX“ ¸;aõ  œBy…¼¿€Tîý}ª{ˆ<’C\¿Ï"õUéÉþ•H}­[t$Lƒ„öúQö{™¼¹_åýXúZHài ‰‘’JŸ™ÀèþÃÚ–ñ•<Çv‹*U²¡¦jÔKå\«0•xÚ„÷>€úÖF¡o4æáY¿®áØû{Д[šHp“Ýû´”ö"–òG6ò|’d1Ç÷Ʊ¯utÒ¯\\†vƒÌH&ò¥1œ‹‘Ç œ óX—Þ>†[‰á±»¶¶±Š'[‹Ù6>%`6¬ÂJã' ´‹9Kc®xÙŒQ &yàHÃÛ°ª76v­Î¥4ñ̸˜($—ã,:à~•çÇ_ÕüS¦¶u|—REåùvÖ¥õÔœ §?(<œsN¹ÐõK_éSÚÛZ=¾¡inó]ÔöêÈ÷F=È ã<Œ•Ìh¨®¬ô/øI´h­£¯ìã‚é˜C)™BÈG÷[ Ž*-3ĺ¡wo§Ásq5ÌŸgÙ¦#n>öHÀ9Î9®g]‚k? À&½Ñ­´ýÐÇjÖîìq Ž’evã“»ÐÈâ“Âö]:îâß]Ñä¹[§†â±<í1Oºþ`œ @’àÔó3Oa ÚçI?‰ü9g/Ù®u;(fˆí’)¥°aÇ*ÄÙ¡# ƒZvòiòÀ—¢6I‚˜Þ-§r‘œƒÜWÅWz&¹ªCq ºTȱù@ÑMs8’X•†Bn N7`Š3£5’.‡õŠd}8C¹LÖ±8Tê Ë¥7&(ЃoWý|΢×!ü|€@çƾŸJžY± ØY›*äÌOÝ5æ–Ëc§x7VÕu+ûÛ=~â .#Œ5Í’,—òªìNÒs¸@ftÖõ‹-jÂîî.ôÛÓ.&›M,Ò…PÄ!EŽ2wm €H'§Ìgì{3¾º¹lˆÍÜp“wX–iÁ·uÀdó.?¥q×~5·Šy~иHa2¸'c¼ãiÛÉÈôïéÍíââ ‹{{3så ÊÅ޽È'¾<} 5$É•)FúQ³IeºH–B×–þt–ö;yÊ!ˆ1Þ2|–?ÂENר±,Ed&Þ…»OÂ’{¸„èVI2vðÖì:ãÚ™˜«m±ö+”ñÚj6ilÚ5Ìp4ìÈX¨%Ÿ#b€sèÄž€NqŠÅ‹Qñwü#0Ç6Ÿsu}-n|í²Iæe˜Ä[AUÁ<‘ò“žµ.V6%{Ì0ÙÍ$ÈÑÚ–†árycííSM§Äת‹…³ò‚;Ÿ¥r!ŸÅúe¢êVÖúd1Åó\'k‚ÑsòºF8'w ëãZñdwö·WWOmkt„[»hÒ6A‚ / %K•ÇËÆhæ ÓÝ•mvñÝD€¹È¡oáúûUH#{¹aMÌ™G+Î+Íí¼Oâ YäŽòî;{–”ìi´©×ÎäáS,›˜ŒlëÖƒâ?§†áÕ-5ûÕ¸‘|Ù´ILQÆpAGòˆ?.:’~ö:œÂö/º=)íRÖþPîϾ"£%EÒªêWó¤ŒZHù¾¢¸ k£JMzÚ/Ü‘%Ò¼¹Hù‘‘šÑûoˆll-õUÖ4­v5³2Ý@³Ã $˜ÉÃ*Ê£v:g=ñÉÌ?`û£®†êWž!%™·žH-ÔAíVäfûxFŽ]¤á·Ëê+ƒÓ/{²ë›D@ðÜ>†®Ço);E|íë[ûµé¬ÖV’bRÍä8äjƒdpÆåîËÆ¼(ZŸæ³]ÂDn™Ü=ÂŽÆŸµÃ²®×P60Î{S]¹O²þñߎ\ŽàÿJ„oV.ŲÙê1üD÷z*Ôq´ò:„‰Àä~üÿñ&Š[dpò2ÜÈ£7^Æ›qn¾|2¢‘‰]óOzŽ 23Œ¨ãè;þ5—H“´F7€~ðÇ'ë@.$k{5@²Ñí>XcØÕi’`²yÔ»67«õªÄ²C%¾ÅP8ʃéNyâ•àÃlÜÍÈŒzéí@Çk;\ÂHVP܆îO¿½qµ[Í*ïÃ’>iæ)$LêZ?,®Fáœ3õé]RË,W¬ÌZP`2¨tZËÔÖÛVµŒ^é6S2'Èe¨m„ã=3ŠM] rÊç›XüHÔm iõM>ÊökˆŽë‹‚èÎŒ…ûʪGe<3]†|Aÿ DÚ^‰©G=¬ nÌøc*ÄaÈÞç!~ëÉe\Ø® ßÙ·q dXåC„ùˆÊàðqÐõ«(5¤»™dkG–d²œËòa—n@ ó{ûb§”ÛÛѯÇk¬êºN„‚E1º“ìîÈð¤+”¦ Ί0G±X+ÑôèµmÞ9µ²ðÉ Ž[›÷P‘9 #“ÍSóy|í${V&“âÏì­FmHÜj¥ó[…¼³’42ùH¼ÈU@Q“¹XœsÂîì¼?›â-jûV­õhR4ŽÞVRE»Þj•fS¸¨ GîÀ$P‚lÌðÏ„gÖmõ½Nß\Ôô÷»‘­c?g·ßÊÜ7JžJw³qò¶Éäb·‡ltË …ŠÆ[ûe—þ'3Kæ\[Ü(éÊ0Ä‘ÏbGM¤=u¾›©jšþ­­éÅgï À´²¡!Ë`ämÇ—½zrP2±iÚ2]¿‰ìï×_ZâkËX¦;Š#xCb%aÈ'ø†N)ØËŸ¹ƒãÉ¥‘§X_½ô2$@ßÄ¡š%99nBÙó™ã8ÀÊj´´;K];LÕ`m=£–ÕÙbà®Cn"C÷°'üäⸯjÇ ¤q-Ñ—í7“<²Ú4O.$Â1@'`ç1ƒŠ§>‹`4i;çžíÁÁ€lqåKHǹ\(Ï^(å)Õ}OJ²ñuýÞ¯>»6nQšÕ,.XÆöøä·˜7.Xç``¤®Ÿ¬Ykz–¿|þ‹X¸Tì^i±òÚÛ%t@Ú ðœ³±Ð Ôîd—ïP‚Þó æœ3€‹Ç<)Ï|ñÅ>öõe×$¸Š ˆ„pÅÅ›”1Ä€ HÁè3Æ8¢Àê\é4H´½&Oí»K]:öÆíCÉ5µ‚Ç%ƒ´ qAÏñ2r2Cü;áñâOÜ}ŸSÎÊõÚ-áL`&âÁ&<°ªŒtÆCcÏ›RÕmàó­ïD—WºáSÝðË\`Íœ·\œ÷ñjƒÆž Ñí<Ѥx…•ÖëQ´s–”LýâÄð§;pÄpU†¥¦ƒ®ï/¼Iâ];{+» I/ZšæÙž(,*ï+üªãh~ŸN,jÔtÏÃyªë2 ˆ#O½†Ù~άWæF‰÷~áƒò28ÁÑxŠXtQ£Å¦[ÆSO½¢´Œ…ƒ˜ÛˆQ‘#ÌÜä’NM.™—‹u[˫ӮŒi¢\ªâþ%"BT¤ dòrAa¹³ŽŽæëTñó\ß_]Cqw¤Ú%Œ³ífrpÛ×1©è2A«>M'KÕõfÒg"w3Ç{#ÆÈ½¾cFÝÇró¹FT]f¹ü$šŒFÎåìâÓ]¿âck")Á0®AVÉ9ÊŒ7 /žë0ÿgêW°Ãý©{­ÛÈ“ÛjܹT-ˆã‘JˆâPsÀ)Àn½^ÃUzHزñ•¼÷©%¼í-l© ëN×Ãa '8Ý·Jë¯5’Ñ’"váI"p?‹ëX:ÿ€cÔf·ÔuýV(ïÄ>]Ãé°e¡óÃàíàrG°ά]h·Ï¢ê·bf\/áåܹ<£ ÷Æj“2”5Ðô&¶y]nåMÓ8ŸOð¦}š(y³»˜Ô}îz/ÒªÃqö¶“dó²†ëÇqZrG*Û¹O5ó´r À4ÌÊÐùq©iùfaŒcŸ\T—Xà*p ÿúj’kYÄŒO˜3&ì‡~=}ëp¤²*•uƒ÷“Ú€06Ï=ƒT±É(Ý6Ÿñ ÚCso2)#`v÷aRdgw ŒA GLzf2˜ôçq(w•ð{OjÊ[Rš©Q+óÞu{Õôs @¶?ùìvÿN‚Ù¿´$v2¶Fÿ]žãü E©=½ºy“©2 ¼’:µGy}k¦éw×—‘ˆ¡¶PÒHÇOÐs\mÞ«w¯ë#MÑîRÄ6I§+»r(E)‘¬Y‡ÝmÀ`§Š—Å6÷²È’4kw¤‰C\ÚÄûetd Ç ’qü'×5¡yoãxbѼ9¦Iuä˜Ý”Ÿ³Ål É!ਠ2•’ 8èj9¯±Ô©(+Ïr—„£¶¸ñ6§ZM–¯qii„o‰$vrï$®8o‘Fæ<ã<¿6‹©Áã;¸_KþÒ–ÖF–3l<¤Š2¡@“;Ã傆Æþ—¤m´^Õ¦Ösnö±,,aÔ†VI£ÁTŸv@'#‚kͯõÝIn§–mN[»i"XŽöØ5$?¼§s¬OÉ$ ,¢Gq}âÙ-¤Ôï_QÓm.‘E´vöó­ÅËþRp¹vðætÉcºúÖ;€–䉙3—SÏSÙ9Ïj|¦N«lȵñŒVú´/¢µþŸäy²,ÓÎ.¸ÎÇSÉPÌyë;o[j-s&»m¨êrÜþèߦ¡$F„Œò<¤ž9Å+:K+Dµµ°ŽKeç¬Ëss(Só9*sƒÏû¦¶îâæ ÝémspQãA¼ˆâc+Æwc¹äsŒdåØžr{k‹cqk\ÚBV8nfHüøûcj°í9NF=ÇOkÂëß<öztò˜Ä ºÈÖ‘t¯˜\œ‘CŽ•ç1Ùk0ÅöS#E kµq>À`cלwèiÚUÞ£áÍZ ûE2Onåÿ}fPFÖ ËÔê½ì)Xµ$÷g¡kž!ºð†Ÿ§ø†÷d·^Uˆ¶·8yw2«4Ï“ÎÀXªàpyaÅOãMP OGµ³šª&£nЫ©rÛË.ÁpBá›<­Q°Õãø­Ã›«ÛM5MÛ ;f‘ßtjùW÷Ÿ2œüëŒUÒ#ñ-†§YLÖ¶{¯îšÆÖk’Òá£~ÅfÉÜÍ–Ê “Å"¶FˆõYP0˜#½¢úáö˜vK†B3æ©þ+Íu¿yš”·Oiö°À Wl2žÌv5-\Ö59UŽƒÃ:Àñž°Ðj‹x-b[³nã?iùŠƒÏHׂA I#Í*{î²æ?3¯$Ì@ÈŽr01‚8;²HÛV2sÔ±wq øÃM›MžW·s…V{i”tP¤í`x1k˵½fÒÆ+fÕ´„¼µ[ÿŠA¹±ÎœŽ@V8ÀÉÁè+¯¿Ô<=eg“y¢j=Í©P’ÇK2no™üè·‡ËuÝÔžAÏOâ[û­^MMŠF›o,«·t²(iƒÏ-ßíÈàä–is©¹ñ¼šçˆàÔll…Ř-ö‰3!*Q“fÅ#©mÃ$à¯~s‡¨xšöïSêÒ èíþt ‚0ÝpB.öÆWÀtëMóMðÜ·ð]G-£Ü’7’á‡r3óÃyÁÚðUÖ§Û]Å{a ¾’äH’´Hä&ÅCvÁŽÙéÔQÊ'U³ÏµÝNmzáîü«;u?"ÛÛeQp«Èûª£ƒþêöÛmµ”ó\wWŒK¿vÆu9 §#˜=ê³_,^$Ÿ[³Ò­å¢DY§_¸ËüJ1×Rxè0h²V¿Õ!¹½F{Ù™¤–wÈî0Š3¨®OZ«¹6ÏV±”›1—n#[3êk>;‹ÝÒH¨î¤¿Ýpz8ô¨´© ŒˆLñ ñ‚Ä{ûVÄK@äÄA— OÞ4mµø‰ÛÏo,ù„ òì*ºÜ­Ôv¨ª’ƒî±nÕ-ô‹÷à Ûóíêj 6Ql7mãî ÇÖ€-dŽy–)Ý–#¨úVuíÌ€AŠGÏ÷ÛÓÙkUm–h6§•×øBôýj¬¶ë”EÁýÁGì§½?O¾n¤IRS…ÎUÉêh¢ÒÕ]Ýü©rʼ€¯ªQ@BÜ,Rù‘£)î·e_¯¥Vš(²Ò‹vá,:g×_O•äG ^cg%Üúêjso [B]7žØ ÷þ´bXæŠPmÈl}*„vѵŬ~eÈ1©-™Œ‘Žõ|—vRÿ£²ÄŽ1ÜZšÖ-¯äÄ'8$}=ýè¢ÖÕ÷2¤r08è¤ð1ëYSZâç?ê‘QAQýßozÝšæKe••T© (ôŒoä’K ë"x*ÿ÷ö  qéÑ‹Æjº±~I_ïJ[­ÒG¸BK«žÃÞ®˜wÏ›™G Á{Ÿ­,×ßf·‚F›r,Xcøÿ*+ìyuœ³7u; …®£5逳¨hšâŒ0p~÷!ŽÕùÏ d×GàØ4ÝV @xœBn4„u©gdÄ»!•e%NYÁ^£î™çQñ™¨>§%´7-´äÛ £™£”È䓎Uƒ*Çøˆ9ç'WÃövž×RóÄ·V·zm¼·Vqµä)û«‡häi tÁu‘AÀÆáÉ"#©ÕU(èÿ êÇ™u¥xjdÖ´]<(ŽYn<§€œæàbR<à¯'Œåø—_’Ú=xë6òYê“ÝÙB-eÙÿi™Ù•”•!ŠÌ¤Œž#< û/¥Ï‰n$ðΟu©ØËKÙlbSºcc+3*³lù$é·–ø†ÐxœÜ\^[ÜØ"Ŧe–Žgó›Ê ¹Qº0$Œç*3Ô 9™Ãê-ÕËYO{©/Élˆé ©WÆw8b7àžOãÎ4õ D¼iH‘F‰ @ðg. a‹>öCŒ“íY–Ú²êw©b’·˜ÄòC \€¼`ÃÔg­M¶:Ä«et·_¾›‡Z“À'9þª=—†-b·Œ>vŒtúÓ›ÃV,’UBo1zâº;;w[p$¶G%Œ÷ ê=êâˆÌ¦6µ’<ÈN|} 8!á(åó)ŽÁœ¨@éëYRxVþ üëyJÍ‚Hœ0ܬAשÏûŸ?Ë(FÐyÏ¡>žÕšI6ª•d' ì¾Ôìó±«ÛI¥‰ì¦žòKȇÛUd›Ì@s€œ„s€ƒh.ÆÞÖÊÖׯ>(Öõ-BÚòÌÚúZÇvöó:_|†';Tµ³ƒÀ©âMγ[ ó"u$!î rVú•ÝÇØ¼K}}qoöcý|’—DÛ,ªÙƒ|ÅJ•ÚÙT½ b”•úo‡íuOOmÅÄVšd²ÙOªÍE, F¿ÆûHÉ<žN0×¼âèÞ··IüÍZU&üF¦yšä|®\('¨8p¸™É²Öõk_‡QÚ&—1ӭɈëQ,mÃæcí2ûÛå%Û ÀH89^¯®ØxoÖ¶DH0–Öè’«²ª¼œ–cÎyÉ$u¦fÎbËO¾ñMÍüöé `Ž?/çsáüµp<¤ ¸Ã áW$Q[K{Ë6ÐHÚ”A,išn%±iã!òs´ƒ÷kÖâðmŶ—;j^"Ô,侸yåµ²XQ»’ÅUšnÇ' x¯(–ê+ ^Ý­ w{ 8ô™š1»í™nd2)ï¼Æ=‰ ‘ƒ‘¢¢õ: kÂ[o1¤Rd„¸VÆGB¹ü z\#ÌÈd*°Àb;Ø×ŠøTI&Ÿky$‰—pˆG-³æo¯Qí^¹£\+Æ’,цo¸G|zfd÷ZžV6YÐ|ÇïÈßÞíûSíµ©WË&Xœ}Ö?ÝosPI ÒÁ…”¯–OÊÜçþù¤ ïJí'Íž­Ž€{{Є—a®m”«|ÑpÄwÒ¡Ô%’fò²£B{ëïPÍahúœ%·68ó[Ô{ÔWVÑm>\EN2[ý‘@yBú@ ܹ'Ë#Ÿ›ÿ­T¤ñ©ØOj—¶“}ûy¢i•²FT‚…ºsøƒMñeåÝ…îæ€C&ôe³€<Äðs‘•Àù½«„Ô/´Û/ Zhšö›ä\YÛ¬·M4Hæ@0vÝN÷88å~`ppj$ï¡ÕB*>û 5'ŠìÚ4“6;ÁdÚQ)UÚ\®ÝÅ”u  äúV¥m¦é^¶Õt) S§Ä×Ì$ 'ŒŒÈÿ‹x\矙Aç®;OÐï|okªj‘Ç ’‘ÝF¡ÓFŠf.àÆÞËÞ2:…fx¦ ÿcµ¿„g3=¼°$ÂÕkWf”ç‘û¿˜Ž[ °ãqÎ(Q±3ªäõ9Ïëét÷ZΣ Ãl~U…Ñtm¯ÈwºïÚ~îÕçÏxKÃ7–ë73E‚`†U]²>z~êð@Ç`jŒ5)ußj·š“#~ùš2p@ «Ÿ`«õæºt·û>“mgm(7 “Re|ª»°( t2WýÐsÀf Œ‹R¸¼Òu’KÞìêÓ#yh›Pup‚DZèkGEð´žU²Í*".ÐÍŒc'¸8­ßhÖŒp€"ð…Çaÿ×®¤[¡µòƒ¨àä6½ê(“aáûO²™Ê–@¼np9Ûõ÷­%±Xf·Eµ·ø¿xýÁô~„« !b>òƒü#ÒŒÁsæ±³Á ¸m…»1ô  é€È§b&ü9ÀcýßöiÃÐÝKòÍA=ùô­Ø£‹í[cŽt òrŽðûÓ',Lë"Á̧Ўíô 8Öt'Ò5$’{‹kWYíÍŤLî’8_/Œ·#vT ¯Ö¶¼â!žèxBº¼³šeº[3]mÚÊ^W]ÙOFOÞ«^'Ô!±Õ-.µ6“ì°ï‘0I/ï6ª‚J)ÛÃ8ç©#+šÓµéaÒ®m4e:ì·7¬ÖÖ¶æf“tÒm2(¦9+Ž3‘ÅEõ:”W³NæwÄÿl‹Ë©-nm#—OHmÉBeýñYH(̽J{÷éŠÅÑ,o`Ò¬M§”Ïqi<Œ¿q‚´‘ô9;›nqÓŽzŽsu·¸»Ò]®‰kKEx,¢!ü¡³ï·®Oøî5¾§¦9¢ÚÛo•mç YLj g€>P6õž¸èM#žGmáÀZY£(>`GùÅu·w‘*.å}¿1oö}ëÃSϪ…Qó‚2W9ù½Ï½o™Ù€#Áê1ý}©’OÌF&}÷¸;—8ëý*9®ãŒGpc¸#ËP~`GÞ'µ2d‚â=¾rF8çûÞõV9"ûq´Ëóey_|zûÐŒw±Þ]È"GR@å‡ôö¦Ïi0fy )掯û>ԻŻ—…#Þ(Î~£ÓÞ kÙ'¶ebààžãÞ€(_Ù ­ŸªKe‘;1÷•ä°XïE­6’¾C"]\\MÚ³ Ü2½,¡³ÎÞ ‚F=’âäÚYÜË3Äd±uÈ9ÏAé^Ká°Þ+µöLöÌ&–æk¥ùL—*¼J¨.=1#¢ŠVw=MÕ|?¢øKûYÔí’û®EÕÂ#\»œùªÌGª·pÆ*Ö‰õ¦£oªZËe+É%¡Ôãq9€ðŒòG*7cœž(ü<ÖJh:…ö¤ÉgwäY;[*-Œ…“<Œ2þ#¡«>Ðõ=OÃv÷m®É§hòHͧÀ)’8L¦MÀÆÑ·!J‚OJ¤e#‰ñ>¦Ö~}>r]¸Ô¥K ’oQFRÜ#`ïã`p>mÝ:ZâÆ4ñeµö­¨~ç)ç X„~RlØÜ[ò“ÆpI8®ÆÚ-Ž ­î£{¨êZÎÙ­äâƒiB’ ˆ0¤ÉŒ’í¼ž¥¨ÈRöW³·G1=Ç–^2ÃìärxôÉ:84ý>ò8šÎ)Œo6-šWw$£“’8#Ž+¾Ñü)Ú)ªáAû‡°Ïp+ð|pI%»‰¤•T™aT/ ‚½~ÎZØX$}À{ja¾… ɲqÓZ’+KPÖnöñ9“€¾ÿáVeŠFa²ð«ïõ÷¤²Y ãÉ— ˜ÉE#ï{µRŽ@Î$†Œ)'‚£»ÿµï[²HZP‚V 7ËÏñcéY¶CˉӀZÃ÷xäéš•n×Ì7L37fcè(÷ ¶|y¬w©êßO¥CczÑÌêà`G@}Oµh-ÅÁ(ZÚ#´CCþMåI3-¼?pÿËNs†ö \jN.ŠC ÀNìŒøþõeióËö2i0U8?ìúÐ}¬ë,À'îHÎñýà»PnÊI¸Â€yþªµa<»ÙVH°29F=ÖŠX/mâÜDwC“÷SÔŸð¢€"Ë+©ÜE·îì(ld¦Ì~ñ¹ÙþÏME4PÂvAÐ;só@GB¾‹Uôï:Kë•ylp>doî)ïS@Q&Øž(ää¡<©õÏcJÚí2ГÐüåzã×>•&Ë© \€FWå`¿ÂO¡ô«-#Ç$È®]„{†rݵW¼„G 4Ó°ÚXàé>ƒÒ­®Ÿ¾"ðÉž@û„ §j–PÜ[ºJ€3)ìÞ†¡ûMµ¼,#Y HØýßz[œ©”¾ì®Ð6ƒýáíXýÌçE0Ão¿,c!æòþRHûÀex=G5£|.X“œ+J çøÀîk˜ñ|w×6–{㹺ºŽ<ª¢3)¸)ÏÞÀ$ÇBغjóG:º¥¾£¬ÚÙÙ[\Ø)žÎÝv[nUcv¢S¿k#û¾[‚XwÈ=îŸáè´/Ãw¬Þµå³Ë4¶‹jCu,ŒÍ¼dåˆl#pëŒñZ½õ¸Õ-4}ô³[CgjVyìÇwpT‹tÆz“]Íä—>%×χ5ÍúLu$QHÞ*°ÊÆãî… pæsSjÎíÜ]sÄ1®¸¶>†Yµ—eyìá,±üRJÄ/ŒÃæbFCcÂ|LÔµµ iE…cX¢ó¾zJìXþàF-°àÏs%™Ñ|X¶~´·™.ài¯mLâaDÂN~fÎÜ7Þ žÌO ã¹aÖtí_SÔ¬¤ ikv‰>?ÖO!ù†ÒU¶Æ2#æ8æ¬ç9/]6™âÃx-XͬžCÀ%²xèÇ{­uÞÇöàfÚbF”Žï·æ==I…p~µÔ&šîcûµ“J¹o0(ÉEÆH¦[åϹö¯EЬö\<èÏóÄÀ±b =É?Rh¹èv‹çÇ F3[Ûü*ró¥Ã©ß6FYäã¿ûµJÂ9!¶º—SÜúâ’âLÝ—æ*‡ÿoCï@ˆo¯äó.ìÓ‘¹F?ÜãMŠwV|‰²0?x3Æ}ý…>ÞÚfŽWtá°¹sëÇ¥Z‚ÓívÚpÌ¿òÍIÃc$öÀë^uâyô¹5+(t¨žÒî6Õm VÜ!t’åfv8ÜA=I<kØeñ6·mcjzÕ¼†52½‹ ”RØì1 <7ð0÷õñ}q´ç»Ìóˆïµ+qz®ŒYã33H±mç!c1gݘñœÕ·(øzÂîóKk—•-“M´ lÉ.°ì™ûŠô- ^êݘàlÇúÖÿ\•cquá u9/RIVÝ/‰$ñ´’Oýr;ï ¬qÚÆ2òž¨Fz…: "É£Ü_±—>¿CñBè¥#NyqÓËú{U«S Á–·ˆÆH#ø¾”\Ço$²¼¬¬y#û¯êECº)õ’c!;çÞ´äW†eTx°Á›Ú²Òä}ªw3*½özû.oIæÀø‘¾óÄOjå|iªêM«ÏYÈÚ<ÜË6ó» nÜÍàgvzâ›k¾«¯]G¯$&æÆut+&ø£· æ3£0˜•êÄ÷$àêjÚŒ‹co.ý!5;K†–UB$˜(‚ØvV…ÈÈâºá‡gàoéúÌ«+E}7ÚgvÒ3`£dtýÛ*q×kÜ Ö÷;$íÅËyüEsá=;¿\ͦ±ŠYÞÞDyZÙ>xÃ#mÇla‡ÍÁcœñX><ñ kqxŠM8O¯o¦Á»€ÄÂXï$Ý€ÃæÚ]2FGÍ[ßÚ~9> MJ[B¶p®ã)›eñ·Î žHo˜,qÈ决|qâ ÞøJ E½³Ô%Mc ½Â<Æ5D}>bÄ’Os¸çžEœ·¹çÞM*ÂöòûTofºB¨×¡û<Ù;Õã$‘ÈãŒc‘].›"k:ªj1ÂTE\dÄ6;}ãþMq«-ª‹»›†–K©€H"Ñ­½È`¿:ðwçžëÓ‘ŽëÂÿgŠ1ÀA ާ½RVgf-Ö'‰cyÀxœäŽ>òZ³ª#•}’ǰîÚ÷¤–pñ²¨B¨À÷þÕ]1¼•D¨Á‚ð#õϽ1 ‚tû]¼P„9äžvã±¥O*ÚáÄ‘° Jƒåøï·ëQܸ]MÂIµ¶P¯vö>•Zk×½Y»,¯ëøzÐêK˽f ßÄ?ơԦ,Ñc’@Ä ýØã‚=ê[EsiEm™9ÜÏÙ½ê9¦­Z8ƒ"È@Sè¯Ö€9ÝVT¸½±KË• ]Õ$ndtÆÑø}ìg9Qèk>Öûû-RÁ@|èùäç§_^æþÞ(u[X-dv6VÑFñ™7…wàs´ü™À8öæ¼âhfÔõC ÍÏ™ywq„ €$‘'I<ùW¨½´#ÅÚÁŽÖÞUŒ?–@b±)çŽ[,Äý}êÑÍ-ΫLûtQZˆ‘€Îç÷Õµ íᲘo3}}þž´–Íkj¿ŽŒ_WÐUñþíB@ª$QÌ;¯¨É*³Ýý¦2ˤí9ìO¯½WþΡ†S$’.ð~l{5¯%â3¬j¬åT}ÖÏlT-ãŸæjÔpçO”¨ùƒ´ŸÞ_jŽ¥ùã*«ó¹ßÛ×ë@Ï*LždvĆså÷éÜUm’¤ˆˆÁ Ø8+ÄÖÖjuÎ ¸ñŸ­YIí¥¹€;3‰å‹w$P%’àÀêIPÃÞ4Kw%Ê«[‚¦iK“ØöÅKåÒ¼d…ÚÀüÊ¿Íj³»2nT,É9êëÇlzа:Ü­U^å"i|Ó"ž7Žøô Oj<Í%ÁÜÍÆôwõ¦4û3¨†xA }èÔ1íïX—ÓygTd Í&|ÀO­M-ä™-Ô+´ºü¨:”£«Ü–qò6ã Þõºa†ÚĆd=ñéO[Ñ5Ô Ÿ3>bç`ôáL¸’c+~ì2ù€˜ûÄÐíœi $8?*çþZg·Ò¸OjRÚø“OƒOÒæº¹¶±šè¤J\Ÿ(7$gß…Éç§9®È¼SdŒä6}úõç~$³Õ“Æí{¥ß 3X´B(“sˆÆÒóÀrpA>üL¶7 ÛìW°6#Z¼ñ •Ôš†±h–ß1‹ËwžIJ uŒá—(¬˜<á²IÛjÖ ý§a¯xÓKÓÛF‡|mA?ÙÚB6K6r»GÌÜ…,Xr9M*]0köZÆÝHºœ6ÖЩýäÿèÌÒïÞFXyÌÅ›¡^£'=Ý;©ªx×G³ñ–ÐØK×+§Û94±Ê \¼|ÎØ cµU¥mel|#Zï†ml,b½ŒZÜÇG8$ˆ¥x%¾¥KwQñ¦©vúgÒZÃgs~eŽ(íö´k B-¹ h9ùBðsÎ8¯ZñŸ‡´mûûa¬-VÎHŒ¬Å£HHûDI÷T© ±drAÝç1Ûi§‡¡Ô'³°–æùiehUœ»[/÷² ?•3$R¶±Õ´ÝÒêîÈ%½Íœêé&í‘å™·.RÇg÷ç5è^‚/²"«¸kŸJåd×.õkX¬etià*$~¡ÔÁãŒrG××¸Ó ~\k(^ÎQèÊ;ƒLFÄMÛÆ@ºb&?yHÿ×¥ûFÆvû6í›ÇIãúVfŸsm ı0‘ö¹2Œ ìµ¢òC( u W9V9ç#Ò€%žæEYP$Ñ€»¾î;Ò[™È1m¨1–qýÓô¬ë››9ÌŽ¤”LG\{{Õ»+˜®6Ll$7ëí@ sqþƒ–’#+—=ûUç‹Ý:óÅÅÒý¬Û$ð[µºŒBî¥ÆåîvyJHà±®ò;?¶é“¬+ ÍÆ>E›…ÝŽçð?C\>¯o«ø~ÁWX[Qa=óI{5ÓÉ G'¨1®œç="O¡ÓB:9N§jPËumáíN m.4He۴ѵÈ\ǵЎێHÜ W|=áý;SÓõ=eÍαðž[˜—i `dRHòð‹ò6å,ØÉæü%6¹¨Úì›Ûyí㵎âX.@Ú’K¹„q¸fŒ‚ä3ÆÏ†¼>úìú¦¯¯Þ]Ù܉MœV–÷EMº«ûÌpÅ‹+r0Aj‘”ÝË#ñ”úT—v·H·Öp‰®®íaܰof$ºŸ”ü¹éœEx>µwsÚ˜bg»x]IÚO)ŽÛSb°ïd``×oâ«YàÕLJßRc¤Ãv.ç¹*†I¥rY~6’0F0F kŒðÞ™y­xèÿc[Í©Ck)¸š[™ÌÜÅñŒ–鞤zg „ìt–‘-æ‹¤ÙÆ·p41¬we­(<¹`plÉ8b{×£xF?+NŒ²ÊÌÝHô®Æûí‰gf’1’ÙîUr+ïu>Ë€¼{Šô-6Ûìtr;¸Ü…±´Ñ5 ʨ1ª¨ç”÷ÿ{Þ£º¸X­åa"+Âðç®ûU_R¾ ‘ÆU²UW9¨?áEåä-§d¸éƒÛë@l¬3±o, ‘÷sêkF³E§0”°q¹¹RSQ@‚?™XxÂŽƒÒ’KÖËüЪ•lîôSØûšàŽ¢ ›Âús ·mYZÒúc¸+ª¢ƒ¹ˆhˆ'ч¦+¬Ñ4o ÙèWZ¶«4ÚŽ£s‚é®ÐHñJG—å$KÂ’[hÆwáˆažKI“^¹×4«D¾Ó`´³žãì’‹e™#(û³6ND²’Û²Y5¹¥è–xu´ÌÊlöÃP3}žeù”ää ÷ÿj¯<h”aŠs“ê}=ªf`±±x°Ã' =1éVà»Y`b±w'„Ï÷¨‚D ’Zç u Ó¢X‚3-š®CŒåOñßéM»E¸¼ n¿ºSó[‚sŸ­W„Íml±°gÏ?»·äôÉkž²Õc‚öêÕ¤»ŠÓÉVóB` °RäžÙ®_é«C3uLõ$⢊t{S®çì„qÁþñ  J^ϺÓ 2÷ϵ:ææT¿eRˆ>Ño¡ô©.Ò?8ˆ3’¸éÏz§-ä-rŒH­À=€ô>Ô ÆwòÒä_˜1ÙÏ÷}j)çíV¬.æ *çå÷fã'#ÌÇ(çŒ}}©$·/VÊv‘Ù  :ñÉ!Y’âæÉ­"KÑ 5cWrÀ/pw®qÎcš½à{‹ÍcÆ^ ¹ðÞ£eo NÒÛÓh•Ö]6ªÄrxnœÖg‰­õ‹¯k3ªy©j¯!]¾kB’°>X˹ç)ÓœÕ]'Ú­aðœQKqyss˜Ì›!6HÛÈÛI(6œ–8ûƳZ³®¢QI/ëÐè¬,´½WÅ÷‘ø³Ä0µõE°†ÖOìðѺ¡2¯æ1Ü6ãy(=Ægyâ&ÆûFÑ'Ó¯´Í2x ·º¹•ÂË´¤XE"F]ê7n\‚3šÒðÄZiºÔZÔv×:Ä·m%ÔS25 ÃæO,Î:— qš×‹´M5u›= æÍ,gV»0Úº Ü*yc>›˜Âzc1¶~õhr½Ï7ñ]µÖ£u¦$ú„2¼ë#ıÀW‰®$pysÆB}€ž§~îì¾Ó¥L‘â[ñæM°Hã*˜ê1¿wÔqÒ’}>ÂÖÎÔCkÈQ7Œ­ÎxÉ8‚@:Õ+RVÔg…í¾f¸¿|0…ñV è;Íkk„‡`Ž3À+è}ëeîÒW…]”~óq ‘ïýêŽßO‡û:6EÞRõ'¹ŸJ¹b’@6d$Œ7=­&‰m bÉó:HG=}}©%I¨0G;Xùoþ×ûµ\ÜÜ-ŒÄªVgî\}ÓïUÚy…ך҇\r ƒê}}èJT#1¾òY­'½gÊ–ñ­Ó«2aÏ!¢ŸJ˜Ïjdˆ¸ŒôÖ™s¬Ú]Ëá lc@=h¹Ÿ|·`Œ8Žw vª÷׋²{“ˆ×îÛ°AìjVÓâ ÆW!ƒp÷—ÔÕ_"tºC“‚ÕÑúÔ¥e$ék3H“À°ù_üi-Þi'SùÞ[æR‹ÜûUâ·ÚÛ•aµâ'ýYö?Þ¨R9 †i1Î99ÛÔPv·ö¥‡l;€c•QØúƒEO}oq<ï¶IˆÎuåãõ¢€=ÍÓʲ½„J »Pgƒõ÷ª××®#¹‹Ê6ð $cÐûŸJ½=’}™<™$oܰF<ûÓ&IBÜ3ƒ99ê}==ÍTòèÛ³ÄOï%?<ퟧ­N±;BÉĤ”dÿpv4éc‚Ý-d•¤$»g-޹>¾Õ<Ù–8+œÊzü‡ûÔ{ì“ÄUá]„Ÿº{¯ûÔ’8·mÌa`cU?.zsëQÜÉ Lë%Ê«äp}GqVnÌRéò:ÜÉ€ d&?¥"A#ÜÏ"ùd½³^c§mßê1ßݽ„1j $VÓa‰¬X¿—‘ß `y»U·Ôíå¹SÄ™–“1¨èz–Óšó[K^ìÙ[iéßÛ,ôÈîÈU|­ìQ²>]ñlRs·q<Œf$tÐvM›ž’-}7Ä¥Hâ†ÒÂd4Œâ¤i%œ¼‘®É G8ÅtÓêö:ß-×W½¾Ñ-­ÑÞÊK„šÉ¦‘þP¤UÎЕ=wȪZŧ…l|7aw£è¶–׬˧ËŠÌÊr£å]Ìû•w ç®{ç¡Õ5{^]/AÖô[­&ÛSÞ$–ðÃ"ÈÁraBŽøb¥°X…8û´ŒdVñ6ƒ©Ú}‚U×-oÑ.c¶z…€:b@Vfãh%¾ïbH%A¦ê7—Þ(ƒDµ[x"–_*F‰œ«ªƒ–åà€y8¯Fñ‰4¿ j16‰9¹†ÖÊàAenÛŒ…B¬ƒŸ•YqÛsÆòï"¶»o&牢’4WWÃ!Ë`ƒÓj‘øÐ.ýŸ—o¬4 gmiJb_³±*åKnbNyç'޵è¬FÕ%[™ ¯ÈOwÏ­y¿‡ZK»•™<ÇF˜9æ-–'·v#Jôk]J ñN s™éÏjdŒ¶2A}#}­ZV8|á×Ú´mZ'pÒŽ Iü@ÿ{ÞžM¬Òí@ùË‘¿ùýjK9FС±´uxñÓéï@ÞÒ,“‡øÇfQU„‰ slpKFØú÷h¸ó¤>`Up»Ž€taèkžñ!Öb·µ† ›k~[ÍA$åE¸–  ï @v0»Ïp›±Q‹“²s®Ýi:”ÒXÂóZE2Û\í!‹K&À@•8ÓOQÅ].õˆ¶š~¼ÛDvÍ|ÖCó†QÊÀcŸö‚GÊ99ÅaëÙšš£Nñ˧K0“Ë™Òâ<ä¹dbwnùXýã–Àä‘E¶½¦ÛßiײxŠÚ Júùî¯îm¥Žcû<‚8‚ÙQò§Läœ`‘Pµw:dùcÊ@]hž6žÛG±Žâ×R·{Ù­¡eã–6Ž7uî&A<ì$rpxícÅzmÞ«uy§ë‰½¼8ºò$S=Óg÷il 2rì0›¾1n|A¨x‹V¸¹´ÔIÓ–ÊkW¾š³ï èÄ6Öä,tÚÝs€@®:ûUK“öi6Ís·h› *ªƒ/ƒœ*ô&¬ænìÎÔu[ëô.« ¤` li‰Ý#œçh!A=–»ý.Ï øa®ô›¸ªµ°-ÿ/ŽÄî#‘±´óÈaÇ9­áß "ÒÛ]Ö ûL,â;a÷âÉÈvC÷†9àñÇôÑxžy¡´Ú›â“th€mµNqÇàóÔ 3É,–Yðý™i­Æ#"@ŠO,@õ9Ýo;N·C‘•8?ì7ûUKMÓa†ÙS_Ë',Wük^4Ž9K%ŽÒ:aýè´’âîtPÀýÐ{CI5œ—ª2Œ2§æ?ìýê³Ú!¶€œX. ûÿ×Ju¼â4U{r~èÎ*ùé@à·Š{IKã!ú¹Êôfí¾™kh‘I2K™dç 8Àõ§Á)[4A%äÚ~^zö½êgŠXžâHâe!‰äà|Øô4Íx‚¸Ô4m+Ox,õå7p‰ÁfÖrCžÉëÐ0´ÑšÐO&§%ãY»ßkZuÆO:>i Ûäq"c†òy5Õx·JºÕ4„¸³1Ç©Ù:Om)c„ çŽAwÍek^ÓχÚ˜-×Ùæ ¨ó¹•HrO÷[w ñŒcGÂΛûXù££½’øžÏN¸š$6Êo šXTMrQ–0ÀˆðæÜ7ÿtEWKÒ"†MF¶ë’È%Žæ&/::ž&’fÉI9ÜO¨p bOÞøwN½‘´+ñ¾’Fd˜í*ضA fठg8Õ¶µÕ¼;âÝNÇ꺔6ÐÞOöë¦E!%×*Ûƒ„'iÀ[éTs½ÌÍM¹Ò.´™üg«YêKyÑÈVÔ‰3&Í-#e0\©êxçn/lµæÃöŵuw[ÞXZÕ‡.‡b•ÃnŒ‚={Í!ïµß¼:Å“ZÇ£ÃÌ0»¤žl“d,¬s´DÃ|Ç8A)â{I®¼Mdº Ù²Õ¥Ü×r˜÷Áä(#t©‘¹!T‚Ÿîô*2±æ²cÚƯ¨ËowoÜHð2¡@Fœƒr0sž0~^çA 0ó!;Ô2˜ß†^0Apy®KP—Eð΃®Ùj?ÙÒø’ØÝ‘=꼂Bò#¬NÐw¯Ê§¨läòi]­Î«¦E©èQÛèŸf’(Jyå®&|ªªË áU’[ +ؾE%~§¨N8p ¼=·½R¶·Ï)P«œï¨õ¬[]›CHíui±4î‘ÁäHOœÄà£æ g# zÕ‹}Aä†àƒpLËóHNb1ÔúSNærƒ‹³4ûr.Ô á3üûÓ¢X¡˜“öŒŽ€£×=…6H'-Ûœ6〇Ž=H«6ê‘yEä*B®r£®Ö™%x$7WEÀÙ¸•Oüó÷58³‡k2À€íq’¸þ#S—Ø$H‘Ž€ᇧµEæÎÇhRI^ÇŸJyšy…¦»Y°[ÛMš£1Ú§ƒ‘Ø{ÔñîV1Ì‹Ëg÷}ª8<¡c‰Œªý×# ÏA@®%ùC '=èÄÔO¹£’LdrUƨÃóa„(–è„qíZj±}’e‘pQÿ-Hþþ¬öÂ…ãÃ!È þÎ=i˜¶0&íêê§ïS®õŸ~Ô<‹ËƒÜU[¡<-1ÄeZEèGd  cPB&Ü ‡@ô_VÔ¢´µžò[6¸6Ñïd…3aIÀäóIm/rKKò‘ÆÑŽžõ›â›©t_ êz´E#kyþ}¿0 ¯ŒŽ3Ž3CUÚG¨êW÷ â U³ÍË[Û%Åé(Ë ¨qü?3È~b01ÁÉ¥¢Þ®¯³hPËíBòki, 3ÛBæ5¶@P¥ ǯb‰õ ZöæþKV´´:¶žþ]Ð`ò+I ¨ À«žØãGQ ^i>ŽÎþÚÙãQ¾½³¸µ³·-,È·SdT‰@6à »¬âŽšò»6¼9á¥×u GZñIŽîþ;–µ]=Ÿ0@¾MÃHX`HèÃŒæ¹ÿ‹÷­¥iqiúta¢žö=CÈ_—`-+tRÆ,q÷Ëu'£e¨XêZ®©-÷ˆµ-]Bác‹O{t…åÚ¡UÚboˆÈ FQÔqÊ|F ¡Xêú4sÏ©¾£-¬æòuO5"þ­Š…UO4!\’ïÇއ1Éxyn|O®½¸[S Vïsörî¨Ä:7»÷½1Æ^5ô õp>Î!ä`¡WÁ@çÀÊø:D‡U–õn%–Êi¥0>0£h {gpäÀë^‡á{?³Ý¢ÌwI*|éûÿ÷;v¸¶Èßi@6 Ǿ٫V×$ŒÍ8 䎘þtÛ«ye0IJ¢áHeÉãŸZ»ö&žKRÒ¹ùÚÅzþ¥$"er“#:N¨ð‘H×-Êý¦%@þèôö«’[,1ʱ³0æFõ&©¥Ó+˜™•¸ã2ãøÍGvV”­ðJ¸Ø«ëOj¸ Sd‘5À˜’œ0«éõ¬Ë¨ZY܅ݹùgÿoéïSÈÛ$¶@؜˞Œ?€4!³cŠ#1¬2Ó_JÊ¿)4ʾìCü-ê£Ò®H’G%ÇÈÞÆãÎÙ>•”€\]T‚ÙûÀ/ðŸDÞ  »hÓìVÀ¬kµBüÑ/¦; –ãÉXü¥cûÀÙûçûµµ´žA%ÚØÂ±?ÞÿEÄ‚_ß`ÆHù‡¢“Ûë@ ·žE›nóüG÷}Hõ¢›§ù× <Ë#òG¾=ý¨ ý¶Id¶ˆÃ ã1öÇaUç’d³”ùÀ'#“÷‡ÓÖ´.<˜<¹îIQŒ¶GEϵQˆÅr¡Z\®òeÏF>þ€,ˆ"Ô0Ì€¡n }ßÇÖ« xmïHx­1Ù!s ­Þ;0‹ÚK¯D÷Z«=àÙ3´ç;™GÊG^==¨\Z5ËmúŽ7:æš_ÍÓÙ [(ã%ÃzÓ’åOœèÌ|·ÆwŽÃéRÆ×Ú$i3 ú8èOÒ€8Ï%¢x^X[Ë”]K q–“ƒŒàà×/õäÞ ðøÒYŽ›¥Ér±N–æm±²m* cywt9Æß¼x=Œml®ÄvsÉ-â6Bìv4Â5|wÁÎ;×µeßÞjzGŠ':TVïaÊPJ展c’W!Tüйèx}«=äu%ËI>ÿçÿên|;‰:Γâ;‰õÖ‘å´Þ©$W&\3F±(È%‡#%³Š—Å/­‘¦Üx³OÒÆäRßC ɹdHVex”´œž½Ek¿7„ìí.áñ$ÓxÊæÎˆ4WNZ„…8ûùÊõÜÅl*ëZ÷Šm4¯YÛØZ[ÁöÉ!ŠQ(½pà §ìVÃ8ÀÉ(TäÚ9Þæ?æðÕÞi§ÛÜÙÛ;ȦÖêÜ/‘ ¹ÚÆRl®3ó:c#Ì­ü=ÿêê=äk¤’<Ö×=Sìå6oCÕ Ã gì>+ðôÚq^hYÚj—$[Ëm*ú]eP;A,Ãkp¼ÛWÑdÓõI´ëø¾Åb’F¶ÒÙÞ™ã²òv".ÔedùOÈÝÂ**úÞ‘–xrð¦L@¯ô¯@±„L‚veo¾Ù þ,W’çøÓOÑ—^‡P°p™0Älyc2*ïÇ–ØR9ÎO€xνÝïˆ×YÒí.ç{{II%Tí,»NÓÈÜW±>œóG1j…õ¹ÞÝ3ÛÝyÃdhŠÅ™†“ôªÉã žæÖÒhõ+¸mÑ͵¼ˆXƒÇ3Á$g#QžÅ4cÄwº­Åö½kfŸe€Ü'ž²6F÷&LF'¾zb“SÓç¸Õ`±Ð]º?‡<íŸÏ·—¦ÇÖiÑÛ´k{=àVœCT9ÝœÀÛŽ~jé ñÌmâ)es†’Ô0cž®1“ÆT'Žó®œúΡö«´F‘†-÷W'€Zd\ê:ËËo7Ÿ-£ªÝ×ÛÉ;€;yçüð;øz( Y<©7<’š³i¥ÚZˆKˆÇ?1=p+JIa¶³…£0I91±ìÇúP’/’ጲ ‘·¹_Z«%š©šLÍ.º•õoJ™ØI0PÑ Ä.Xà¥5&PÏ—\”ÚwLG?7µ:ÞúÕÒ(ŽØÈ ç3cüõ§Ïgi,jÀÈð_ø¾•JÖ)ÙüýèÊa ‘`}+~ÜG$¬NÁÀl;óé@Ð[¬+ f0ª½OÒ£7±&ôgò”þñ<žÕ­¡gxÂÅ…;8öúÕ&’ßhiUÎ&8èGÊXJlWK$‡ve!‡\ô_¥q$ó¬µH.c·–ûLID—6y‹ßaÆ?ºJôm¸îsßyÚ`,¬Ñ¡ù¾ûüªß[X\ÆŒ¡ôùwëí@Ókb”–“ñ SÓbÄöF/e]¥[~Y#¸ îbÊxؼԳO®øPºk+?WmFh–8®ƒÇ9QWk0Ü»@ÌJެxÈÇ ©iZLí¢ÈÖó+ÛÚœä÷Á<ä÷0aÅoxGÅ)‰îõYÄ—¬‚6gˆÂÖhOÌ¡ 7Ê[È:nÀQ‰ØÖêF߆,îµIõ¶±ªhÑËp,㵉 i!,?x¯à‡’BàƒÏïê‰m/ˆ-,#¸Öõ·,ð‘þé`‹ïȨ¨ª¥à Ä–Àc’KOÇâ½G\ÕæëMWÂ;‹)J™™Iß#Œ;FFFÖç8"µ¯Š¯|7á±2ÔmžK)íÊ‚î@Û`OÈåÇ9È?1Ï Í«49 ¾—¯êzäö’}²æh˜³Š%òÊÇ,»„ž™ Ðt®xx;Uñ/ƒÓXK´0¬‚k0Öä_Ij’EóüÀTew)þœò: KÃÖ~ø}uu­^NöÂż³!QJ9XÎbÇ;›-ÉÁ­Ç©G«I¤øbÔO™%¶Ñ¨e ¹Ž,€I ‚¦mÉä™çwZ—‡]ô­9ÛFû÷Š×7¿$íµ€š,™·…äã•⧆k¸"—U’þßS°É†-×*“¢«¯»;$c‘œ•8œ“]§ŽäÑgðì>ŠÅv ýh‰˜ ª€H襹šÊÑ<7‡|E3xšÂÄK}k Ø<³}¨ŒÈ^?5ãV ‚‡q!xb4kÝÙ‘hÞ/Ó5d6ÖwñM#!`;€¸ÏÓDfuù1&÷þ,wojäfÖ|??‹®®øÛ‘j–ë=²•H¤W}±’ߘ;®2JŽøÆÏصm#G›UÔnmãMòZ!‘ åŽóœ¾2HÎ3Ÿâ%û’éßX› Ây? Ió– {úûÓb°'WŠåB€£ ®ìtÖu¶¦Æ=­é"•¤a”•Î8Áükcí×+,0³æQŒœ=ÅQ‘U¡¾ûS6@<Ч½U±=À’i›37GÝÜ㨫®—³Çæù2 óóļp}›Ú…Šî Àl;ŽèÙñûûP-.ŒqDKFr¼‰aØÔo6ÛæŠ5b§$HæEGsÓL±asor{ý+AT$,.Y×*@þ&>£Ö€dŽy&@å²ùnê¿ZD+,,d†p €¼ÿwÛ&·Š1#J7n9$ñŸJ˜ÈM¹GœHXÄv  Ú›Ô¾$)žõÍø®}&òöËM¾ŽB«¾ø:X2åo}ûåM “ÇÖüß ãE!p6‡=‘O¥`x¨3x¿I–Wû-ͬÌ“ÜF9 ’3ì:úL‘­óL§¤è׺#±ñ>¢Ò[ÌÑÍ*Û%ЈãgFÈÂÆ[åÛóŽÇX-toø²ÂmÊ[û«àðE®'Q¸»È#œ’[$õÏ^SÂSGãÞ%ÄÒ[ÛGp—l-ådk‚‘$j"‘pv‡1`AÆÞ™8ëámÂ>4ŠâÜ^]BÌÛ‚>Ñ}q´ïµ9µ8êhETjîÅ}oÄ ®ÙëounátÈZ(ô˨öI-ı…”àã µOBKžv©¯;ñ¼–“}§ÉqivÖ÷–%ïËl••!;aÙ·‹–Èå5Ükòéšþ«¯ê÷¶7ñdiñ[›'—Í‘¢!rŒÀ4cÈ Þ£)ñuØûiöÓOy*_Í-Ì…žv߈T³¶O͵ˆð1ÓŠ£7ú]²YÍ=Ò›™žÞ!{v…KÛåV?7·¥z/†ÒIn&šXØï•Ž‚@Üò5Î>¦ZéÐ^h×rKåyK"4ÛÕŠ‚¸Ã|ÊFæÀã¯Jí|=ÄpDVùÜòpßSëí@–»®”Gm&OÍ€Öž"¹[¸¿y Q$dãƒïíVa†DE+±ò›€Üt÷>ô m㘹Eå£ °=Ï·½X³•C9ÞÙ3œçiöíP]Öù>ç–ËœœrøUˆgÜÓìÞpá€V#®?Æ©êWì¶%ÚÚbUˆ†z@¦— ¬³³ç§Ñì*K<<;³’Ž3ך«o~Û<¥R¸sÇËš‚îòTŠ|‡ãæùŸØú ½kK¶s mÆI<÷úU%ºw•J "Ë=JƒÜS,/„Gsù_4jz°þï¯Ö¢žñcš@‹õÎz{5iÛÊEÍÂ1'åŒ/e=Ͻ9–Þ{pòùd°ÇΩ µ6r™L“Û†ÁÈcû£×Ú¤m_ÊŠ Ñq!û§wFÏô  ñßX[]ÉE «÷1ý^ΗŒ÷¶(Ä#ÐîûÑ@·©{*²2esÔJlv³%³6ÑÌ^)2dbÐ{ökny&’ñ:á6–=¾‚¨Ij¯’Fl;s=\PöLŠù;²ø‡¥g[Ü¡Œ³,¸u/þ³Ý¾µy“lQ ±±Ž2§¿¸÷ªWN‘Ø/ÙâçÊÛÆÑü>Æ€&–n/Qrs!ošOQþåKdíÎU†7P{­"Gö‹‰ƒ#‚ÀulôëëL±£J "€ä|Ò‘é@‹ô½>ÿR²—TŠ)ä¹¹ŽÙH 8“s°î$6HÇGcš:V“}qqö{¥–‹¨ÜÝ*Nò¼ó¬^\*î¡í€ÅÀàfœš.±$·²M;³ë^dS8Ú‘I •˜ÇÈmÄJ¤’G_Ç{DñΟg§j?Ù÷:N›muiis`E)ó#X²ÙùT*º³6ŒäÖks®vQ±×kÞðf˜šÖœ¦;Û ïºw¹RòK’IåÆFAŒÐN¯#¼–z£nÅ'—;ˆ95LjáÕt¤†¡¥ÞE=ÊÏ} ·â+©“€ï†8òOÍÈ^0Nk–ñ5µ¦ŸñTÓ4èHÓ-.Á(>f…C×<ƒïZÒh>½‡UÕL÷+¨-îØ-¡ýÜlK£GÎÍœ‘Ó¦x¤Rv;ãâ=#ÆÓiºLO1ÎwKûS÷(2ÈìÇbñœ‚Ä–¦ñ&…o§kUׇa¹·§kYmlJ£I íå‰2‰‚ˆIqOJò—Œê`[j ,j®ÊÒ±ˆÀvTÚÄ/º ?YÖ¼&Ë©[mÔa·¶0–i êу“µ¸’2xêxáF&ÆŽw:Í;Á3ÞøÀ¤ÓÝiImç¼âõ®.nÀ;yýÚíÊ“ò·Þ\µ¯¢&§£Í®év:=Ö´©qÍümrI¸Ì]Óæ@HùAYp»..o<[}§®†R !>uÅÔÈ\Z|¥LL¡°ÎI ¨#rNvÖ߇5xôÏMkxV-JÅÝ/É—d‡æ2†=Cƒ¼z á¦&Ú0¢´]_ÇA¬Øßh7Ç6(— ­7Î|ú6em¿'ÊsÃŒs\½çÃÍMõN}ánÒ"ÎnÚÚo7't[m_” àô8ô¹4Ë vÖMC^Exœ‰¬áLR[ÆùÎÓ¸HÞ ‚î—ÒuCC°N…|í*{£k¤ê@ ¼gl¸<ñ¬>þ;pH4ÓÑžokis9ÀÔ&ž/5%š)Äm(r_|y9Fxõ®Â-ëTÔLïr<÷UVxÆÒæ:þ9­_麓§ÊmÞÔkl|ϵ² ’yIÜÂB1ò`T|ÜmÈ]ý…ûÛ]G][HÐÜ"–!\`àŒŽrpE4Ìç2ÍŸ†R$,e™Xî “µ³ihc‘w¹.ñõ5¯’û¢äå¨úûÕÅ[ 1`ê~h—û£üi>é˜ØnH#%@9W£ ϼ‰äµ…dŽ>BsÙ¿Ù>µ4¶ò8C#í#"¨îžÞõŸ©%Ì7‘#IrU·/TŸìÐ̳@ ‰V.2B^¼z ¯msE9ó üÌAyöÇõ4Ö¶ŠiŒó’#Œí,§¾{ %…­mœ@ħïÏô  R bŠ8ã»B;ý*:”7€ý›*ÇÊtéI óKª± ×ŒŽ™?ÖŸq ±À$ó¤,£¡RßÓÞ€ ®dMÁí›y•‰Ú ö¦Ù¤FÊ6’#bK8ôcØûÕ‡±–xЗ9ämê¿îÕ(ìöBEÁÌ}ý¨ú”3‰$’)Á_4¨?tZ’æ8Û ePÞbÿ3QëRFì›&BÍÏOùæ=êʱ–H‹©ÆÖ?4£ûÙý¨ Úl|ÀY|‘Ù\ú±õ®wÄ>¶»†àE œ®TçAÈã#èq]uíâG”‹©áǦ}jk² Î¥%ÚùÎ#¿§Ö€<šË\×¼nÖV‰¶FQ±J¢åHQG,Ó•wpp u³ø»Âú—€'²ˆ[[Ci;)2CÐó¼ü™Èù‡SŽj}WF‡R1"îå›!£À⸭wÁŽ%eDÙ–<“œuÏ_æ;JÆŠWÜô-_H¿Ð-t‹ÛÉ›ZÓ4ÄYntû–_5X<Åsþ³i„rz}î u¬]øãÄ:]†žï¥Ëm³Pó/í^96ítan™ä>PsŠà4ÿk"éÉ®«êÚu  ,Nÿ;m÷Û‚B¿ÿvè·Úž™ã›½ÖÙñp—-rÒÆÆ9­QæÁråž%=˜6ATL¾RðÅò\zŸZæ¼k5Å¿„ï6žy¿w F2Kír:}3žØÏjMÙóI#Ïôû&óLž«HÚáb´²°Šê܉ I"©™CŒK€ãƒýêï4ï[i^þÊŽÞy£±œé°Ì–ò‹v]þZ˜/–0 «I'žå%µ»7Ó =m~ƺt*Áž?8¢Ç9#¸É®(zðk¤Ô|Sáˆ~Ýè¦}:Õ ¶{i4Ö¹RêËÃËdä†ïzæ¦'E]˺ï‚bÐ|4×_Ú³Goû‹Ë1+Ek Ã1DØCƽ°¤ŽäMejªZi¶¾¶Ò¢ðÝÙ»·žX`IP˜œJ®Ö Ä, É­lê¾¹]ÐÝx‡SÔž%†V¶Û˜®J2³ÇòÄçÎìüÜ’¯5ñ‹[U×õ;Í7d±O$ñ$­!QرGÆ8ŽVÇ}ýGJ³˜ä짆ëÄsÝÏs¾}FxÚG™€góg Ǡɽ…vºmŒšä­y绉ZfR›Œqž„w5Ëé"{+8ÚgÛ »žÞè¤DIº5(æ6R<Ïsí^àÈ€QˆÑW‚¤¨Ézs@2êx‹;E7¸Ç¹÷•Ÿ¨ø2Ô¡UHÁ*I,„­z0»ŒK$E¢û¹ÂžK{Ôr¬r;cŸ,ðÙ=p=}¨çVÚ߃îeºÒäIcœ:ÚGm’zUl nÝqŠ—N k»Ôµ»;IuI£½kÅu¼˜?*ûˆÝÚy뜚î.-Äž_›doê±g¦}½ë”Öt{ õ5Å´¶ß y^$RÊØ#9û»}À5,Ö›»³&Š}vÿš6±¬Éúœš„´ïj2¥õÍÝ„Bíe˜E YÉÝó(aü}±€¨¶¡¦ê·:uìvj™ß¨Aql% 8!ž>]cÈ#ºÃ»$äWuâÝÃ:,{i^ÓÒêFÅb–‘,Îßi#{mÁ 2ä·$œž'ñ¬ž Ô´Q Æk¥YÉ*«ÝËr%’ä£lU+á2Ù;AÎ8%F‚2fG‡„úÔ -or…e_Ÿ#h'°Ä?Ù  0ƒf.îƒðÃ<©“Þ±ƒu$ퟥPªÉ™™B!Ÿop; ¶V8|Å"Øä唇×#û´«Â7–öç¨öãTõ…]vº’ü†¤†IC”i#—îŽBûš“S¸Xá„É:çk·÷O¥fE4q\ʳÃn¡°Ù-ŽÀz{Ö¼̨©$ì^›[øN{UKŒ\FÒFÎ2¤wí_¥VÝ!ÔB>ö\0ÁÛéï@ ¹³ò$™—æýʵTvÇjÕ‘ ƒÍé*Uƒ¸÷¬xãƒcò9l(==…l *«ó*„= =1ïí@bŒ€$c1ØIûèzíO½¶IÕC[ÈÀ”$•ÝÓÚ¥¹ŠV²".‰Ñ3þ5U„á  o0¨/ðŸjÿð­¥Ì ÞR+àg-ƒÉ>ÕxWVƒSÑž5kb@„±Û*½ôÛ¿8Í{ kvi8_|®ÃÞ¡¿ÐÒxÄKã# ÓJ›G5ðÿÅ6W3êú†¨mì/B¾T“mŽ sÏÊ[h>üàcîzn›ýÖ¡­i¾Õâ²Ó–5º´[»*#I¸BK( ¹ò€,l𗇔ò\­²–hÊ|àd‚GF*r ärC ׉5t¶·¸¼uÔ>dzeûF¥îd\ü²ŽB†Pxæ*O/CX®dtúo4@·ÒtË?³êʶ÷£."Ÿa2IŒ`¹{Àõâµ ðF‘h×:†¹W—wŒfš0¬Âôd+ åØ8' åu kD±øt|=¥[Í=íÚyg'7|Œ´‡ 1‡Íœd®"º«wK›MÔ¥<‰i ¦¤ï;HXc÷31g‰br0;b­ëZ­‡ŒšÓÃÚ}ÐKÙ¦¶å)5ªÆCù¡X8ÆFI=1¸ ÿ[h·Öž 7—z…Í t™ï&óBø è VSÏÊT°ä‘TŒ§½Ï1ñÖ¯yªI¨$kØß[Y\ArÙ1Éh "0?Îcq·ÌäþàÛ ‘â{£lo!Žá¬L¡ü¦q÷ŠŒ|¹ëÛ××k·qjžºœÜÍú3ÝÍåàï’îé$DmÀà 'ŒØó—á+ý7O·Ó\ÝG¼_O4ªeEDˆ2:ó¨¦OC°ðŽéìfŽ$ñ«È½–É#ãšìdÙÕמ‘uVööÁî+™ð…ËKq%ÈŠDF.ꊽ>lú{šì߈[sBÄ–ˆúj?N·†`Xiˆ?¸¾•bhŠ,)ö£åÏ=sê*r“,QÇÁílíTPÉ4¥^yV=—±>Æ€!”¬ñ[±Õã?wÐÕ¸íüèw›ÍÁ#ˆý÷ö¬â ~R…S»á½µ[·šã …6l<«òHþíEtöðÜÀ«$­¶A¡»’{7½GbI[ 8Vˆç;½‡¿¥:f¹c)h¥| Ÿ]ÄwúSn#˜C¹abFËêsüèôαIó@í•SÂ7§ÓÚ¡—RE7m°êGÌŸSPÎóù„ý’EŒï_îÿ½ïNŽÉƒN¦]¡€8ì€K«¹£Þ¦5úy ýï¥VY'f” 9Eù#=™½¾•<ÞdÊ;ÏúÓ!þñÿSÇnVmÍ)¾|ÞÔÛ;K‘>dœú¡ÖŠÙ¶@Ð)W‹§ÿ¯EfL1À!|·\'£ö=é qK’*Y—–€xç¨<‰å\ïb¦6b>R½þ÷­W`d‹Ä-›BÆ€-Go²0ÑHs€ßêÎ;ç¡§D×?ÚL¯2•ò“þYØžõ˜·¬>ZÊ7q°{cµhE{´£4¨®W#ý“è(ÉrÍxW§?7°>µÉüAñ+h~\ª½ÝÄbEs•˜ 1lå‡ÔŠé„¬ò)7Øvæ-ì+ϼc{%¾©vÖš:\Ü‹òO”yçkÎáÉÎ1ÅL¶5¢½ëö ¬¬µÝU÷‰Ä'J¶Œ¡’ßÌIoAHÈÚ§ dŒŽÎÃXµð¾ƒ}á[m1¯n´Õmö–°ys]Þcÿ,§ [«¨<æá»írÇV¼[Ù´{Ý>âÚÞ&7l “§šªJ‘¹ÁÊœÌWO¥xšËIÓgÓm4{–Õãkû{@nf‘Š“çȆfSÈgŠ":®îæm¯ÃÛ[_ ÛßÝ]\^$l·_a‚íͰ³˜® ˜VÊ’pJ¨ùT‘^o¯êÞ’ïÄ6Úh…mMß•cœchòÑpã_yÉë“ë^‡g¬ø‹Nðv¡5¿‡o&ÓÞK‹K«fTˆ®ölÄ•R0»Fà§ ÊbÃnª9ÏÕlã³Õ¦ÓÀw½7‹$Q«³º€¬® žHI¼ž»A<× x>ôÉ 5ÊÒ|±^GùñÊÇE¼†æÂúâ:_:d••öºîÈ‘åç%‡BNqô+›¨¯°1)V•S0 OgñöÍz£Ô¯'†kmñ•RÙÎЧ‚­ØZ*Ås#O‘Ûÿ¯Y2,ÇHÀšQˆ“¨Î~µrÞy ’ÙXÇ)gsù÷ö¦A|J·2‘–ÚvœÓµ-Å¿ïNôSæû»ÏZ¡l“„“ƃ sØ _ô«q;wx?o÷¨ ©<”™ÄªAeßî¥fÍv×$h±ÙÉßž¹?Ý÷­0Í:”xœ7'ðCìk6cŠI_É‘NHýÚ°þÿJŽÿV°Ó/•n®Ì-"³¨ Äa ä’ÈëëOÔ5[±Ú¼0lË»6ÇllÛp:žÝN+V½ò¼E<Ëaqyœ*¥ÖRæÞBîOî³Ô®ÎG=8ÁÍrúµÕߊn¥†Êéñka5ûM1:!)†^‡{/ ýÞ¢£™óXêTaìù›Ôèïþ!øv8e€kSDË,ˆTÙH„tå:óÒº8î%aeuy±ûÖ__e÷¯ñÕ¾™âíbÞ"×{´G˸•¦$c;·9$·¦Iôãßéš”×75»C ´LÑã‘‘Ó§5IÜÂqQ:ë[{’âIí"a¼ ¢ç¹ÿf¬Å(ÖÄ-P=|S!vxU  d†QÙ€íO³ÒËLò0‡aÜÚ}séL‚Í­ÈÛfÜü¨3óOfª¦lý‡ª²m$ncè=i.OÙ¼ÆóW Œ>ÞÞôì/œ sŒË`ª÷—ÔPvÓ] pÁ%[ïdò3Žõ2_]ù¯¶ë´°¨ÇsOó"{Y"ÙoÀÈ ®zý*;Ôòà ²6GŸc¬x›HŒè!ÐßhðIº`NÈøÇ˜ ð~c8Øî´«8šÚÊHìeûA,QŸ5⻆E’#ê噜ƒŒŸLž= øø³PþÏ×nl´Øa³c¤Ý\2ÁÖ4 V_› AQÁ' aEèkZ-; ÕTÚ² W•AÂÂøÿVîr7ð1¼·ËW^Ö»¦é6> ²{¨R CÊ1ÛÚ6~B¬0 ?wjäe‚’ Å_×<moo%ííÞ§ª[„'Q·ÒÂ…OWHâeQ€NTƒ•w}ë9^§Šj³O¨xMÖÂx´ÿ:'ˆ¼¤1M¼Fn0Û¶xÁ¦ZOjÉca{¦(kks ËÁW”ãknãlØU)n!ŸG²Ó´ö”C<¼•Î!ÜIP÷‡<æ»/Þ[Iq¥iXÁn,`o:£Ø¦Vm»€9êp䟛“š`Η–- ¢(bW<ƒëé]d£c) Ç÷l0Ó}ÜÖG‡ QBU•\ñaZËopÒG¸ºÇLõzÐ#NÖò%u,,G è=ê¬Ïoöw•s»c·Ö©±“t ö§y' õ÷ö¨<ÄĦGÌn¹gã<Т¥m’8 ;¿½êªHímq¸#1ò?¼½íSÅ4<}¢hؤä÷÷¨çÛç0¶…9û€žÍéþõZ ÷ù_e€îÇñŸï7×Ö©iÚ\¬÷¢ ‰6·²úÕ´ºxp¦YV,¢K¹›€[œ ޏ8ô®Î;ÿ êVm{â ûå™< éÂG7o”·Ì!rÄàã˜be$©Ñ•DÚ;‰ÀFUŽRr:2àúûSlÚé®ωUv¦ ¸Ï­yíBH$m:öæÖâÊ9'w6Tn*ij(‚zz×!à½sUŸ]7—z¦¤ð[¡âk¦dg”·0ÝP¬›Y_ žÌ?Š€*¸¸ž&EeïÁô÷©0›7*Hz’¨?½ŽÆ¤³žtÅ"¾W¡Ø?Ùþé÷ª·D´Ò–F!ÇÍ‘Îïs@ÞA ®r¡Î6ö>•æZµþ¡g§ÝHö°ßÇ})º76²"ÚÛÈ [¨~R%ºe‰=ýíÐÄÑ*.<¬ÿOOjóBš…—ƒUÞ{[Áy¥¾™m)ŽTp 2Ìp Í÷p=¹‰v:('«;ß i¾%ºÐeÔÆ«¦YÿkMö¶†K'hˆE@ ‰PdÆA^Gµ.™¯Zx[Ákook¿ÄSJÑ]À‹¹å¹峓Ð&â¸'å Ê=ª:\øJãWÒ<™¡¿¹–î PLçkÆÝ72åö·¿QÈ74-oÃhï¦èz%æ¢÷;…õ³ÂZåÛ¡ûA#žŸ;ØqM͘Þ'·Õ< ¢¶ÔU¯õ kÛÛÛ_ùwG ¹šÕ0\Fê@<,Õm´«ß¥ž;ÝÛÆ"_8^<»öDíû ¼p6€=+²Õï5]_QÓÖöÖhm®­íà³’êáWƒÍÝ.àŒß6®ä$üÙ®ÚmÇŒüs«ÞÅ:G´’¼¥ ¬ø\] ÷ÿ ¢¢<É.,VK¿´,–6â&u Qy%N8î9ã§ã^¢ÙÄÙâÁÉ ÁìÕç«£C¥ë¿d³’Sn<ŒîY°  gÙükÐìÁ[X’»ÆL¬£·£P!×Q[øÞIr ŸâçÔTì¶R#!MÅ[zØŽÿZmÄQ,¥C€TÏPÝJú“éNq/—)À3DG̽ÍMra´YçŽ8PlÈÄjˆú}j5¹ŽãRO’Py9ÞíU˜®#ò<¿³6çÂðÀûúÓÑ¥*%*cù»çרûPâý>òißÙšŒv-sg<@ªüÌAVd 3³+Îì6 +D¿^;vÐ4Óý¥¢Ò[`CDb@Ç)Š6Üq×ËWQâøžñ4íF7ÃØ],Œð)i¶*ÁêNáß§©N9tíWÅ~V‡pmµ)M¼V’Z±Ž[r¤¬€®È"Pv0çaü#iJÒ¥s¸1j>ñ®½«“©Å| ¬«kl]ìäff_((ÜêßuŽ2HSÀàC®êv¿ã_ ­Å¾§k¸háíîì[ ¸ŒJUÍ"Ç…œwä KzÚ7ŒLÞ'¾…’F’Âè‘´$.¿Àá Žië…Au¦xÿP»ÒîueešÆVhn§*CïØü¢p0㜠¸©òÑœ×ÅM/HðÖœ×zz]=Ád–;›éfgI ¸hÌŽÅJ¼h È,85ÀÁ í•òKq;S¤ß¾ãkªƒŽNò—ŽKk»»+È® –Ük ˆ¬`‚b €Ä´uÆ#Ö†8ìÑë:5Ý­Íš‰1$ ª/JßHíî‘YWqÝW=3é\W…5X¡„¢ÍÜݰ+¨Šö?>dFÜ À‹Žæ™®.ZÞ<¢ 7¸ô¬³LêÈ€ø<¡îjœQÅq+ÀÀg oþµH#8£-¿ÄHô q!ˆÜÀvoñªM夡eXðä«_z|¢qn™]ønpÀÿÿ UZdýÔɱÈ_@¿á@}±ukW’}¦}$O–Î9Œ¼ò”3|¿|aWåb:“ÏC‡§½.¡«ézÓîÌv$œÀ“LAØ«U2Ä„äsÆjWÐ-$Ÿ_¾Ž=æÎxî>Ïspíï°³‡BJà‚¸8à¨ãtR×¶¡—v°éèúÝÝ ©‘o$ž%ÁÈV) ^0FAÅgNÚ‰ÃNÆŠÚN¡©-κêÍ„¬’–¨X©q»>ø>•rÚÎ;!£¿Û–å®G"/wåAÛø>+3ÄÚŠÙxÊöêò5¶ºùvyCŸdcódqÆx­›]-,¯tÛ©?:÷Ì•2(Â`ppOrGSëŒÕ£’Lô‹%Ž$R«;‡;'5$óÜÇb?p㎡ËW4ÕIçÓàx¦ƒ„2~é÷­´hbÃí$€8ôÉ3Ê ­egb7cïC»ÐSäv(…HÆÝ¤ù`z„J­<Î4Þg‘X`|‡ýµ5¬ÒMÂ%Îà»Oï“÷>” ‡1G0V%TÂ?»ô©¯–ÚHHpm­±Ä²}(*b9JºúÕ…RÎÁÑ>Yãݽ¨”Ö’+·ÌûpHù?¼¾ÀT:¼–Ðx?T3¼˜6r© —o­Owu¶1)óˆùôú{Ö^±e¿áé¬å¿¿†yD‹ÕÞ¾ŒLm…ü:ãŸU'diJ<ÓHåg±Ó´{-=ZÎËxf{™š(Ë\ÐH[w9-æ2¶àGAÀÚ3ÒK¤x’ó@ûv¦îtDq,šG›æÝÉfb9l S’FFþÕ̉JßjÐÝÉ{¨.Ë{¹!R-£k†3nØ«µJ&rF>NOA]–›¡k¾$ð}Åå–»5Šê‹;ZÚËhã‚BÞ_# R’@ÝÀìf&µš½ëíwEñ_‡§µµ-ŠäÈ<© \nGØØd#† €8È5âšÆ¿,:”wzãï}B–&“êÎì³';7Ì£û»sÒ·~#ëÐ_Ý 2K ,ÖÊÜØÂŽ0èåTÈù^J"•Q޹êyº÷ZƵ-Ô“\^Þ\6æÜ ³vÀ Àè;Uœèîl^ò;;­GHÓ™,úɶypHw`VÎËŸsÓ¯ƒbfÓX¾C†9,W“ŒÿZæšúX¼?§è«‹hÕ_̹O,îLnUSómÞTÃ×€ì|/[\KÂýâ›°ô×3˜b $„|£îz…Kq©ùIJ³©ÿTßíwÍE©ÇnÑ… &JvF^¥G¡¢]ÑŠ»EÎõÎèè}цê% #K ôf õúÒØß‰™Xs÷À9lp}þ•Û@DŠ—!¢È“ì*µÓ%—†ï.-îq4Óº•\À>'Ÿc@Ò»±çZÏŠlšâô=>Q(K««ˆ„¼à6]¹)¼ŽNct^&ð´þ𨻷Õåš÷û>áZ 2Ñ<“mi XåKH È=8'5ÏÊuoÅsa.žú’YÇ>ÉàÙ—¸¹U(®¹#÷ƒå‚€ÕÜê–ÃBÒu©u»Ín(EuöYL"•S‚¬¨§Žw1¨Ï\ÔDéªÞƦ³âm1tH´K=+X¹7ý’ÚÕô»ˆ ¤/^DERY³ž6“Ú²üAuâÄð\Vž Ѧx O·ÝY^DÒyÃ!RS.ü)Û‘ó1…OâoY^Ác=ѳ’˜.!þг–.K¨c‡Û»)#p=ºŒ×ñŠçŽò X–ÖÑßÂ.nÒã÷YHÌêà ’Q>^G#žplæ<,_Ü­ò\ÈIÚö[i8 ƒ²¯§M¸ÿ'¾’ãW»óâQt׉@ß»T!»Äþ™Åpñ§pÂv€ÝÊ!g 4³1ÆFp #·Ò»ýã–â5wó¤K™™ÝShbd8 Ä{Ÿ­÷=Î+‘h)"@TðCgIÔÉ9I¤‹<‘ž:H}ý OgåýB“ÀÊõãÜzÔˆùxYŠ àîQê¿íT0Ý£UtÇï ëŸz³{k…¼Y.OäM|<“>ÛGï9ã?ãU®‰@ùdÇN½í@Ï)µó¤/• ‡¶¥Xžêß âÙÜñË.;O¥Htèî`cæ¼›Ô?ÞÝè}}©ÓCÑ’ þ¤·/ ö  {‰u-JÛÉÓní­JɇgƒÎB·”ç,sØ×­èóÿjéöúÕô—öSL±Mk¦@ÐÊünßrŒBíl*ÔòÇ{ªßÞÚê7w¶2ýšÚÊ&ùUßtÉz)#‘´Š‹I¸MÔ¬í+w2ç;4ww £ºt!U£Náµ”¹ã6>Vˆ–æpÔßÁÞ#¼´’ÝõKmEVK•uÄk´”…Ð|Î>ñßÉ9qž:iïüCÞ±o.˜<èmó#…›aRDŽ9   €¤6FpÑî´[_ ëšFµlš†±"¶ŠùΑºðñÇÀÚS"}Ölö¨ÛKÐþ&E³­¤SØÂ¯6°»#§ ·œà†È |œc©É „O>ðÛý‹T}:G`Œ8Üœm?•wö¸6PMûÖú®OäWœê:TñLÖúUÍÅý´*¹—ÉV ‘¹ œ3€zŽ / hYD¦Q9§µRÜéÒXÖC¬y,z£ßÔÖS^*\F­vŒ\‘ñ/¡«¶„Òi±È26žÿ_jîÝ¥µ2Æ0Gð±õ_U¦I„¼ª©pÒc%Áì}éoÞ7Ò'…ØÚâ/!n€cgŒ÷Ë {â…h.'ó<Ù£)½þøìíYÞ!ˆ6“%™z'ŒCä£îfÈ'ƒ§SÀêqÖ“vEÓ4’8ÛÑbºÞš‘ÿhÁuul’ά©(3â+´à6TA·Lr&Ò,õ/]jV—šyœÝ®£yq¶îòD©°ãÌoã¦Ò¤g‚ };Lš ]cTÕîæ½³Õ!3[Ä@Á4k–ÀË–HÁÉîr"º6êù¯láЭ£ŸU‹RÔŒÂY6D¶Íu6DŒ7*•à’æ3QŠí·sŒñ/†u˜¾ÞÕ^]eÅôAU@RÊIŒ÷Åmùž]®ÿ23• ‚ÃÔ}k6óXoµJž|+—×°ÿf MRní4¤$pÅðª0G|U}O]´ûu­¤+4³ÈI`äWænƒ8;G¾áÍ&Ò*0”¶Fw‰oãÒ4oµÉwN~D‚<‡œã¹ýsÅrâ[÷“ØZ\E}ý§R–è5µ´Fv2È• Ð…'¿BAÙMF=3Ä7Z¥òÜêPB€­éPÃO_»‚Ú äß{³ÆMK‡®~%_ý²ídÓ4ëY fa<Ø*|½¤cf@?:ú`“Q~c¥GÙ-¤_ XÚkzº_^¡»¼µµ˜@ä+ Ý?Êóœmb9Á~jÝ÷Šï<%£jedÓçÓôûókia22ÎÊbŽR†áµ|Ò+…Pz ¯®i÷>û8Éš^©rÒMªIh.n÷mùPÃŒ*APùGSä:Ö«eq©³i0ÜAhv£,Ó4’Ü*‘—“' NÐ0 `*Ñ„™½ãŸÚ\¼ºeœ¢öæYV{ûñËM8*GÜF›ˆ©9Ï©ÐøyuácªjRX¬y+Ó³1Íó2"’z`Þ›”ô•–—¾»×ç•>Ò±™lÕcϘ#Ĩú û×M¬ib¼³ðݦ ÷qÚ¸’è¬A¤<ò2IlÇœ8ôfl½‘Ö5(Âɾ8ã,dÎ7³œ±àã’¹>ä×om¥µ…œÁT3:©@ßÂ=Z³t]+ìvÆU—k9Á>yC[®I 4Œw·æ#¶Ù âÞáB ,@wö&¡›P”jŸg 7Ìd û{Óç¾ÅÔQ­ÂŒî=O·¿½B±ßC‰ `UÛ— ÿ¦}(ò²'",Å#ô®{Ä7’ÛxNùQ ’e”:‰ËÈy„61ÁŽzÔ{»˜ŒbÀ f<;×ýßzÆÕôh|Dá%Ô%¶±d>t0¶rÊe8,8îÃÚ¦[Ðþ"9‰»bÉç^>©;Û?òyLÀ`W0®qŽ:ŽÝúOˆtß Ûj:ªÀúeµÈºŸB‰Ë¹bÛwî!¶œ›pB•ÎÌêBÚÃ_¾“ìw×–öém=܉܈ãTºfÉ\ª)aÁÚ8Î8&»oìÿ·…4¸/t¨^Ú%ípC¨âîX€ÆÜ4a¶€ç9çQ.³ÖÅŸøÚ=SB¹k-2æÿJ’.y P"*à. µJå°ÛIÀœG—ø‡WÕm ¸“XÓî"½Š{Ÿ´ÈLn ÃÅ’>Wbq2q€N;{\~,ÐuÏMÜÛ¼sÙܯ’Ѧ ÀýÕà®ì÷ì|WZðÚÝé7rjO}¨i¢áL6ï; BoESÏ”` p>aÔf¨Æ*ìƒáÿƒÞóÿÛ7oªNÅ#†ª9oá_™ÇóÔbºجR´2NÉa˧éô®/IÕu«è‚)[N• ŕɷxÄjX+¼ ©ßž3‚Àæ½ÃÐ][YFñƒüDŸ_jbiÜí bJB€îŸOjŒÙ£BÈÀ݇ñ'¥:9 Bù< ²ãÒ§ººq§áFÓ¼gk¯÷”w£’Í è¡Ÿ–ᔟ__¥5˜ y ØKÂã×ÛÞ›io"È_ka•›¨n¥½ýëp[¬hªÑ+mà ¤tÔ•jít¨¶åÓ0‘œ:~ÜÓYés]^Ü!·†'g%Oy'XžZ² Uf‚%Ø0KÌ{dwÕNâ!uáë˜þÉÿ9ýÒÈÍ\ûŽÇƒÐðM&ìTbäì6Ó5{F}KTµSjÅodmت…Ë}Ü“o— q‘ÎÄRÿÂ%§ëšòÛ]]:Ü”¹BÎ-®J³ìPä…RÌÑåBòƒ9ßÁòx‹ÄzFŠˆ¤¿ Ât1¬jòà‘‡1€(~ƒ[Åþ¶Ñí5=F{íR}1 žãË2¨T¹;¤\áAdf8äðH‚vÄV‡Uy^G›¥íÄöW—–—1aœ#ZÌ:„U‰rÃÕPãž0iIm:Ä|‹¯´ÈfyUDq¿Ê~R8é“ÉÏ«3ÎŽæçIÒí`ݳˋÌÜP̸Ë.@àïvÉ w=æ¾Ú~¡>g¥"Áb–ï"D§iœ`ÿ´ °=óœÖˆä}އÃB¬ž9w?åéǵu|ãz” ¤›¿½ê+C±{K9`Â8)šRÃï8éùV­´æ)nVCj›€‰þ*\´¶Žò òˆÚ:?‘¢¡}elÝbK»xÆÌónÄQ@ê¹,6ÇNí˜÷#Ú³RÞ) ´‘©ÁFù”·PjºÎ²ÞÈ7]íûÃsqÁZyãŠèEå»sýð:dûPUï‹´¯ \Egsaw1|06é‘ó(䌜¯AÉížqRo[éwÁì —øÜÚÛIæX¹,ìÀc vþ#ÀÍaxûÄ–jµvò/dÓ’[yæ)$s‡M­“Œ”lŽûW®*•çˆ|7&˜Ú&ƒzÖvÒ÷7oiq+Ü7u8‰aÌHÀé׈mÜèŒaË®æß‹µ{ ‹{{{IL—ÖÍ·¸µ $¶îÇj6åå%”G9ž#Ð4o XjövºÕìzݤv­Ýa2[G*6ÙLˆ¹ÃÇÌ =2ËÔ|h@}M²´È Úµ¥ÄdV ¤!FÉA÷üëwPøacâ­?Y²°.æÓ¦†èÝC5®Öf€.amÛv·û<“‘žD‡RIìoxVk©¤Ö®eó#ËŽÀäpj›xê8¼U§Ë}a­¤:dñÂ,[C¼;@Ú?t@ãy™¤BÄ~w†µhô‰Râæ/!'Y­m¦¸ÝÉWR‘‚W'‚b1UµŠF+[\éú¶õn ´ò² c!d*ÝCTÕH~$ØÚC5Ìi®¡(ÜÒÚÊÚ0HŽ<ùˆ x‹r2óŸÝ5Ư3½Ó_4¶Ð¿žÄrw9@àzRrNII²ÜaÐ÷Ë}~ÛQ‚ÒöÖÞe†æ5¹A!P@dgçšK[“,qnˆ«SÕ½qýÚòÍW»·Ñtøœ–Ûi÷Ÿ+.8ê¤m#±¯EÐç•åƒe²`¢Œ$ö>µg9±h̲>ÔEfãæ$ÿÖ ÌM#Ãóg9Èêõ¦É¨È6d+ü`½õ¤ŠäÍlF×;d˜Ëïí@ ¶†x¢|Äx1èO­TÖ-"Ûæ.Ã,,&„ˆaÎ;`‘ßר¡jè–JZ0ªÿ=@ô¨¯Ö'Cå/?(æ6õúŠ›NèáünšÖ·­iyh“„»½´œÍ b®¨AÆÖ(»Ï?w[#¥†ßS·ñ.¯máU³“N¹H缊YÌ ä2Œ#~YB³ dFîy]cD¿†èjú5ñ²¾U(þZ¡#pAVÜ3ò¯×h "Mâ4:ZêÚ™3Ü´+Ú–’I¾fWTU~;v *ðÍ€*v5º’¹èþ ¾·»ðüz”ÿ»½réx¯À·’?•ãç G» ÍgjÞµÖ§¹×,îåÑ.'£’â »SÀ2¡í´ã# Ï`gÌ?¶4»­îþs§Ûj×7-x%MEbš97îd‚M‚…PA,c“Ç¡Â×RðÜW ¤jvׯ|É4ùÚÞÕœ&F8Á!²½8feQ¯XøbÞãCÔtq¦Ç M4Ò 3ÛN‡ ±|KGφ'Ž{àéò]Úør}gO¸ß,lòϦ»{h±•L°Îà£q ×<z |Iá›òÞÚþßQŽXÈ»•æBnc¸p(ècÍÃâ ^J]jXÂ[îé3|¨ÀFóÃ2䌯Cœ‰zlm¥¤}?ÄQ^Cg¦Ëg©Ä÷ì‚k>Xâ‘¶–Ú€Ú½0§š½uâÍ獵~mçŠ0Å~Ç!r © ÐôÎ+ŸñGŒ<5©j:JßKåŒ7¬òE%“Ë_"US÷9b¼sÐpHâu+­ ø:UŽRâúw•-­‚Æaô]£îí] þ=sEØ:pî{½å…õ´wP]¡†â%hØ¥•ÂpyVŽõýCÃcI¿±î,ÎׄI¸· 8Î-Éd/Ðòþñ4‰oo „`ªˆ»TʨÎ1‘ÇlŠôk{Å»±I  ä³{z¨ªz˜Åò»œ…%Ñ|S¬ßE{¨[ÛiSÅr,%+]Ëå¨+“à Ú7Ib9ãïuWÚtZ4ááXôÍ1µ gŠx¤Qó#…Qóº–aÉ Ôc5ç(ðúÂ$“MŠ89!„j ‘î™Áè1Ó§áXêz¦˜m¼sÛ¤&Ü­Ú›˜R6ÙèÃ(?v˜ÁÀÇÒØ¹>mOfÓmÏ_Ö¯u]¯N—³ÊgPÁ,ˆ]ÝcçÌÄ ä çuýBÓÆ:Þ tÝBÎÜC"™–6ÔAÃù[O;6îÄœãvTã5SÃGE;ê7]ù—Y š`ðC(P2«’¸ «´±$(Ç"¨ÃâÝ/T³ñ‰kyn/$Ý]ØI"$†!"6ÆÐŠzrP5î•o.¬î&Òmtm^8"g-¿_%ì Œ:‰x €ÀÎXç’:×Cq-ö•ªéîž,³š;¥‘]®aO ¸ P)+‘¿øŽp* Áׇ¬lm´Û‹;žÙíô»‰oæxXó €cæDsžNÓÜŠ~’‘]xïT»²ðœÒ}’Í HmŸ2îò$ÏãPvàüØÅM}¢{êI/ü$’ø–ÖÊãX‚ÆÆâÙÊý‰Éd#™>\«Ÿ›îö¨4ËÍz-ÞæÚÊæHet–{›ÆGvV+« UÈ“ÅX›OÑí¼Gº×‡õ"ØFϱ;,Î~^£:ŒK‚w£4ý*‡ßÚš¹¹¶‰`DðÛ\C*€ J vªNâ¿6ãÉÁÁf>x't—áþFB¶‹}¤Y\j#P…/ÐK$—é8Š1 ÞËP$§©ŒñÈÈ;z§‡ôyld}#J‹Gš’+ø|¸  Ù,ÜÊ9çŽ AoñÖÃÀv¶VÚuÝÛYÛ‹Wó-ÊÆ«lùà ž ‘ÏÃ\x›CeÂíZg˜1û>˜‘ÚÚF¤`¢Q¤Æ3ÑTdœG(S½¿Ön¬<`.´ˆmlîä·hG ˆÒ©/'ã,»™²¯Þ'ƒ“¬x¿P½½—XµÔ¢ŠH“Ëó¢µ[Ș8¼´’ŽN‰_~7Ä r[<“ާšBðãX˜Ýx“Âúbº» .mîeI@àaG\ûJ”[ˆV4 ¨Ä|ãž}M>dÃÊ`gPÄü²Sëô©.›ÏŽVÈX3L£°4“@”¨Ë86îøþï½bøƒT´Ò¦²ŠêÒHæ¸bÌ{÷u\ã’:ã­f'ŽtÃ4[\¹+öd‡c<ÊÇ „9ä ¸çþ#Î\éDɺ"³gå*ª~A–eF fê8ãŠÄÔuëðð··Ó<9em€ðÉo©²áÇHCàà䌌Ô6îtBœnÎÎãR‰u[=_ç’9f‘‰æ5]€÷#$?ƹÿßÀºå¼V:¤Ö×NbŠcs™-Qz!”•AÇË·nâ~¦¹¤×ü,5uÔMˆBÖËÙŒ—Qɼœ¹r±"“´[øsŽxгñæ—§ëg¥øzãû:ý¾²[S´ù c$c†9ë×;–¯sKÂ7åG{ám:ÏïŠbÔu< ¦ÚIs,¨º^‹œdž~•Eõ/Ÿ‡–,gbd†(mžBòÎáÎȲ¿(WÃ/sÏ^â¸éµ‡ÕìÃÍv—q¼677QŸ2Ö,Ÿ+ÎA°)/œ€0o^ñÕŽ·s£«G²ßrMr.%–ͦ/˜#$ûeì˜ã Õ£ž[¶w2“Ãvz¯…†žº•Ì1%½´/ûèË©–S” Ð’@9<žjÜ^Õ´K]?Wº×/µKÍ:,Oo0a‰‡ï˘î(Ær99'Ò®®m¡u½Uß$º‚ÌÍÓÌ`‘X; ¤uŒŒmÛšHÆR¹Îh,ïâUÔ1ö[f3¼h m,™è? ît¨ã“Q#î¦2_™0pÏNqï\„,靈ž[]6îâ9ná&Ä`Äorvã?Zô$º†¢×W6Û'.w£6 Œ/¾~õFos¬°Ô¡‰ÝL¡È•S…ÿhžßZ¿q¨mçªK†ç÷dÿ~³o4Õ‹åX2Ì®NPÿPj9l^;0»¦lJxV qŸö­6â–ÞìÀÎ\7ýÈöõŠ£¦´hªd¶~Œ•Ïqê(  éͲ‡“QiYI+Žçü*ëˆg”Ÿ67`àçyþéôjb$’&bª¥ú–³ýÑI,¹”#J<Õ_–Cè}è†ñ‡ƒ—W× ¾{‹tм.¥Äw°É=¾n•ç²x+O]B7}R k6‘˜SŒ®~e;Iã9댞kÛõ³ù€lHËs‡”¼z×2ž[¹£a$8 •8ÎÛJÅs»XâSÃ~£w ôÉ|‘,ÅÓyÙȧçU£ðd%eŒÈ :‚ps“ý(°¹ŸsÍÏtÕÒñ¼O¥‰ÉÞ-BF_nyçÌÆìdíéž3Þ™áÍ>KK=sO¹ûLÊ ´[DJ %™Œ¤(¶9'é)àx%ùŠw¸{`X Œ”fw§ÂìóI|%§é‘\Áâ.î%å™!S$gÔ'š7~yôª^xwM¿Ô¢[X1l%’&4Omұ봩ê2x-e™C”í('©j­ƒ(eÙõLb3è( ³ˆÓaÒ<31MÖ—WR>Ù ªêG¢÷8ëž}Í2-Iñ&º]YtØU ` —É*£æ$œž{u㻋Áþj¼Yï.8À>´¿ð…¡„bÚ_šAÊž½?úôÎ^ > mDE ôûÕUž™g FÕ^ „!±Èëíéú[:$,n#à'Ž=kŸÒü"©;ªDG!<}85ÛÃ`¶Ö›ecîÄ?Ùõ BY¤Kh…•]”¯"{AVšH¡LmeÌ£?.:ØÔ+lc(3¬z"ûÄVeΩ¶õã"\V%‹Ÿâô  Ö×=¤¨è ÚÜäqS‹·V‰Uê8eîV¨îóˆdpwrçÓëUÝe7qù…Ž×SûÀ³í@'+ ‰^Xh¹ ã¨æ¼ÿ\ÐEÜGçÀÈNJ«Ž£vç‘]ÜkælQ!Q´å†G°÷¤[Q´âY˜¶›Ôû{P4ìxñ‹û:vÅ©Û,a%s©ÇN3ÓæoΠþ"¿¾š=?Ä÷Öñ(8nuy¢ÜGæÁ{‡©ÝiÝM¸cœ/%qííX—> ‰Öà••”ÛBŒu>¢•‡Ìp–‘=¼—Skms6¯¿lpÞsăU˜œ“ÔqùscÂñOotÚµàŸì ÚÆyf,W“ª6Ž<ã¥jÜxHÛdˆdÛƒ·qa€ñò‘DE6Ñ” I ƒ€Ý7cwãšb¹“â+׿C ¬,®&!‰W®N83ÅfOáĆî VþM¥ "Ú0UÝŒ²JÌrƒƒÔ Žœð;Ù<*®Åa³Š9•¾Yà‚‹9ª¿ð†ßÜLÆæ(åhÔm2yçÛž”XeþÖÚÚÇ5½í­‘òÚKxö$nÿ1?¼£hç¨ãÔé¶±‚PÄ m¹};Âåd ãæeWÀ'o¥vj饢ªÿª,lò§Å9ùl`šÙ„¶²’dÆX)î}+6ã¢XZâqÑì¥uPÆÒ]0x£nS×ò­s§Ù aTØáô”â×^¹µóÚ)%ŒHÁ™ @+•$À(Íc Û¹æÔ¦–Õ™B¬‰˜ŽÀžXzÓó¯x›K†PÅdr7Céÿ×®|øpJíÙ]ˆÉqÔ‚}(°Ô™äVq]i:e¿ö^¿=ãü²Ek°gžKȯÊg$aSMm¨I£­Ì5‹E_%®$»7‚ H#ïÞ:ÉÎ+ѧðt¢ñPªŠËŽ>÷øV5ׄŒ¬$(¡¶°vC†8ê3ŸcJùÈÛé·ºœ© i¤Šso*[¶‘ÎYIéÓž¼ö­_ Ũøi®´f´{ŒÜÀ¥‘„ƒ[ ¥†p£#¯9ã­jGàÄ7) ´n’ÍŽœŒôéÚŸqàû‰%Œ¼ŽêŒ #´˜R@ä`ñÅ1Çêº<×QÞj¦ý-´ß4/,w¶@¢ÎO¹ãé3xGM· “•gn¾¸XÈ8ê°Ç—'ÙŠ×Qoà© ¢—HåGSÎ0ܑҬÙxbi®%T…!ᇖûqÃùdSÙN+»K}Z¦™Ú›f)/'Ë.™ÁugË.åɃÓÌu;½n=JØÃé'™¶Ö±“€2À“¹±ž u–ÞEÔeÕXÓÀóŸþ½oÇ Emb¯aà}Ñêô = þ{–¼ºŠâK©IÝ.9Ï@=+¬²Ña¶û8òfæmä¨ãjÙ¶I<øÕ¦!CÕ@éW[Ì’x€–Ý€þp8j§b“GežWý`ùå‡ÐûS"¸¹wòÈ`­þ±÷ÿ®޹³´“kÛt8Ù;{zγó'²€°”’€a¡>ãÖ€7¤!â`-×—# úÕ"êÉFeÏÊOr}}ª±¸w0Þ<Ó»=?Ú÷¤²hc„¼¡”åÜIõ=¾´Íx÷ÂÒøž-"Xu1g-®òa$êžãû½;æ¼¶÷Ã[ùV“j°ÀVHm÷”#!YØè$sØú×Ð-}ÖÀ&ç 6ùúý+˜Õü0—äL!7äðo§­+¦Ò±åxGL²¹œ/Š4æ˜Ç*¬¥9ä7ú‚2=qÍ6ÓÂ:~©ÕÔ¾*Ó"d% K˜TqüD2€ž3ÉÇ8õîÛCH'UH‰*2OlØRÁàåœÌ [38*zÓßsÏ×ÃaÒ‘`ñ%˜–q´ÂÖê…Xÿy¼Üמ˜éž¼žѬ5 'ÿ„»I•Yˆg[eaã*HŒ®AìqÆ9œ>‰ÕHÔ*‚¤’;R Ú$QHLlà°ùFyûûPg{á}3QÕ#â3ÊÈó›EP:€£÷§9äã<`Ôg)šH„6˜fÈÁÝ™³Ÿ¯•ÖÜx^4ƒŒ0™aÇ>Õ^ÛÂÑËJÑH¿îÛ§½vpKà]5´¼_é‚è qjèªØÏBÛÉìœ=êΗáè&Õ2Þ#Òôèâ„«Nnš}å¿„+”öÉ^ÝÀð•¼×P‚¡BíÁÒ Fòo|òY;óŒÑ`»8CáÈίr%ñ>›*)ýÜë9Ô÷Ú§¨Àwž˜¡<§]i’^iQÜHw%³F¶ô™>R@ÎsÉãÐ„ÖØÃûD‡·=©©$l‘EŸO΀»<üxzÉl­ílüQhÎk[ˆödŸ™Ï˜qÏ>€sÅ>óÀº-­Í®ßisÂîVB–ëòÄ.JžA9ãŽÙ#²È.‚´!B±Q´uÇ÷ªì€$»r¨XdwÐgº,WÂE‹­`G¹®!$m §ÌùŽ3’µZ÷Ãz~•5­ÊkÚ~ †_-áUYYw3A8zŠô9¼-^HRs…'çæÿëÔøFÚXãvH÷°R2:~€»0ôë™<9¡di×öš¹O2AöBq'9wû¬2[®`ç¿´ÁbyK»È¬Ä¼ð=M0ø?Ë–áÉ—`(H NO§ÔþuÔ®!HDO2•B?Õ?§Òݬou™QÀxÀûÌ{gÚ£ZÜùeB0fl‡'<Ÿ¥^¶†YM®n§Ê!åïqT"ŠmÑ‚dƒr=¿úô¡mÃËû:äèçÖŠŠ[”†ô£G‚A<”Ýõ¢€#Ã3LV·'æEîýjH® ŽÝdh‘˸â]½ ô¡®o•¦3$kˆØçßÒ 7EÕâ ùe°¥}?ýtbþXM¬s™;âvõúTZmí¼‘Eƒ¹•wéÏSVRYe±ÚÂRIÈÿJ§äJêÈncuÁŒz{ · ’ >Ý› ™Î{RK¨,ÊHH'îéÈO½Vk,Øò™’*¾‡ÔUXì<пº“ýØÓ?y}½èÁ¿Ú³8G_)<¼¸ºúTïs$w‘£ÔJ¶bKˆŸfRÙ¯`O­U±˜ÛÛÇæ#cfHÊ€{ÒÇ"Ëo9 \Äòrv:íªÓ‹¹Û€¤|Î{œvZ|²E \.ÂÑó”Ç;GzK_-VM¤+F8$žAôôŒ±™Zrìg~ÇÒšKCs En§z$™=†;д1î¸x¾ÐNö?,gØzЏl"¸†VܯAó;zÙö¨´èî$–mÞj+“Üw¥[r-á”5ㆠ[Žž”›wv-gd‰˜ƒ!<ÆÍÆ­IbðÏ óš ÇåË|¿Â¨ïM’æ"»ÌŽí’3åëþôº•®cº¬Ù ¾˜¾´4kyˆÌrÜÀ*dõ_W©~Öð$’4Sÿ­ |øý ©~Æ’]A+¶Ì. D#©ÕCT¤k/!2ƒË}}ýèJ$¹—gÊê }ö<`{{R 1ne[*ÀIô>ãÖ˜ÍW.‹hàðÀ€OaïïPÛ\‘k$‡Ì“÷}2=ý(˜Òn­d”+Lq.^ÝÏ­2I.ü·F·B|•pÉÏ'×Þµ#1ÏtÊ”îœÿßàÅY‘#ûl‘¬8ÈÀù˃ڀ0î¬Ìñ$m jv‘œû½êS "Ø…••°NÛ¹¦=êüòN’űdÿXF8Äþ+&îòx"c"6†ÿX½0¾„Е—ʸդq$¬NÞõ^kÌN]£`7ÿËLö_¯½>Îä¬P®Û@ã=x«ó”6{Ö ËmvÈfÓ¶h¾›û蔡*¨¤*ç¦}ªY"·7ñLv’prTû{Ôv¢æ® Gœo=‡ºŠ–xRÙÙÕÚ'êÀõ+ï@ŸuœÎ`Q-IR>ö=j{yneeÄ`žr=ê“í½yÇÚAÁ³F«ÜZ®å‹xóq¹Ïs@nïJL±²Íón\î_oðª+pÂâibÛcŒþóý“íïWn&š!å€ÂfÈÚOsQeí’è—Û¿0݇ûÔ,—±,ÊS;G%OT'ÔT2n]13È;Ÿf÷¤ÕlÄv¦Eº §ŒöVµfÒxfC9}ÙÚ¹  ¸dùÝcuB"' qž=ýëbÖÇΊÞY&,Bpç°Ç÷ª‹ÇšÉ#\8ݸz=½ªÖŸr·vÌ"–_”È¿ÒLvúPWv…l¿u¼=Ö£´°x^RÄÌL{žÂµmíe„uv(É'Õ}êŒÃÊ¿ØnŒd¡àgû‡ßÞ€-ÙEp’—’㨓þ飯÷P¶Œ´„ônOqØûÔ–RÉv¨Vf ã’1éíIx’E1£ÎW±cÃ{é@Z@в7ï–à#·÷kFß"E/k'u†‡ëUiDðâLªËƒ¶&þï½Eý­o7•¸J “*êG­…ºÝ‘ˆd–È9^ãýŸzKq0F!]ùÁfþ/¨¥Že¿’F—w ‘ëôö«¿Ù±y³:ÄØ#ŸzÇ>t^`«~ó m9è=êm>}ÒÙeT[·½j\ivmç;DFÇ'îý¥fAÆqnûõ^Tëí@ܼ†Ý‚œ¹“½þµ#–#]D•ÀiG÷¡5=ÅäSÎFÞ ×?áZ.ÿ'8Œ[Ÿ0{_z|v“Ë ¬²E•_,cŸº=ª?(´­(šm€FÓŽ …j…„$ï'ÊÀÿ¬ÿdzÏ™¥´±“!/ޤýézûжV© ŒîhÎNæÀ~´È-cóZ#"œ §Ñ‡·­X–åIµBÁC¡ãÓÖ®öɺ3|Ý}è5î@!‹Œ¤¯Ÿ™ºe¾µÙÙÚI<Ø€L·9=Aõ_z‚òŠõ„–Ð0–]£ldûú}jÛGæÛ¹ŠÐ¡hGÞ‡ŽŠ{Ÿz¦¶€ÝaÍ».Ð9ÛÜCïI ¼S?Ù‚F~U ¤^¼ž¹þíli6’}žIdŠØa†Ч¿áTî>Óo©Û” Š@v¿÷qþ4V,/6³–9ˆôÀô©×ìÛcvsœ*ÿÖ¯´‚vˆ;Šýåõú{Twp-£DBHÙÈàzŸo¥>êâ&’5 6Wi²Ž¹R³ˆ™Èr¥\Œ»ù),P]ÊÅáŒmDûù=øR[éæxÐFmÀRÈq=7ŽãÚ€'¼¶m„1`yÝßñ§–8ŠùYVL GÖ­¼–ðÆÌù ýÙù}*ºÜˆ„ ´¸ØÌ¨”øÖ¹%ŒŠYÝùvÇ©ª7;æq Óàm`„ƶ¥º„M ÞsåIßíõªð<ÐÅ"ycÌEbIÏð½í@w/¨Mmr¼€‘ÉÊôoz±Ÿé+™ÂBÈ}}½«Nc†è¼Éòã!qýÐ{·½V»µ]™EÌàm#PöúЛ.%òÈ8 ÀªúñØUËVU<ë1€ÛÊ™÷úV<±ÛÛ9%Ûjd®=½ZKÍÒ˜ãŠäüŸÃœtsëí@P÷Å×NR2ð©ýﯵbÒÖáú©Á;*‡ÓÖŠÿÙrsl-v1.43/doc/RSL_read_these_sweeps.html0000644000102200007640000000407606600002411015204 00000000000000  

 
 

RSL_read_these_sweeps


Synopsis

#include "rsl.h"
void RSL_read_these_sweeps(char *sweep#, [char *sweep#...], NULL);

Description

Call this routine prior to any ingest routine and only the sweeps specified will be stored in memory.  This drastically reduces memory requirements and speeds up the ingest, especially, if you're only interesed in a few sweeps.  This function is useful, for instance, when you're making images of the base sweeps.  Why bother reading the entire file when you only need the first sweep? By default, all sweeps are ingested.  The sweep# is a character string representing the sweep number, "4" for instance.  Order does not matter.  Specify NULL as the last argument. This signals this routine when to stop parsing  for sweep numbers.  The first sweep is "0".

The list of possible sweep numbers is: "all", "none", "0", "1", ...

Action or side-effects: A second call to this function over-rides any previous settings. In other words, multiple calls are not additive.  Therefore, you must list all the sweeps you want in a single call.

RSL_read_these_sweeps("1", "2", NULL);

which  reads the second and third sweep is not the same as:

RSL_read_these_sweeps("1", NULL);
RSL_read_these_sweeps("2", NULL);

wherein, only the third (index 2) sweep is ingested.
 


Return value

Upon successful completion, RSL_read_these_sweeps silently sets a hidden array that each of the specific radar format ingest routines access.

See also

RSL_anyformat_to_radar.

Author: John H. Merritt. rsl-v1.43/doc/RSL_sweep_to_cart.html0000644000102200007640000000206706600002411014347 00000000000000

RSL_sweep_to_cart


Synopsis

#include "rsl.h"
unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range);


Description

Given a Sweep pointer, s, return a character image of size xdim by ydim representing the mapping of polar to cartesean with the radar at the center of the image. The radial range, range, is mapped to the edge of the image. The space for the returned images is obtained via malloc. It is assumed that range is in units of gate size.

Return value

Upon successful completion a valid pointer to unsigned char is returned, otherwise NULL.

See also

RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm

Author: John H. Merritt rsl-v1.43/doc/RSL_get_closest_ray_from_sweep.html0000644000102200007640000000227406600002406017131 00000000000000


RSL_get_closest_ray_from_sweep


Synopsis

#include "rsl.h"
Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit);


Description

Return the closest ray within a sweep. Closeness is determined by the minimum absolute difference of ray_angle and the azimuth angle of the ray. The difference must be less than limit. If no such ray can be found, return NULL.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_ray, RSL_get_ray_from_sweep, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.

Author: Dennis Flanigan Jr. rsl-v1.43/doc/RSL_clear.html0000644000102200007640000000214411410462157012607 00000000000000


RSL_clear_...


Synopsis

#include "rsl.h"
Ray *RSL_clear_ray(Ray *r);
Sweep *RSL_clear_sweep(Sweep *s);
Volume *RSL_clear_volume(Volume *v);


Description

RSL_clear_volume calls RSL_clear_sweep for the number of sweeps. RSL_clear_sweep calls RSL_clear_ray for the number of rays. And RSL_clear_ray clears the array of Range of size nbins. All header information is preserved. This may or may not be a desired capability.

Return value

Upon successful completion, a pointer to the appropriate structure is returned.

See also

RSL_free_volume, RSL_free_sweep, RSL_free_ray

Author: John H. Merritt rsl-v1.43/doc/RSL_get_first_sweep_of_volume.html0000644000102200007640000000155106600002406016756 00000000000000


RSL_get_first_sweep_of_volume


Synopsis

#include "rsl.h"
Sweep *RSL_get_first_sweep_of_volume(Volume *v);


Description

RSL_get_first_sweep_of_volume returns a pointer to the first sweep pointer in the Volume structure *v, if one exist. Otherwise NULL is returned.

Return value

Upon successful completion, a pointer to the Sweep structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_first_ray_of_sweep
RSL_get_first_ray_of_volume

Author: John H. Merritt rsl-v1.43/doc/RSL_carpi_value.html0000644000102200007640000000016706600002405014005 00000000000000 t


ypedef Range Carpi_value; rsl-v1.43/doc/internal_routines.html0000644000102200007640000002412506600002412014535 00000000000000

RSL Internal Routines


RSL internal routines are routines used within the library and not meant for use in RSL application programs. Most of these routines are used only within the source code file that they exist, but a few are used in several different source code files.

The routines are listed by the RSL source code file in which they can be found.

As of version 0.39, the source code for the wsr88d (v1.14), lassen (v1.1), nsig (v1.3), tg (v1.1), and mcgill (v1.1) libraries are included in RSL. This precludes the need to specify a long list of additional libraries during the link step when building application. Also, it simplifies the RSL installation procedure. Still needed are two routines: ppmtogif and ppmtopict, from the pbmplus package.


New in v0.41

gzip.c

int no_command(char *cmd);
FILE *uncompress_pipe(FILE *fp);
FILE *compress_pipe(FILE *fp);

column.c

Column *compute_column_products(Column *c);
Compute the vertical structure values within the Column passed in the parameter list using the data values stored in the Column. Vertical_structure values computed are zmax,hzmax and the eth array (echo tops). The dBz, slant range and height values must exist within the Column before this routine is called. The array for echo top values must be allocated as well.

Column *get_column_dbz(Volume *v,Column *c,float azim);
Retrieve the dBz values from the Volume v using the nearest neighbor technique along a straight vertical line. The vertical line is positioned at the azimuth passed in the parameter list and the ground range that should already exist in Column c. The slant range array, height array and memory allocation for the dBz array should already exist as well.

Column *get_column_range_coord(Volume *v,Column *c, float grange);
Using the elevation angles from Volume v and the ground range (grange), calculate the slant ranges and heights for all points at the intersections of the Sweeps in Volume v and a straight vertical line at the ground range value grange.

Column *new_column(int nsteps,float ett_start,float ett_int,int num_ett);
Allocate space for a Column data structure and arrays within the Column. The value nsteps is the length of the dbz,height and slant range arrays. The lenght of the echo top array, and thus the number of thresholds, is num_ett. The first echo top threshold is ett_start followed by additional thresholds every ett_int.

void copy_column_range_coord(Column *from,Column *to);
Copy the range dependent coordinates from Column from to Column to. Range dependent variables in the Column data structure are ground_range, the h array (height) and slant_range array. No memory space is allocated for the Column to.


endian.c

int big_endian(void);
int little_endian(void);
void swap_4_bytes(void *word);
void swap_2_bytes(void *word);

image_gen.c

None.

interp.c

double dir_angle_diff(float x,float y); Returns signed difference between angles x and y. Returns a positive value if y > x and a negative value if y double from_dB(double db); Convert a decibel scale value to a linear scale value.

double get_linear_value_from_sweep(Sweep *sweep,float srange,float azim,float limit); Return an interpolate value between two rays within a sweep. Interpolation is done along the azimuth coordinate. No interpolation is done in the range direction. The routine expects to work with values that are in a decibel scale (reflectivity data), but it returns values in linear scale.

double to_dB(double value); Convert a linear scale value to a decibel scale value.

float get_dist(float r1,float a1,float e1,float r2,float a2,float e2); Compute the distence between two points in space given their spherical coordinates. r1 (range),a1 (azimuth angle) and e1 (elevation angle) are the coordinates for the first point. Angles are measured in degrees.

void get_surrounding_ray(Ray **ccwise,Ray **cwise,Sweep *s,float ray_angle); Return the two rays within a sweep that surround the angle ray_angle. The ray that is counter-clockwise to ray_angle is returned in ccwise. The ray that is clockwise to ray_angle is returned in cwise. **ccise and **cwise are pointers to ray pointers. For example, if r is of type *Ray, then &r should be passed for either **ccwise or **cwise.

void get_surrounding_sweep(Sweep **below,Sweep **above, Volume *v,float elev); Return the sweeps that are above and below the elevation angle elev. **below and **above are pointers to Sweep pointers. if s is of type *Sweep, pass &s as either **above or **below. If the conditionexist where a sweep does not exist for either the above or below case, then a the appropriate pointer is set to NULL.

void get_xyz_coord(double *x,double *y,double *z,double range,double azim,double elev); Convert a set of spherical coordinates to a set of cartesian coordinates.


lassen_to_radar.c

void lassen_load_sweep(Sweep *s, int isweep_num, unsigned int mask, int early, s truct sweep_index *ptr);

mcgill.c

mcgFile_t *mcgFileOpen(int *code, char *filename);
int mcgFileClose(mcgFile_t *file);
int mcgRecordRead(mcgRecord_t *record, mcgFile_t *file);
mcgSegmentID mcgSegmentKeyIdentify(int key);
int mcgRayBuild(mcgRay_t *ray, mcgFile_t *file);

mcgill_to_radar.c

void RayFill(Ray *rsl_ray, mcgRay_t *mcg_ray);
void Ray_headerInit(Ray *ray, mcgHeader_t *head, mcgRay_t *mcg_ray, int ray_num, int num_bins_rsl);
void Sweep_headerInit(Sweep *sweep, mcgRay_t *mcg_ray, int nrays);
void Volume_headerInit(Volume *volume, short vol_scan_format);
void Radar_headerInit(Radar *radar, mcgHeader_t *mcg_head);

nsig_to_radar.c

Radar * nsig_to_radar_headers_only(char * filename);
Radar * n2r(char * filename, int data_flag, int misc_flag);
int Rset_header(Radar * Radptr, nsig_file * nsfile);
int Vset_header( Volume * volptr, int n, char * string);
int Swset_header( Sweep * sweepptr, int sweepnum, float elev, float beam_width, int nrays);
int set_mask(int k, int * array);
void sec2dhms(long sec, int * d, int * h, int * m, int *s);
int rtype2ntype( int j );
int ntype2rtype( int j );
char * get_type_string(int j);
int Rayset_header(Ray * rayptr, nsig_ray_data * ray_data_ptr, nsig_ingest_data_header * idhdptr, Fixed_Header * fhptr);
void Set_FixedHeader(Fixed_Header * FHptr, nsig_file * nsfile);

print_histogram_catelog.c

void print_histogram_catalog(Histogram *histogram, int min_range, int max_range, char *da te, char *filename);

radar.c

void print_vect(float v[], int istart, int istop);
void radar_load_date_time(Radar *radar);


radar_to_uf.c

none.

range.c

none.

ray_indexes.c

static void set_high_and_low_pointers(Sweep *s);
static Azimuth_hash *hash_add_node(Azimuth_hash *node, Ray *ray);

read_write.c

Radar *set_default_function_pointers(Radar *radar);

sort_rays.c

static int ray_sort_compare(Ray **r1, Ray **r2);
static int ray_sort_compare_by_time(Ray **r1, Ray **r2);
static int sweep_sort_compare(Sweep **s1, Sweep **s2);

toga_to_radar.c

void fill_ray(Ray *ray, tg_file_str *tg_file, int datatype);
void fill_ray_header(Ray *ray, tg_file_str *tg_file, int elev_num, int datatype);
void fill_sweep_header(Radar *radar, tg_map_head_str *map_head, int sweep_num, int nrays);
void fill_volume_header(Radar *radar, tg_map_head_str *map_head);
void fill_radar_header(Radar *radar, tg_map_head_str *map_head);

uf_to_radar.c

Volume *reset_nsweeps_in_volume(Volume *volume);
Radar *reset_nsweeps_in_all_volumes(Radar *radar);
Volume *copy_sweeps_into_volume(Volume *new_volume, Volume *old_volume);
void uf_into_radar(UF_buffer uf, Radar **the_radar);
void swap_uf_buffer(UF_buffer uf);
static enum UF_type type_of_uf_file(char *infile);

volume.c

Azimuth_hash *the_closest_hash(Azimuth_hash *hash, float ray_angle);
Return the hash pointer that contains the closest Ray to the angle ray_angle. The hash passed to this routine can be any hash within the a Sweep's hashing table, but for the quickest search it should be the hash pointer with the index returned by the internal routine hash_bin.

double angle_diff(float x, float y);
Return the absolute value of the difference between angle x and angle y. Angles are measure in degrees and the return value has a range from 0 to 180.

double ccwise_angle_diff(float x,float y);
Returns the counter-clockwise angle difference of x to y. Values returned will always be positive and exist in the range from 0 to 360. Examples: if x = 345 and y = 355 the value returned will be 350. On the other hand if x = 345 and y = 335 then the value returned will be 10.

double cwise_angle_diff(float x,float y);
Returns the clockwise angle difference of x to y. Values returned will always be positive and exist in the range from 0 to 360.

int get_closest_sweep_index(Volume *v,float sweep_angle);
int hash_bin(Sweep *s,float angle);

wsr88d_to_radar.c

void float_to_range(float *x, Range *c, int n, Range (*function)(float x) );
int wsr88d_load_sweep_into_volume(Wsr88d_sweep ws, Volume *v, int nsweep, unsigned int vmask);

WSR88D library (v1.14)

wsr88d.c
wsr88d.h
wsr88d_get_site.c
wsr88d_locations.dat

Lassen library (v1.1)

accessvolhead.c
cvrt.h
freevol.c
lassen.h
portable.h
radar.h
radinfo.h
raw.h
read_head.c
readvol.c
sunrise_head.h
sunrise_time.h
xdr.h

NSIG library (v1.3)

nsig.c
nsig.h

TG library (v1.1)

toga.c
toga.h

McGill library (v1.1)

mcgill.c
mcgill.h rsl-v1.43/doc/RSL_find_rng_azm.html0000644000102200007640000000072106600002406014145 00000000000000

RSL_find_rng_azm


Synopsis

#include "rsl.h"
void RSL_find_rng_azm(float *r, float *ang, float x, float y);


Description

Convert Cartesian coords (x, y) to polar (rng,angle); 0<angle<360.

Return value

None.

See also


Author: Mike Kolander rsl-v1.43/doc/rain.gif0000644000102200007640000000355506600002413011530 00000000000000GIF89a´xòÿÿÿùÿ÷çíæÖÜÕÍÓÌ´º³¡¨ !ù,´xBÿHºÜÕ0ÊI«½8×§»_ÆÜThøuÃY® KïRGg*ÎQAŒÄÃr†I+Å v„§(¹ò…²¢VƒLQ-_.é¹e@ËFo–² £ßðÌ1U*oñü%ô»ë%(x+Grƒr|W‡k9‹ …g+NdRŒŽ9ovd ™‘Q”<§©z™¢d¤ª§]LªP·8H î ’ ħ1Þ2—&` ùœfÌœˆí´¢W¨B,Ž@ ÒüT}ÆõÇ?®åRÝ´—ÍŽ¹ËpB`œ¾P?AƒEh[sSb<ša$@ ãÚ7«ð( øìL Æ2ñp7¤å–:¼[.ˆ bø'¹ðÿ¹[%ª)e:–=_BQB¸Q›ÎüPX²Ù-Œ6”kpR L<;)ãSÚ&÷È#ÎWš`º“ïôÀD ƒWG‰FI‡”mš EÉ‹8¸ $½GG$zDŽå© ;± ?°Q?–ˆ+Y•‚5+ETan8øÓÁæ‚S ­oXB:аªÎwüÄGQ ›–20jæÔL`¹¶U6^o°NõëÀÕ#*öQj“O¨n3A£±†QÃèŽVLtŸn`Η`àÏ‘â‚)µèm9)g`^I¤Fˆö_ Š©T7„ö ÉJ+µVq,q”i âòœàž€.×ý”©ÄÜ+0J¾¢2QB¬ðúèB࿳rT~{ÒöD‰•1ø ÜÕROòØ“I-N9 b×Üõº— ;rsl-v1.43/doc/RSL_return_hzmax_sweep.html0000644000102200007640000000226006600002411015435 00000000000000

RSL_return_hzmax_sweep


Synopsis

#include "rsl.h"
Sweep *RSL_return_hzmax_sweep.html( Vertical_structure *vs);

Description

Given a Vertical_structure created by RSL_get_vertical_structure, return a Sweep data structure that contains the height of the maximum dBz value found above the bins in the base sweep of a Volume of dBz data.

Return Value

Upon successful completion, a pointer to a Sweep data structure is returned. Otherwise a NULL pointer is returned.

See also

RSL_return_zmax_sweep, RSL_return_eth_sweep, RSL_get_vertical_structure, RSL_free_vertical_structure, RSL_get_column,

Author: Dennis Flanigan Jr. rsl-v1.43/doc/functionality_index.html0000644000102200007640000003557211747562744015113 00000000000000


Index of RSL routines grouped by functionality.

Input

Radar *RSL_anyformat_to_radar(char *infile [, char *callid_or_first_file]);
Radar *RSL_kwaj_to_radar(char *infile);
Radar *RSL_lassen_to_radar(char *infile);
Radar *RSL_mcgill_to_radar(char *infile);
Radar *RSL_nsig_to_radar(char *infile);
Radar *RSL_nsig2_to_radar(char *infile);
Radar *RSL_radtec_to_radar(char *infile);
Radar *RSL_rapic_to_radar(char *infile);
Radar *RSL_read_radar(char *infile);
Radar *RSL_toga_to_radar(char *infile);
Radar *RSL_uf_to_radar(char *infile);
Radar *RSL_uf_to_radar_fp(FILE *fp);
Radar *RSL_wsr88d_to_radar(char *infile, char *callid_or_first_file);
Volume *RSL_read_volume(FILE *fp);
Sweep *RSL_read_sweep (FILE *fp);
Ray *RSL_read_ray (FILE *fp);
void RSL_read_these_sweeps(char *sweep#, ..., NULL);
void RSL_select_fields(char *field_type, ..., NULL);
void RSL_set_kwaj_parameters(float mds, float calibr_slope, float calibr_intercept);
void RSL_radar_verbose_off(void);
void RSL_radar_verbose_on(void);

Output

void RSL_radar_to_uf(Radar *r, char *outfile);
void RSL_radar_to_uf_fp(Radar *r, FILE *fp);
void RSL_radar_to_uf_gzip(Radar *r, char *outfile);
int RSL_write_histogram(Histogram *histogram, char *outfile);
int RSL_write_ray(Ray *r, FILE *fp);
int RSL_write_sweep(Sweep *s, FILE *fp);
int RSL_write_volume(Volume *v, FILE *fp);
int RSL_write_histogram(Histogram *histogram, char *outfile);
int RSL_write_radar(Radar *radar, char *outfile);
int RSL_write_radar_fp(Radar *radar, FILE *fp);
int RSL_write_radar_gzip(Radar *radar, char *outfile);
void RSL_print_version(void);

Memory management

Radar *RSL_new_radar(int nvolumes);
Radar *RSL_prune_radar(Radar *radar);
Radar *RSL_sort_radar(Radar *r);
Volume *RSL_clear_volume(Volume *v);
Volume *RSL_copy_volume(Volume *v);
Volume *RSL_new_volume(int max_sweeps);
Volume *RSL_prune_volume(Volume *v);
Sweep *RSL_clear_sweep(Sweep *s);
Sweep *RSL_copy_sweep(Sweep *s);
Sweep *RSL_new_sweep(int max_rays);
Sweep *RSL_prune_sweep(Sweep *s);
Ray *RSL_clear_ray(Ray *r);
Ray *RSL_copy_ray(Ray *r);
Ray *RSL_new_ray(int max_bins);
Ray *RSL_prune_ray(Ray *ray);
Cappi *RSL_new_cappi(Sweep *sweep, float height);
Carpi *RSL_new_carpi(int xdim, int ydim);
void RSL_free_cappi(Cappi *c);
void RSL_free_histogram(Histogram *histogram);
void RSL_free_radar(Radar *r);
void RSL_free_ray(Ray *r);
void RSL_free_sweep(Sweep *s);
void RSL_free_volume(Volume *v);

Image generation

void RSL_bscan_ray(Ray *r, FILE *fp);
void RSL_bscan_sweep(Sweep *s, char *outfile);
void RSL_bscan_volume(Volume *v, char *basename);
void RSL_get_color_table(int icolor, char buffer[256], int *ncolors);
void RSL_set_color_table(int icolor, char buffer[256], int *ncolors);
void RSL_load_color_table(char *infile, char buffer[256], int *ncolors);
void RSL_load_green_table(char *infile);
void RSL_load_blue_table(char *infile);
void RSL_load_height_color_table();
void RSL_load_rainfall_color_table();
void RSL_load_red_table(char *infile);
void RSL_load_refl_color_table();
void RSL_load_sw_color_table();
void RSL_load_vel_color_table();
void RSL_load_zdr_color_table();
void RSL_rebin_velocity_ray(Ray *r);
void RSL_rebin_velocity_sweep(Sweep *s);
void RSL_rebin_velocity_volume(Volume *v);
void RSL_rebin_ray(Ray *r);
void RSL_rebin_sweep(Sweep *s);
void RSL_rebin_volume(Volume *v);
void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range);
void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range) ;
void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range);
void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_t able[256][3]);
void RSL_write_pict(char *outfile, unsigned char *image, int xdim, int ydim, char c_ table[256][3]);
void RSL_write_pgm(char *outfile, unsigned char *image, int xdim, int ydim);
void RSL_write_ppm(char *outfile, unsigned char *image, int xdim, int ydim, char c_t able[256][3]);
unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range);

Get something from objects

Volume *RSL_get_volume(Radar *r, int type_wanted);
Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim);
Volume *RSL_reverse_sweep_order(Volume *v);
Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit);
Sweep *RSL_get_first_sweep_of_volume(Volume *v);
Sweep *RSL_get_sweep(Volume *v, float elev);
Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim);
Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit);
Ray *RSL_get_first_ray_of_sweep(Sweep *s);
Ray *RSL_get_first_ray_of_volume(Volume *v);
Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *ray);
Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *ray);
Ray *RSL_get_ray(Volume *v, float elev, float azimuth);
Ray *RSL_get_ray_from_sweep(Sweep *s, float azim);
Ray *RSL_get_ray_above(Volume *v, Ray *current_ray);
Ray *RSL_get_ray_below(Volume *v, Ray *current_ray);
Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim);
float RSL_get_linear_value(Volume *v,float srange,float azim,float elev,float limit);
float RSL_get_nyquist_from_radar(Radar *radar);
float RSL_get_range_of_range_index(Ray *ray, int index);
float RSL_get_value(Volume *v, float elev, float azimuth, float range);
float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h);
float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm);
float RSL_get_value_from_ray(Ray *ray, float r);
float RSL_get_value_from_sweep(Sweep *s, float elev, float azim, float r);
Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range, float low_azim, float hi_azim);
int RSL_get_sweep_index_from_volume(Volume *v, float elev,int *next_closest);

Sorting

Volume *RSL_sort_rays_in_volume(Volume *v);
Volume *RSL_sort_sweeps_in_volume(Volume *v);
Volume *RSL_sort_volume(Volume *v);
Sweep *RSL_sort_rays_in_sweep(Sweep *s);
Sweep *RSL_sort_rays_by_time(Sweep *s);

Math

Volume *RSL_volume_z_to_r(Volume *z_volume, float k, float a);
Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a);
Ray *RSL_ray_z_to_r(Ray *z_ray, float k, float a);
float RSL_z_to_r(float z, float k, float a);
float RSL_area_of_ray(Ray *r, float lo, float hi, float max_range);
float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range);
float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range);
float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range);
float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float max_rng);
void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset);
void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset);
void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset);
void RSL_find_rng_azm(float *r, float *ang, float x, float y);
void RSL_fix_time(Ray *ray);
void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h);
void RSL_get_gr_slantr_h(Ray *ray, int i, float *gr, float *slantr, float *h)
void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev);
void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h);

Cappi/Carpi

Cappi *RSL_cappi_at_h(Volume *v, float h, float grnd_range);
Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar_y);
Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r, float dx, float dy, int nx, int ny, int radar_x, int radar_y, float lat, float lon);
int RSL_fill_cappi(Volume *v, Cappi *cap, int method);

Cube

Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz, int nx, int ny, int nz, float grnd_r, int radar_x, int radar_y, int radar_z);

Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z);

Histogram

Histogram *RSL_allocate_histogram(int low, int hi);
Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range);
void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename);
Histogram *RSL_read_histogram(char *infile);

Author: John H. Merritt. rsl-v1.43/doc/RSL_z_to_r.html0000644000102200007640000000207706600002412013007 00000000000000

RSL_...z_to_r


Synopsis

#include "rsl.h"
float RSL_z_to_r(float dbz, float k, float a);
Ray *RSL_ray_z_to_r(Volume *z_volume, float k, float a);
Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a);
Volume *RSL_volume_z_to_r(Ray *z_ray, float k, float a);


Description

RSL_volume_z_to_r calls RSL_sweep_z_to_r for the number of sweeps. RSL_sweep_z_to_r calls RSL_ray_z_to_r for the number of rays. RSL_ray_z_to_r calls RSL_z_to_r for the number of bins in the ray. RSL_z_to_r computes the function 1/a*(dbz - 10*log10(k)).

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

Author: John H. Merritt rsl-v1.43/doc/index.html0000644000102200007640000000666711747603151012132 00000000000000 TRMM Satellite Validation Office Web Site

TRMM Radar Software Library


Current RSL Version 1.43, released 4/30/2012

In support of the Tropical Rainfall Measuring Mission's (TRMM) Global Validation Program, the NASA TRMM Satellite Validation Office has developed a Radar Software Library for working with the various input radar formats. This is an object-oriented library written in C.

This library is an object oriented programming environment for writing software applicable to all RADAR data related to the TRMM GV effort. This library reads the WSR88D, Lassen, Sigmet, McGill, UF, HDF, RAPIC, RADTEC and native RSL file formats. Additional functions are provided to manipulate the RSL objects. Nearly all of the functions return objects. When they don't, they usually perform actions like output, making images, etc. The most general object in RSL is Radar. The structure Radar is the method used to define the ideal or universal radar representation in RAM while keeping the natural resolution of the data unchanged. More simply, Radar represents the super set of all radar file formats. The Radar structure is hierarchically defined such that it is composed of Volumes, each containing one field type. Volumes are composed of Sweeps. Sweeps are composed of Rays and Rays contains a vector of the field type. Some field types are Reflectivity(DZ), Velocity(VR), Spectrum Width(SW), etc. There are approximately 20 field types. See the Users Guide for more information.  Also, check out What's New.
Send questions or comments to help@radar.gsfc.nasa.gov.

Indexed Reference
Download latest version


Supported Radar Data Formats

Format Type Input Output
Lassen Yes No
McGill Yes No
Sigmet Yes No
WSR-88D Yes No
RAPIC Yes No
UF - Universal Format Yes Yes
HDF - Hierarchical Data Format Yes Yes
RADTEC Yes No

rsl-v1.43/doc/RSL_get_slantr_and_h.html0000644000102200007640000000133206600002407015003 00000000000000

RSL_get_slantr_and_h


Synopsis

#include "rsl.h"
void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h);


Description

Given ground range, gr, and elevation angle, elev, compute the slant range, slant_r and height, h. Range and height units are in km. Angles are in degrees.

Return value

None.

See also

RSL_get_slantr_and_elev, RSL_get_groundr_and_h

Author: John H. Merritt rsl-v1.43/doc/RSL_read_histogram.html0000644000102200007640000000122606600002410014474 00000000000000


RSL_read_histogram


Synopsis

#include "rsl.h"
Histogram *RSL_read_histogram(char *infile);

Description

Read the structure Histogram from the disk file infile.

Return value

Upon successful completion, a pointer to Histogram is returned. NULL is returned if an error occurs and errno is set.

See also

RSL_write_histogram

Author: David B. Wolff rsl-v1.43/doc/RSL_get_ray_from_sweep.html0000644000102200007640000000204406600002407015371 00000000000000


RSL_get_ray_from_sweep


Synopsis

#include "rsl.h"
Ray *RSL_get_ray_from_sweep(Sweep *s, float azim);


Description

Return a pointer to a Ray that is in the Sweep *s, for the azimuth angle azim. The search is to find a ray that is within one beam width of the desired angle. The search is +/- 1/2 horizontal beam width.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_ray, RSL_get_ray_above, RSL_get_ray_below, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume.

Author: John H. Merritt rsl-v1.43/doc/RSL_color_table.html0000644000102200007640000000670106653365501014021 00000000000000


RSL_get_color_table
RSL_set_color_table


Synopsis

#include "rsl.h"
void RSL_get_color_table(int icolor, char buffer[256], int *ncolors)
void RSL_set_color_table(int icolor, char buffer[256], int ncolors)


Description

RSL_get_color_table: Given a color table index, one of RSL_RED_TABLE, RSL_GREEN_TABLE or RSL_BLUE_TABLE, return up to 256 color indexes each containing the color intensity for that color at each index.  The number of colors in the table is indicated in *ncolors.

RSL_set_color_table: Given a color table index icolor, one of RSL_RED_TABLE, RSL_GREEN_TABLE or RSL_BLUE_TABLE,  and a character buffer, at most 256 color indexes long, and the number of indexes in the character buffer, set the color table.  Each color index in buffer contains the color intensity for that color.  Range of color intensities is 0 to 255.

You must make three calls to both the get and set functions to change the entire color table entry for a particular index.  For example, to change the 5th index of the color table to cyan (Red=0, Green=255, Blue=255), perform the following (provided a color table is already loaded):

char r[256], g[256], b[256];
RSL_get_color_table(RSL_RED_TABLE,   r, &ncolors);
RSL_get_color_table(RSL_GREEN_TABLE, g, &ncolors);
RSL_get_color_table(RSL_BLUE_TABLE,  b, &ncolors);

r[4] = (char)0;    /* [4] is the 5-th index */
g[4] = (char)255;
b[4] = (char)255;

RSL_set_color_table(RSL_RED_TABLE,   r, ncolors);
RSL_set_color_table(RSL_GREEN_TABLE, g, ncolors);
RSL_set_color_table(RSL_BLUE_TABLE,  b, ncolors);
 
 


Return value

None. 

See also

RSL_rebin_velocity_ray, RSL_rebin_velocity_sweep, RSL_rebin_velocity_volume,
RSL_sweep_to_gif, RSL_sweep_to_pict, Vsweep_to_pgm, Vsweep_to_ppm,
RSL_load_color_table, RSL_load_green_table, RSL_load_red_table, RSL_load_blue_table,
RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm

Author: John H. Merritt rsl-v1.43/doc/RSL_uf_to_radar.html0000644000102200007640000000371206600002411013774 00000000000000


RSL_uf_to_radar

RSL_uf_to_radar_fp


Synopsis

#include "rsl.h"
Radar *RSL_uf_to_radar(char *infile);
Radar *RSL_uf_to_radar_fp(FILE *fp);

Description

Read a UF (Universal Format) file and return a pointer to the structure Radar. The input file is specified by the string infile. RSL_uf_to_radar calls RSL_uf_to_radar_fp which is provided as a means of constructing filter programs -- reading stdio, for instance. If infile is NULL, then stdin is used. RSL_uf_to_radar_fp checks the UF magic information to ensure that a valid UF file is being read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands. It can handle true UF files, as well as, UF files with 2 and 4 byte Fortran record delimeters. These routines work on big and little endian machines, provided that the input UF file is in big endian format. RSL_radar_to_uf creates UF files in big endian format when run on either big or little endian machines; by definition UF files are in big endian format.

The radar structure is, essentially, an array of Volumes. The number and type of volumes allocated is automatically determined from the input UF file. No UF library needed; the UF code is part of RSL.


Return value

Upon successful completion, RSL_uf_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.

See also

RSL_anyformat_to_radar, RSL_radar_to_uf

Author: John H. Merritt. rsl-v1.43/doc/RSL_radar_header_struct.html0000644000102200007640000000522011670527456015540 00000000000000


typedef struct { 
  int month, day, year; 
  int hour, minute; 
  float sec; /* Second plus fractional part. */
  char radar_type[50]; /* Type of radar. Use for QC-ing the data.
                        * Supported types are:
                        * "wsr88d", "lassen", "uf",
                        * "nsig", "nsig2", "mcgill",
                        * "kwajalein", "rsl", "toga".
                        * Set by appropriate ingest routine.
                        */ 
  int nvolumes;
  int number;        /* arbitrary number of this radar site */
  char name[8];      /* Nexrad site name */
  char radar_name[8]; /* Radar name. */
  char project[24];   /* Project assocated with data. */
  char city[15];     /* nearest city to radaar site */
  char state[2];     /* state of radar site */
  int latd;   /* degrees of latitude of site */
  int latm;   /* minutes of latitude of site */
  int lats;   /* seconds of latitude of site */
  int lond;   /* degrees of longitude of site */
  int lonm;   /* minutes of longitude of site */
  int lons;   /* seconds of longitude of site */
  int height; /* height of site in meters above sea level*/
  int spulse; /* length of short pulse (ns)*/
  int lpulse; /* length of long pulse (ns) */
  int scan_mode;  /* 0 = PPI, 1 = RHI */
  int vcp;    /* Volume Coverage Pattern (WSR-88D only) */
} Radar_header;
rsl-v1.43/doc/RSL_get_sweep_index_from_volume.html0000644000102200007640000000144406600002407017277 00000000000000

RSL_get_sweep_index_from_volume


Synopsis

#include "rsl.h"
int RSL_get_sweep_index_from_volume(Volume *v, float elev,int *next_closest);


Description

Return the index of the closest sweep. Also, returns the next closest sweep index. Use the index returned, if called i, in v->sweep[i].

Return value

Upon successful completion, a valid index into the v->sweep[i] structure is returned. Otherwise, -1 is returned and *next_closest is undefined.

See also

RSL_get_sweep, RSL_get_ray
Author: Dennis Flanigan Jr. rsl-v1.43/doc/RSL_get_win.html0000644000102200007640000000305311410174762013157 00000000000000

RSL_get_window_from_...


Synopsis

#include "rsl.h"
Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim);
Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim);
Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim);

Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range, float low_azim, float hi_azim);


Description

RSL_get_window_from_radar calls RSL_get_window_from_volume for the number of volumes.
RSL_get_window_from_volume calls RSL_get_window_from_sweep for the number of sweeps.
RSL_get_window_from_sweep calls RSL_get_window_from_ray for the number of rays.
RSL_get_window_from_ray gets window, between low_azim and hi_azim (degrees), from min_range to max_range (km).

Return value

Upon successful completion, a pointer to the appropriate structure is returned.

See also

rsl/examples/test_get_win.c

Author: John H. Merritt rsl-v1.43/doc/mike.kolander.html0000644000102200007640000000034006600002412013505 00000000000000 Mike Kolander
Applied Research Corporation, Landover, MD.
kolander@trmm.gsfc.nasa.gov.
rsl-v1.43/doc/RSL_load_color_table.html0000644000102200007640000000635206653365502015023 00000000000000


RSL color table routines


Synopsis

#include "rsl.h"
void RSL_load_color_table(char *infile, char buffer[256], int *ncolors);
void RSL_load_green_table(char *infile);
void RSL_load_blue_table(char *infile);
void RSL_load_red_table(char *infile);
void RSL_load_refl_color_table();
void RSL_load_sw_color_table();
void RSL_load_vel_color_table();
void RSL_load_zdr_color_table();
void RSL_load_rainfall_color_table();
void RSL_load_height_color_table();


Description

These are the color table routines. The color table is use when making images and is merely 256 bytes in size representing red, green and blue color indexes. The routines RSL_load_refl_color_table, RSL_load_sw_color_table, RSL_load_vel_color_table,and RSL_load_zdr_color_table each call the three routines RSL_load_red_table, RSL_load_green_table, and RSL_load_blue_table with a hard coded (defined during software installation) color input file. Under normal usage, you only have to call these routines once prior to any image generation function calls.

The routines RSL_load_rainfall_color_table and RSL_load_height_color_table use the default files defined during installation. These routines exist to simplify the interface when generating height or rainfall images.

The default input file names are defined in volume.h. When you don't want to use the default color tables for reflectivity, spectrum width, or velocity, and have your own color tables, you can use RSL_load_red_table, RSL_load_green_table, and RSL_load_blue_table directly. Be sure to call all three routines. The most general of the routines, and one you should not normally use, is RSL_load_color_table. It manages a static global color table array and it is how the color table is remembered throughout your application.

The organization of the input color table files is binary. They contain, at most, 256 bytes with no delimeters and represent the color ramp from index 0 to 255. 


Return value

None. 

See also

RSL_sweep_to_gif, RSL_sweep_to_pict, RSL_sweep_to_pgm, RSL_sweep_to_ppm,
RSL_bscan_ray, RSL_bscan_sweep, RSL_bscan_volume,
RSL_volume_to_gif, RSL_volume_to_pict, RSL_volume_to_pgm, RSL_volume_to_ppm,
RSL_get_color_table, RSL_set_color_table.

Author: John H. Merritt rsl-v1.43/doc/RSL_sort.html0000644000102200007640000000372406600002411012501 00000000000000


RSL_sort_...


Synopsis

#include "rsl.h"
Radar *RSL_sort_radar(Radar *r);
Volume *RSL_sort_sweeps_in_volume(Volume *v);
Volume *RSL_sort_volume(Volume *v);
Sweep *RSL_sort_rays_by_time(Sweep *s);

Sweep
*RSL_sort_rays_in_sweep(Sweep *s);
Volume *RSL_sort_rays_in_volume(Volume *v);


Description

RSL_sort_radar calls RSL_sort_volume for the number of volumes.

RSL_sort_volume calls RSL_sort_sweeps_in_volume, then calls RSL_sort_rays_in_volume. This yields a completely sorted, by elevation angle and by azimuth angle, volume.

RSL_sort_sweeps_in_volume only orders the sweeps by elevation angle. It does not sort the rays by azimuth angle.

RSL_sort_rays_in_sweep orders the rays by azimuth angle: 0 through 360 degrees.
RSL_sort_rays_in_volume orders the rays in each sweep by calling sort_rays_in_sweep for the number of sweeps. RSL_sort_rays_in_sweep sorts the rays by azimuth angle placing the the smallest azimuth angle first. The input volume or sweep structure is modified and a pointer to the newly organized structure is returned.

RSL_sort_rays_by_time orders the rays in a sweep by time.


Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

Author: Dennis Flanigan Jr. rsl-v1.43/doc/david.wolff.html0000644000102200007640000000105707630706313013212 00000000000000

David B. Wolff


Science Systems & Applications, Inc.

David is the TRMM Ground Validation Program Manager. He serves as the leader of both the data processing and science support teams at NASA/GSFC. He began working with the GV group in May of 1988 after graduation from Texas A&M University.

E-mail: wolff@radar.gsfc.nasa.gov.
rsl-v1.43/doc/RSL_ray_header_struct.html0000644000102200007640000001113411564577116015243 00000000000000   
typedef struct {
  int   month; /* Date for this ray; month (1-12). */
  int   day;   /* Date for this ray; day (1-31).   */
  int   year;  /* Date for this ray; year (eg. 1993). */
  int   hour;  /* Time for this ray; hour (0-23). */
  int   minute;/* Time for this ray; minute (0-59).*/
  float sec;   /* Time for this ray; second + fraction of second. */
  float unam_rng;  /* Unambiguous range. (KM). */
  float azimuth;   /* Azimuth angle. (degrees). Must be positive
                    * 0=North, 90=east, -90/270=west.
                    * This angle is the mean azimuth for the whole ray.
                    * Eg. for NSIG the beginning and end azimuths are
                    * averaged.
                    */
  int   ray_num;   /* Ray no. within elevation scan. */
  float elev;       /* Elevation angle. (degrees). */
  int   elev_num;   /* Elevation no. within volume scan. */
  
  int   range_bin1; /* Range to first gate.(meters) */
  int   gate_size;  /* Data gate size (meters)*/
  
  float  vel_res;    /* Doppler velocity resolution */
  float sweep_rate;   /* Sweep rate. Full sweeps/min. */
  
  int prf;          /* Pulse repitition frequency, in Hz. */
  int prf2;         /* Second PRF, for Sigmet dual PRF. */
  float azim_rate; /* Sweep rate in degrees/second.*/
  float fix_angle; /* Elevation angle for the sweep. (degrees). */
  float pitch;      /* Pitch angle. */
  float roll;       /* Roll  angle. */
  float heading;    /* Heading. */
  float pitch_rate; /* (angle/sec) */
  float roll_rate;  /* (angle/sec) */
  float heading_rate; /* (angle/sec) */
  float lat;          /* Latitude (degrees) */
  float lon;          /* Longitude (degrees) */
  int   alt;          /* Altitude (m) */
  float rvc;          /* Radial velocity correction (m/sec) */
  float vel_east;     /* Platform velocity to the east (negative for west)   (m/sec) */
  float vel_north;    /* Platform velocity to the north (negative for south) (m/sec) */
  float vel_up;       /* Platform velocity toward up (negative for down)     (m/sec) */
  float pulse_count; /* Pulses used in a single dwell time. */
  float pulse_width; /* Pulse width (micro-sec). */
  float beam_width;  /* Beamwidth in degrees. */
  float frequency;   /* Bandwidth MHz. */
  float wavelength;  /* Wavelength. Meters. */
  float nyq_vel;    /* Nyquist velocity. m/s */
  float (*f)(Range x);       /* Data conversion function. f(x). */
  Range (*invf)(float x);    /* Data conversion function. invf(x). */
  int   nbins;               /* Number of array elements for 'Range'. */
} Ray_header;

rsl-v1.43/doc/RSL_volume_to_carpi.html0000644000102200007640000000303406600002412014674 00000000000000

RSL_volume_to_carpi


Synopsis

#include "rsl.h"
Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r, float dx, float dy, int nx, int ny, int radar_x, int radar_y, float lat, float lon);


Description

Produce a Constant Altitude Rectangular from Polar Image at h out to the maximum ground range grnd_range. h and grnd_range are expressed in km. The dimensions of the Carpi are given by nx and ny. radar_x and radar_y are the location of the radar within the Carpi structure (the rectangular grid). lat and lon represent the lower left corner (SE) of the rectangular grid. This routine first creates a Cappi. It allocates space for the resulting Carpi when it calls RSL_cappi_to_carpi.

Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned and errno is set.

See also

RSL_free_cappi, RSL_cappi_to_carpi, Carpi, Cappi, RSL_new_cappi.


Author: Mike Kolander rsl-v1.43/doc/RSL_volume_struct.html0000644000102200007640000000054606600002411014424 00000000000000
typedef struct {
  Volume_header h; /* Specific info for each elev. */
                   /* Includes resolution: km/bin. */
  Sweep **sweep;   /* sweep[0..nsweeps-1]. */
} Volume; 
rsl-v1.43/doc/RSL_get_ray_above-below.html0000644000102200007640000000257506600002407015436 00000000000000

RSL_get_ray_above
RSL_get_ray_below


Synopsis

#include "rsl.h"
Ray *RSL_get_ray_above(Volume *v, Ray *current_ray);
Ray *RSL_get_ray_below(Volume *v, Ray *current_ray);


Description

Returns a Ray that is either above or below the current_ray. The elevation angle is extracted from the current_ray and 1.0 is added or subtracted to/from it and the function RSL_get_sweep is called. This algorithm is simple and may not be robust enough; it has already been inadequate for the GT quality control.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_ray_from_sweep, RSL_get_first_ray_of_sweep, RSL_get_first_ray_of_volume, RSL_get_ray, RSL_get_sweep.

Author: John H. Merritt rsl-v1.43/doc/software_but.gif0000644000102200007640000000325306600002413013276 00000000000000GIF87adÄÿÿÿ­¥Zƽ9ÿÿ½½ÿ99{kkÿRRÿ99µ!!Œ11Î99ÿ))Î{!!Æ))ÿRc{Œ­ÆÖ÷)!甌ÿJB­RJ”ÖÎÿ÷ïÿsk{,dÿ`ÆÆÂ,K²8Gâ¬Éñ$Yv` Ží9ª;; &ƒq V|•0‡ƒ¡ôØ1Ô+z]AŒ*ÓPHNЙHF2–B$Ã2Tõ´xÜrrY„%&Y''3I QQ €ƒ(2–Q=}IY © V o €”}œ|Šƒ–>(¾”a&o5 vÀ¯r'~z‚•¯•„¯ ¦¨+ .9 ;ÞV¡:EßëêíVò/9REÞ¡ýßìºó÷­ž ²AXEK (H´ „ ,T¸ÀñÁ…íUØøQEŽ)ÿ>ÜXÏc.hB‰$M{ö0¢Ä④ʑ&L ᑎ+/œ`¡Æ“=z\ðЧêsAeI—24nZ S*!ž· aAiV':¡D“)ð¦1f× ^fDy2+F•=ibt0Á"ȽW/p £Ô²ûdÑC¶ d·,&” HÐÈ‘)hÔÙQžR ðº+i—4Є¸÷ãTÅw³*Û–æm|!BÄK› €þ]9û‚¢K¾áeéåÈöØ—v×ÊnG—& T8D׮ͫ'ŽMžäÁÏw%d!ûtÕѽ•¤):z`lÀflå6y Æ—ÿO ÷Y]$j=HRFIçA&QWMI•×l¢©5‡ØI.3•M'~V•p2–'‘„ô\U#=Xv”ö€%hÓU €FLçzé ÈQŸo jô yìEH!å]ÇVvØsR &€G]”(U`":aAMàGè‘]é w¢ƒDI€3ÉX`$0g™{Iô€œ~Ždh6@eb(‚ºšGö)™E«®.Ð$#åUÞŒÃ!TN„PòdUZ…Ò}Žêhö‘(4©ßÙåÔ¤4ɧÿŸ@§]v\ í©Õj§Á¡4c‚†Ó€{>ÈCšbdÍïÔÕ£$´ÎzÒ%b¤,´Ææ^àA¤^€@‰¨‘”%TÃQ¤AR˜…=”R%” BWAvA§ft¨<ÀIþ)ÁøùNt)À5€lï(ŠYS1Ó¤‡Éw€ç®¾€f4Ÿ©—Œ>"’=¨F$Ù7b…ÿTq9I£L0à) ˆb€ G£ "¼Ø*/`EAþŽÙ±@ÈPò¢ÂäàåñFAÀXÂ|Æ)Œ GQ&æQ†T^0±”#.@Hà2¡%)4%ïT)¡HèØŒ+W©ÊTº²•pi”)S‰K¢,$B)tT86ŽU޲[׺àEHBÅ!JïÖÕ¨j'Øøå3ÐÌ]M³QíÁ6"¤ÌÍPSÍ\ÈB¨™@*1Ø 9  œÎÄÑf¸«kŽS!Tg7וFôŸÙ§5ÃyÍ_ú2–ü,€ ×µNŠ6 ˆ€ˆrÎgB0Óœà3aqÔyQl¬ ™M'5ÊÒ…n3!ê4i„BO@J HiN)zÓD !;rsl-v1.43/doc/whats_new.html0000644000102200007640000002441211747614400013005 00000000000000



 
 

What's new?

Version 1.43:

Mostly bug fixes. See CHANGES.

Version 1.42: Bug fix.

Changed scale_factor used for storing differential phase (PH) in UF from 100 to 10. The usual scale factor of 100 caused values over 327.67 to become negative when converted to short integer.

Version 1.41 supports WSR-88D Level II Build 12 format.

Version 1.39 supports WSR-88D Level II Build 10 format.

Version 1.34 supports WSR-88D Level II Build 8 format.

RSL can read both the old and new WSR-88D Level II data format.

Version 1.33 supports WSR-88D Level II Build 5 format.

RSL can read both the old and new WSR-88D Level II data format.

Version 1.25 release (what's new since v1.24).

Merged changes from version 1.24.1.  Also, HDF routines are back as not having them in the library caused more problems than it was worth.  But, the most significant change is that the entire package is configured by the configure script (provided).  Building the package is done in two steps.  This is a dramatic improvment over previous releases.

Version 1.24.1 release (what's new since v1.24).

Removed the HDF component.  Those routines are now part of gvs, where they belong.  However, basic support in RSL_anyformat_to_radar will exist for HDF -- it will still recognize an HDF file and call RSL_hdf_to_radar.  RSL_hdf_to_radar is located in gvs/gvslib.  To configure HDF into RSL, specify -DHAVE_TSDIS_TOOLKIT in the Makefile.

Added project[24] to the radar->h structure.

Version 1.23 release (what's new since v1.18).

RSL now accpets the EDGE format.  KDP definition changed.  It now normalizes the value based on the radar wavelength.  A bug in the RADTEC ingest routine was removed.  Other than that, mostly bug fixes that were very minor.  Added RSL_set_color_table and RSL_get_color_table.  These routines permit better user control of the color table.

Version 1.18 release (what's new since v1.15).

This version adds the RADTEC format ingest routine.  See RSL_radtec_to_radar.  RADTEC requires the use of the PKWARE Data Compression Library, available from PKWARE, Inc., http://www.pkware.com.  Also made several minor bug fixes and the image generation was enhanced to allow generation of images out to the range specified.  Previously,  image pixels were 1km, now they are range/radius.

Version 1.15 release (what's new since v1.14).

This version  adds  the RAPIC format ingest routine.  See RSL_rapic_to_radar.  A data truncation bug was fixed in the UF ingest.  This bug only affects the velocity data.  The Lassen ingest no longer depends on (radar->h.name),  for calibration of Gunn Point data.  It is now done based on time periods of the data.  Please see the CHANGES file for more information.

Version 1.14 release (what's new since v1.11).

This version continues the minor bug fixes to the HDF component.  Additionally, it includes calibration for the Gunn Point radar, in Lassen format.   The distinction of Gunn Point data from other lassen data is done by assumming the radar name (radar->h.name) is 'Gunn_Pt'.  Please see the CHANGES file for more information.

Version 1.11 release (what's new since v1.8).

Version 1.9 represented a bug fix to the HDF component.  Version 1.10 represented a minor
upgrade, mostly to the HDF component, but, other areas were modified and that's why it is called an upgrade rather than a bug fix.  Version 1.11 represents a minor bug fix release from v1.10.  It only affects the
HDF components.   Please see the CHANGES file for more detailed information regarding what changed.

In version 1.10, ZDR color tables were modifed and a first draft of the South Africa data format ingest routine was added.
 

Version 1.8 release (what's new since v1.7).

Added RSL_read_these_sweeps.  Specify specific sweep numbers for ingest.  This drastically speeds up ingest, if you're only interested in the first or first couple of sweeps.  For example, making base scans images.

Added RSL_load_zdr_color_table.

More HDF mods; more warning messages.

The TRMM Office has fixed several bugs in the TSDIS toolkit. For proper HDF creation, that conforming to TSDIS HDF specifications, you will need toolkit 4.5r1.1. Toolkit 4.5r1.1 is an unofficial release; the TRMM office will pass this out upon request.
 

Version 1.7 release (what's new since v1.6).

This version fixes the lat/lon signs.  Also, lat/lon are added to each ray for UF when extended headers are available in SIGMET files.  Also, the HDF component has changed.  This affects RSL_radar_to_hdf and RSL_hdf_to_radar.

Version 1.6 release (what's new since v1.5).

This version of RSL will work with TSDIS toolkit 4.5r1.  UF now has lat/lon stored for each ray, suitable for moving platforms.  Also, the wsr88d code does not default to KMLB.

Version 1.5 release (what's new since v1.4).

The HDF component has changed again. This version of RSL will work with toolkit 4.0 or toolkit 4.0.1. Version 4.0.1 is an un-official release of the TSDIS toolkit. This version removes the temporary files created during level 1 processing. There was only one file that changed, the file may be obtained from the TRMM Office, upon request.

One minor consistancy check was added to the wsr88d ingest; it checks that the number of bins in a ray is reasonable. This problem usually manifests itself from bad input files.

Version 1.4 release (what's new since v1.0).

The HDF component is in a state of flux. The TSDIS toolkit keeps changing -- the interface keeps changing. The TSDIS toolkit is, in the TRMM Office opinion, not stable. Their latest release is 4.0 and it has fixed many problems. One minor problem remains for level 1 processing: temporary config files are not removed when the toolkit is closed.

RSL is incorporated into a larger package called GVBOX. The latest version of GVBOX is 1.1. GVBOX is a complete ground validation system to generate TRMM GV products on pentium PCs running Linux. GVBOX is available on CDROM.

RSL is now LGPL-ed.

Added the routine RSL_select_fields to reduce memory requirements upon reading data. This works very nicely for LASSEN data where the number of fields is large, however, only 2 or 3 are needed.

Version 1.0 release (what's new since v0.45).

Version 1.0 marks the jump from the previous stable version, version 0.45. A few very minor bugs were encountered and repaired. But, the bulk of this transisition is improved documentation with the addition of a Users Guide. Additionally, the SIGMET ingest was repaired and can now read version 2 files, HDF I/O was added and the LASSEN ingest modified to read version 1.4 files. Version 1.4 LASSEN files were used during the MCTEX experiment. Other than that, no major modifications were made. Technically, version 1.0 is a minor upgrade to RSL 0.45. But, due to the witnessed stability of RSL, it was decided to call it version 1.0.
 

Can read compressed files automatically (new since v0.41)

Transparent, to all ingest routines the capability of filtering the input data file through the GNU gzip program for decompressing the file has been added. This feature does not appear to slow the I/O time and, in some cases, especially on 486 pc's, improves overall throughput time. Two generic, internal routines, have been added: compress_pipe and uncompress_pipe. Each routine takes a FILE * and redirects it through gzip. Each routine returns a new FILE *. Wsr88d files occupy 1/10 the disk space when compressed and the TRMM Office plans to compress wsr88d files to CDROM and 8mm tape for overall throughput savings for the production system. It will no longer be necessary to decompress the data before processing level 1.

Similiarly, UF output can be saved using the gzip filter. The new routine added is RSL_radar_to_uf_gzip which utilizes the gzip compression filter.

Can read stdin (new since v0.39)

A new routine is provided called RSL_uf_to_radar_fp which takes an open file descriptor and returns a radar pointer. That file pointer can be stdin. This special interface syntax, for the UF ingest, is an exception to the interfaces that the other ingest routines have. All other ingest routines, including RSL_uf_to_radar, have been modified to read stdin when the input filename is NULL. The complete list of routines is: RSL_wsr88d_to_radar, RSL_nsig_to_radar, RSL_lassen_to_radar, RSL_uf_to_radar, RSL_mcgill_to_radar and RSL_toga_to_radar. The only routine that will not accept stdin will be RSL_anyformat_to_radar. That routine will not be able to handle reading stdin because it needs to read the first few bytes of the file to determine which ingest routine to call. If you plan to make a filter program, you'll just have to know what file format you expect: UF, nsig, wsr88d, etc.
 
  rsl-v1.43/doc/RSL_radar_verbose.html0000644000102200007640000000137610012477607014350 00000000000000

RSL_radar_verbose...


Synopsis

#include "rsl.h"
void RSL_radar_verbose_on(void);
void RSL_radar_verbose_off(void);

Description

Control the verbosity of messages while using the RSL. After calling radar_verbose_off, the default, the library is quiet. After calling radar_verbose_on, the library writes to stdout informative messages about the current progress. This is useful when using the RSL interactively, since some of the functions take time; it assure you that nothing is hung.

Return value

None.

See also


Author: John Merritt rsl-v1.43/doc/changes.gif0000644000102200007640000001036006600002412012176 00000000000000GIF89a¤2ôÿÿÿ½½½!!!„{{ÞÞÖÖÖÎÎÎÆ­­¥””ŒŒŒ„kkcRRJJJBBB999111)¥¥cssB””JRR)œœ9{{)ÆÆ9œœ!çç!½½ÞÞÆÆïïÿÿck),¤2Dÿ Hr Çp¬‡‘i°Ã` q‰1ÛήZÇJð7˜é€&З"u: u³hU²ˆCJ¥@†6Ä tH,q5h;p†®­'jP  Cm'  k‡ˆŠ ”‹“’Q ‡ž€’k ‡ 5 š˜ n‡£ Š k¯–° P‹–žˆ’ ‹njµ ŽŽŽOŘ Á¸ ž¦n¶ Á M(“訪 ¦’k–ÑÖÁ”ªˆ jn¦þüu€°@ƒ@ "Lè5`A<@¨dÊÁ¤W Äy(!ªFj˜1ƒáR¢R=ÿkH©UƒhˆX´Ï ?RAà„²_Ì€¶ƒ„k'Ôð ­\ <¬0¡B… ­¨ð_¢ÎU¼Ë›TÕ°õpX£mЍúàp9…¦PZ3ó0— :[+6 梨UÆ)S-ζ?»FT±o¢œg ”(qÁŠ 0%S±QÁ"{;4Z4°f™½w7z¸ÏQÔm.‡Ãõé’Ãåœ|iášÚ³ØµVÕòxŠé€Î¨:?¢Yßx\¥ø_#,yÞC²5âÿ'³ ÒÐ6ÑlåN#Á `TØ“ad˜ÀôMC¾E“È.Ø(s …®Q8 sň –sÁíãŒfÀ)vuD‘ST"ŠW\ŒB6ŽQä¹Xq„ÓY"ºéX¤sû¤W”T$•Î79XBwc–ÈqÆX”‰Øä8Sþ†Ø3<1(BÌ€Æ /ü4à vj(Ì`Ã& ª‚LØ©D …)&ä€Ä u6Ú‚(¸ E v¶Áà L¡Æ¦…¢R rª*ÊDœEyžPC/á H XtÉ“Ìd;˜òëE¶˜×€%­ôòÓ²k8XKíÜŠ€ÿM…ã,9­Œ6 >Ê|ë "Ý"L¬–¼—å2—IRâ!ÎìšdÖìqlš‡cäÒë7Ò=¸fè,­Lƒ‹W…å ´åÁy—?0 A?þh Á\Pü•@4àph|²$“G .‚ ;‹@¡ßŠ!QU‚2Uäåa%¼ç|·N’eP¯<„ ƒ.×à ÓÊÌ@a$o°Y‰ÜÁj‘|ÐÇþdpWð~uíO¯Z tÁaT ÄÁÅTà^I`͵Fo‡O–ŸÈ$ ᥓ6=âÑ5 8“7ñ¦F*VTÂKÎ\{ sšHÂl#¦<äÿKMÒÞ!EacM*üÉ÷L¯é!WLj»-ûÊjáu:8õôÐ3Ÿ8G }ØÔŒ-Í-ÛÙA;Ñä²×(=gFãcgÃ…Ó¢8èÙÒ™fä¨ÉÎa ÒŽM7ýŽÁ]/äI[ F$;ì©™CÎ-¿<˜JBÙäÕ[²Ñrzà %Æ[^  „ Ä P`ªÁSHYB^p ÆÀJxà1P€’PzÊÓ V8ˆè SHPŠ …K‚=tá FEÂ$À„4¬ Zp…°JBCÕBN€³ØáâQŸùLñžÃJT®BŒ)¨â1W)‚Q ÿ5¨ïˆÂðPÑ Úlcqž»Úà zØj>èÅÌSŒËÄá1ô²U V¤Žìª0#7q€DäLù"UfG!kˆ®>S‘jæ“¥nð$Æó„-ˆñEÀ‰Bî83îÓ!2ÞGrb ‡žðv”ÑB–,#3>áI˜5Eõø¤5¶Áé‘\ÄiRo [ÙŠ¥aÉ0ƒ5›>2ƒŒØÛl,€`€S75°@¡ šf24‰H¼òšù`Ã.¡U‰vVæÌÃë4q —\ãÇð„|,¢†-.ã ÊûÄÕ·$¼Ÿ¤ DA‘&W”%û˜íjq†ýÿE,!óš@Á°¹(€c"…ØÉ¼V‹¸ùãni,¬§Q£– O‚Ž+Ú"Ð}öá#fþ4 Šº±ŠÐ…nŠòzI+ÆS/r €a‰†)ê"®ú#Õ# É$"rÎ…Z»˜?@™ºqƒÌÂŽmÔ@éÕ>Ñ’JÌN“µ¤ozŽÆ@ ´Æ5<© <±±CeD2»Žä{Áš?Îb–±E@bc[Y€Ùlv{ij;àÕŠö+XH<ЫÙjÄ;—¹H^rÜ>A©<[Ñy`Ç(N<è0†&f±Œs} ŽÅð"%Á ¼evÿFz]‘®”åx€8ØJ->àãjz)¨³,Ú¦©W=²Ø4“ l0©%¿ðCRýðŠVPÑAe¼ÙŠœAxaSÃÔ =â³XH·-©G&vÙ»×µŽ?ÅŽ3d£2u†¢ÊùÍ3‚Ä W !þz„Èâ@ÇÔáö†C”«éæ&¶,™ƒ I\ÉdRŠ6A §9"i’QÆ.€9Ìà•!Äñˆ±a m1eB úN£õ«çÎSÍ)}ñ?¾¶„;Ü•G"ÑßáÂ=QCxþÀÜpÐb«Ü !DjBX±€î=dÒ¬èÚòÈ„¾Ä}À4ž™Ì§Aÿ‡‹¶"ÈÀ u"É3€·"âÌxÝ2qZÒ¤g¬&”8q(–ÕéÒŠiÄVfUŽÉJû(¯sfå™êEÉ3=JLvÙ+œôÁ.|7:R’ŽÄ#ø&ØÏ t‚#fçÈ€Ô.ïk¢´øÆ(I¥Îq¤ˆêg€ØHE@©0°ÁNxˆTJe'>VC­ë‚'xA)›š  @*lJ…Ú!{¼' ¸A…I¡`†ø¨À› PA»Ã°”æä©?<Ç p°„páHèÓ ¹$F|ˆG¨·žø½r# üîÔʹt O88ìÊÿ8qPyj†LèàÍÏ‘¨Ó{è=à,XB ’$#äpˆ6w qˆÁ]a‘  RÿÉ)ΉvÚ¬Áìw¿ÊR衃;‘‡ §èÜ$RÀ²+ ŸVpцSUá1‚9,‰°ÎQ^¨Ý!, ,j.œÞú-z1 Æ‚Ôkh0…zB/Š\^¼óçhÝ~æDŒ†IKtà‰‡€.WÆ ó›ýKŒ‹ì®!²D•“a°øù¦h3<ÆÅ’\ÒxÞ¸·zb&R^–0–‹“ÔPCŸõ³^%„‘ºÙ„¢ÎA²–u[Å\è*n0u·,´ÊjøäDK%¥à3ÿÞ##.DtÐ, sÕ‡-ÀÀGºu"â•VnÈ÷wׂsÆ!¨Ì @YÆp::!J«Pzg”¼G8çÕ_Ôp+JÃÆÃâÇÔXd–L¾‘'FäajýT«: /!:‰°€£A [AaÕ· Ä!g§Ð!1 íÄc¢+Òs;£ÖGÑ {Ôj°Gã· _G¸$ ²Q ÝàJ¾rÓRz·V”âobð,½W% ¢Ã ::±0"•½ÒM_Õ_S¦ ×0îð8ÒÓˆ± o”S û€|´àNÒ$ÅàõØ ÝŠ43j¿À;á!¬¡ÿ¥‚og c( “#«0…HÒK¢2b‘ £5ð +¥6dƒ@LkA5‡ˆØ W@q“Ær;)fgKHj°ˆâ53€s‹• HÃ2 D/Ó_ïq´¢0- "J=5 ¥5S àQ ƒȨ(¥  1$ÓȘ #N¡V%Ã8Ç3gd~W‰ÑõF Õ ”æ"[!$4tK2 Ã\W!É’ v@e;…V{‘¯°vaé5 ㉌pA2 p2@5PPД¦ q&3³A9µ§õÓ{lXMØó#ÿ°0à2YBƒ`(Qýäm"aF±0Z#`p YàvñPRþ°1k¡VàU[Ó2ùHN°t7 Ü£ËB.Ë dëÄ £áØ43õâ4³VÁ’„,<33ô’‡Þð8f¨dò‘V'Sp)—96¬‰1¡56{i$ƒ6{±ZoQ­Um:@Á ­á4ìä ›ð pÏP×” ¥°#œqB b+õDhÀDeÚ ôÁO±À ‹y '³TÃ5½É0àYZ3zék1sqZcãxq“Ÿa“Z 2@ ôÃF´dI¢ÿIC¾"ÊÔ>7Äè@?¡ÀY"kÓb„Ó ¥P<2ÙS ÑØ ‚Ñ`¤å¢¡Åž$Ê—jŰÓ(ãÐ6b6^xs—Ygì ¨ˆ×1UÐEØ`$ DRá¢; =ÃóL60Q½¢Pò<_‚50fb&¨3À©.21ÿ¾é%ÎñÚòäu P"+>Rmöá¡hüñ/¢ PÝò‰ß‡FB—.èøÇ<â~ aJSF§PiTA¿#n¿i>ö§Ìðb÷å¡Å±m-’nÅA^ú1lT ŠY^-²¾ ¦j$z@‘ÆŠ€Ð&!ø¤I¶&ªá¡Ç³?ËÁ0!,|“óqO¯¡=ÀCJÀ‰€_„tIÉåŽ/Ècµi¢Ä<µ ¾ Ô8¥‘_Ÿ$ ëä_ºõ:ŠÙ£À±‘ 6A ”ãHå-xÕjkÖ È×\ñ²iDEMÀnÇYá,¬äT‘…Tñ¯‚C,ÿ L9õw€DfýE 5à+Ì剾×XA‚|¯Û±JY¥7Oþñ”%ò ÷A?=²q˜Ò˜?ûu§ ÿB‰1!Á2«Ó/Žñ/Á}€À3Š P“cöç{1áW}D¡2Ñ£±„cß0¬ô‘昰7²ø¥ c [ä”é“% `Lp ½ò.2xc[㉑ÆQ|ˆªÿ’&ãs5±©SiY¶ÎÇ]¾Á ¶3OÝ‚4›F¹§ç‰í`[!=1Ѳá˜@L# JuMÎ0TMbmÐ9É$l¿AŒ±¤ÁÀ#¹Ql#óãÊ”³v5êó¦è±¼ËA`ú³¹¡Ës7RjS²Lèq$œ8åšN‹ª%ÂjX)ü³%¶Ã<›À†‡±m1#Pb¿ˆñm½aÞCý»Lu¶¿ƒ»,Þ‹¬LR=Ù›Là†#¢íãbŽ I¹;¹«©üË#è±lE¢lÊ{–`_gò=ƒe½]¢#¦¼WB#3ò>BÀA"•ñ+mæEmíû<‹Q±ʼÉÖ#9ò#l"%ÀAá€$@

RSL_get_histogram_from_...


Synopsis

#include "rsl.h"
Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range);

Description

Load histogram with the histogram from a Ray, Sweep, or Volume. If histogram is NULL, then space is automatically allocated by RSL_allocate_histogram. Notice that a histogram pointer is passed into the routines. The argument histogram is used as an accumulator. For instance, getting the histogram for an entire sweep involves getting the histogram for ray #1, then adding the histograms for ray #2 through #n. Although, the argument histogram is modified, a pointer to that histogram is returned so that the function interface, that is commonly used throughout the RSL, is maintained.

Return value

Upon successful completion, a pointer to Histogram is returned. NULL is returned if an error occurs and errno is set.

See also

RSL_read_histogram, RSL_write_histogram, RSL_print_histogram, RSL_free_histogram

Author: David B. Wolff rsl-v1.43/doc/RSL_get_first_ray_of.html0000644000102200007640000000203006600002406015030 00000000000000


RSL_get_first_ray_of_...


Synopsis

#include "rsl.h"
Ray *RSL_get_first_ray_of_sweep(Sweep *s);
Ray *RSL_get_first_ray_of_volume(Volume *v);


Description

RSL_get_first_ray_of_sweep returns a pointer to the first ray pointer in the Sweep structure *s, if one exist. Otherwise NULL is returned. Similiarly, for RSL_get_first_ray_of_volume; it finds the first sweep and returns the first ray of that sweep.

Return value

Upon successful completion, a pointer to the Ray structure is returned. Otherwise, a NULL pointer is returned.

See also

RSL_get_first_sweep_of_volume

Author: John H. Merritt rsl-v1.43/doc/RSL_get_value_from_cappi.html0000644000102200007640000000130306600002407015660 00000000000000


RSL_get_value_from_cappi


Synopsis

#include "rsl.h"
float *RSL_get_value_from_cappi(Cappi *cap, float rng, float azm);


Description

This routine uses RSL_get_value_from_sweep to get the value.

Return value

Upon successful completion, a valid floating point number is returned. If no value can be found, BADVAL is returned.

See also

RSL_get_value_from_sweep


Author: John H. Merritt rsl-v1.43/doc/hot.gif0000644000102200007640000000076406600002412011367 00000000000000GIF89al-¢ÿÿÿù:!ù,l-ÿºÜþ0ÊI«½8ëÍ»ÿ`(Ždižhª®lë¾p,Ïè`ßø½ä¼=ã DÈŽÈd`°S:™1Ûê.‡Æk#‡Ìíp]â+«­v‡ç`Z==é&dêv=océÕ¬Ïd”?¬{[z~ €„MS‡ˆe%}px‹Šq“”!RŠ‘hvf—E¡zŸ¢§›lŒ © €¦u²¨´E•wKš7£…®¿¬µ–‰ÄÂy<V‰bˆš¥œ»¸œÇ_da~×NÇ}Ϻj¶¨º=`ÀËåßÖq^fÒÕ¿»çÛôI’ƒPèy¾Žþà”†ºC†ï—oÕD\%oÚ—KÙ=zÇѹTÃy®4zbeTGp+b •‘ß¼“hTš;W$·iú6Z‚©l!5[9ë¨ 6³P8k”Ž•É-L+’NiÊ[QSBŒ-;ý£QU•¡‘²¥(Hi³[Jiú *4Û ‘ùLtÆÆ[ÃkïX¾•êÓj¿­FÁê)Œ 6*†™bwðg&±‚YBÒöd½Å˰Ñ6€À¾jƒ?c6ˆôdí’¦.ûì4j°cËžM»¶íÛ¸sëÞÍ»·oØ ;rsl-v1.43/doc/rsl.gif0000644000102200007640000000422206600002413011367 00000000000000GIF89addõ 999@@@Q]_iv dAAAIJIMLLRRR~~~Žš§³ÌÙåòÿ¶a›¨´" "ÍÙæòÿ#ÿÿÿŒ*ÿœ+ÿ«,ÿà ÿÚÿÿÿÎ/ÿÔ# («;Ç7ÿEÕNãXñ•ÿ!þ' Imported from GIF image: dz_small.gif,ddþ@€pH,ȤrÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~ÏïûÿV€ƒ„F‚…^‰Y‹’ŽNˆHš–R¢a‹rŸ¤¨§ ­]•o”¤£½0È_0t±²›ª » Fš§¾½©¸ 0žÚHēĔ/ÏéBšÂ©¸Ìs°Œ/¨é;BI5JÄ4€á³˜Jb4à„šk „N¸Ò­š%ʵdñ €œ‡Ë"p±ÀÄÀ¡€þ-"‚D‘ 'ñÁ¼ &»…eÆ,0>  áÅÀ‡ ›Š˜"'²b漈á ¤ˆVnñpBƒ^œ(± Uþ:ɋ쌓 nsðBP¾(ñ${*ʼn^Nx± \!þÊ!SÕ€pçcKàR+/†Ô2F Ò]Plø0BŽ^Yá©RÎ`jlNŠêLLñS'Ÿ3#Bî—6TI ¸ƒ´ÃâÙŠIÊà$ä絇@@°eDn ©ø‚N‰íÙ:ù¸= ¡“Øà*h€°- ˆN2ó¼ Lñþx% 0à¢I6MÄ X ” E p‚ ÖÁ ÀcT3<Ú9Y$CgÝ•Ta'‘ ¶˜¸‰F„ Å(´P‚ )| ‰M%䥞—¡A ÌÐÈ€E)D 3¤¤Dˆ†™ÐB€€B dp ÂG‘ƒÔG±g–Ž£•%6 4I(`CE ˜ºˆ¢) ðQgÈLA 0Èð@ ÔÐ] iËq I‘€´ ä |0Ác-°0A¸\ þ`Ÿ/Ø\2Ô æP(l{…T– .”p‚@½ðÁ1îtÚ 0hmwå%ëÁ2ÄÞ& ÀÁÅU ‚ #ŒpB8ã,ü ž7À©_ò’A ´A9Á *4¼ +¤P‚c Ë!˜`@ ðþ¸CƒCÌv7¶˜ÇD0LÜ`C &T ß%PàB ‚0ãi 1|€Ñ¥!à–L'¥Ö&ääT޼° 8l°‚“dàA Œ k-"D0‚Ähù€ÈRH¤Q…'7(êÄ +€@ÎÞ€ƒ dna«$âþ&ÙʼnɵÂI20ÐË'jP3Ǫ-±dðÁxш 3Œ`‚®äí€Q©@©@JKR4|3òˆ.=NÀð"U\Ø@ƒT3ˆpB𤄠1â‰;ÌøyãBÔn‘¨ Š‹H 0ó]az ЊgÌ#)ÄX„?œñ QPËH°QŒ bpƒpCÎA 0Äu”)Á °²k$ê°`*ñ„EÔ Á[ÅÅf”!t€q.ì‚Vp ÈE_BXÌIÁ,ô5!B0€Az˜”„¸@lêÂ(@h`V´ìƒ 1hšþ‹€xà@R~ˆ œ …_ð*|@°ðqÀ4H°P°Åà0d숀 \P´xŸ@æ 8Xb n`€²¬Çý©¬ p$ Fý@EÄTƒ „`8à@š&R @ FJ14hAN0Üà/˜ÆB€AÀ( @¸ (€S8¸c`ðLŒ3ŒFhÄ p3Àq €ÒRÏ t7ð@lU€ ¢& Z`®6å,òñ´JìAB%063Ì !¸HA‚3*€¨ rþd€‰ PæhŒÑ°±ÓåVðI48@@ʸ¸è˜A ,¡­C@j€ˆÈG aÐRè ÇTÌ&¸„”€{Â@«†PŽ+ð€ À`ÈcÃ3LL#1á'h€Ð¸ "°Á)d2ÐŒ`"A8U$ȬfI •El6àl 6[ ´A³¸A#ši‡ÌÁµ­p-#  Ù!dv)˜@l%âa–³l.m«QdÖiȬ<|ûÙÚ–žpî>h 7–.d{Ü#p#³HN"´Ë“]âBЮ#È ÜÚÎÂoÏ-ÇÈ; g¸÷¼±®>œ;öÞ7¾éجk¹(àך7»Ä=ðî«ÞñšWÁFpoƒ !Ý 8½¦ðƒ3|áírxþ0†Gà Û å]0!B¼]G8Á 1XÌÙÿ²¸Ã€Øl‡Ûû_ ¸Ç ²‡Lä"ùÈHN²’—Ìä ;rsl-v1.43/Makefile.in0000644000102200007640000007514711747610602011433 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 = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure THANKS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs rapic-lex.c rapic.c \ rapic.h ylwrap subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) librsl_la_LIBADD = am__objects_1 = rapic_to_radar.lo rapic.lo rapic-lex.lo \ rapic_routines.lo am__objects_2 = radtec_to_radar.lo radtec.lo am__objects_3 = am__objects_4 = $(am__objects_3) am_librsl_la_OBJECTS = $(am__objects_1) $(am__objects_2) dorade.lo \ dorade_print.lo dorade_to_radar.lo lassen.lo \ lassen_to_radar.lo radar.lo volume.lo image_gen.lo cappi.lo \ fraction.lo read_write.lo farea.lo range.lo radar_to_uf.lo \ uf_to_radar.lo wsr88d_to_radar.lo carpi.lo cube.lo \ sort_rays.lo toga_to_radar.lo gts.lo histogram.lo \ ray_indexes.lo anyformat_to_radar.lo get_win.lo endian.lo \ mcgill_to_radar.lo mcgill.lo interp.lo toga.lo wsr88d.lo \ wsr88d_get_site.lo wsr88d_m31.lo gzip.lo prune.lo reverse.lo \ fix_headers.lo nsig_to_radar.lo nsig.lo nsig2_to_radar.lo \ africa_to_radar.lo africa.lo radar_to_hdf_2.lo hdf_to_radar.lo \ toolkit_memory_mgt.lo radar_to_hdf_1.lo rainbow.lo \ rainbow_to_radar.lo $(am__objects_4) librsl_la_OBJECTS = $(am_librsl_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) SOURCES = $(librsl_la_SOURCES) DIST_SOURCES = $(librsl_la_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@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.$(PREFIX) LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = $(prefix)/include infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign SUBDIRS = . colors doc examples INCLUDES = -I. -I$(srcdir) -I$(prefix)/include -I$(prefix)/toolkit/include colordir = $(libdir)/colors lib_LTLIBRARIES = librsl.la librsl_la_LDFLAGS = -version-info 1:43 librsl_la_SOURCES = \ $(rapic_c) $(radtec_c)\ dorade.c dorade_print.c dorade_to_radar.c\ lassen.c lassen_to_radar.c \ radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \ range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \ carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \ ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \ mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \ gzip.c prune.c reverse.c fix_headers.c \ nsig_to_radar.c nsig.c nsig2_to_radar.c \ africa_to_radar.c africa.c \ radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \ radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers) librsl_la_DEPENDENCIES = $(build_headers) build_headers = rsl.h wsr88d.h toolkit_1BC-51_appl.h headers = africa.h dorade.h lassen.h \ mcgill.h nsig.h radtec.h rainbow.h \ rapic_routines.h toga.h \ $(build_headers) rapic_c = rapic_to_radar.c rapic.y rapic-lex.l rapic_routines.c radtec_c = radtec_to_radar.c radtec.c PREFIX = rapic LFLAGS = -P$(PREFIX) YFLAGS = -d -p $(PREFIX) EXTRA_DIST = CHANGES Copyright GPL LGPL wsr88d_locations.dat rapic.h DISTCLEANFILES = rapic.c rapic-lex.c all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y am--refresh: @: $(srcdir)/Makefile.in: $(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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(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: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done rapic.h: rapic.c @if test ! -f $@; then \ rm -f rapic.c; \ $(MAKE) rapic.c; \ else :; fi librsl.la: $(librsl_la_OBJECTS) $(librsl_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(librsl_la_LDFLAGS) $(librsl_la_OBJECTS) $(librsl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/africa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/africa_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anyformat_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cappi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/carpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cube.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dorade.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dorade_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dorade_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/farea.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fix_headers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fraction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_win.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gzip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdf_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_gen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lassen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lassen_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcgill.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcgill_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsig2_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsig_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prune.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radar_to_hdf_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radar_to_hdf_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radar_to_uf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radtec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radtec_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rainbow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rainbow_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapic-lex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapic_routines.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapic_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ray_indexes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reverse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort_rays.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toga.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toga_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolkit_memory_mgt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uf_to_radar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr88d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr88d_get_site.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr88d_m31.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr88d_to_radar.Plo@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) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .l.c: $(LEXCOMPILE) $< sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ rm -f $(LEX_OUTPUT_ROOT).c .y.c: $(YACCCOMPILE) $< if test -f y.tab.h; then \ to=`echo "$*_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ y.tab.h >$*.ht; \ rm -f y.tab.h; \ if cmp -s $*.ht $*.h; then \ rm -f $*.ht ;\ else \ mv $*.ht $*.h; \ fi; \ fi if test -f y.output; then \ mv y.output $*.output; \ fi sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool 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) @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 -755 -exec chmod a+rwx,go+rx {} \; -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 $(LTLIBRARIES) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f rapic-lex.c -rm -f rapic.c -rm -f rapic.h clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-recursive ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ distcheck distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool 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-exec-hook install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES rsl.h: Makefile @for h in $(build_headers); do \ echo -n "Checking substitutions in header file $$h ... "; \ cp $$h $$h.in; \ sed -e 's/RSL_VERSION_STR.*/RSL_VERSION_STR \"$(VERSION)\"/' \ -e 's|#define COLORDIR.*|#define COLORDIR \"$(colordir)\"|' \ -e 's|#define WSR88D_SITE_INFO_FILE.*|#define WSR88D_SITE_INFO_FILE \"$(libdir)/wsr88d_locations.dat\"|' \ < $$h.in > $$h.new; \ if cmp -s $$h $$h.new; then \ rm $$h.new; \ echo "$$h remains untouched."; \ else \ mv $$h.new $$h; \ echo "substitutions made in $$h."; \ fi; \ rm -f $$h.in; \ done install-exec-hook: $(INSTALL) -d $(includedir) $(INSTALL) -m 644 rsl.h $(includedir) $(INSTALL) -m 644 toolkit_1BC-51_appl.h $(includedir) $(INSTALL) -m 644 wsr88d_locations.dat $(libdir) # 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: rsl-v1.43/configure0000755000102200007640000256441411747610603011300 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for rsl v1.43. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='rsl' PACKAGE_TARNAME='rsl' PACKAGE_VERSION='v1.43' PACKAGE_STRING='rsl v1.43' PACKAGE_BUGREPORT='' ac_unique_file="volume.c" ac_default_prefix=/usr/local/trmm # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL YACC LEX LEXLIB LEX_OUTPUT_ROOT LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # 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 rsl v1.43 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF 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 System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of rsl v1.43:";; esac 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-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF rsl configure v1.43 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by rsl $as_me v1.43, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # 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 $as_executable_p "$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 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. 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 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 $as_executable_p "$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 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 dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$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='rsl' VERSION='v1.43' 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 $as_executable_p "$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 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 $as_executable_p "$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 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" 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 STRIP=$ac_ct_STRIP 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" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 or --disable-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 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 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3680 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------ ## ## Report this to the rsl lists. ## ## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" 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_CXX_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_CXX_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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran 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_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran 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_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5279:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; 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_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi 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 $as_executable_p "$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 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 $as_executable_p "$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 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" 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 STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6342: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6346: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6610: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6614: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6714: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:6718: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 8183 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" 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 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* 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_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* 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_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 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., 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix3*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11523: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11527: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11627: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 12163 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13221: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13225: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13325: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13329: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix3*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 14774 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15552: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15556: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15820: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15824: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15924: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15928: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix3*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 17393 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi 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 CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion for ac_prog in 'bison -y' byacc 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_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex 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_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_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 #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h malloc.h strings.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------ ## ## Report this to the rsl lists. ## ## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi 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 int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_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 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 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+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 int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi for ac_func in mktime strdup strstr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define HAVE_LASSEN 1 _ACEOF if test $prefix = NONE; then prefix=$ac_default_prefix fi LIBDIR="-L$prefix/lib" LIBS="-lz -lm" # The order of the libraries is important. # This works: # -lrsl -limplode -letor -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm # # If mounting with shared libraries we may have to specify all possible libraries. # First check with simple LIBS list, if it fails, then expand the list. echo "$as_me:$LINENO: checking for _implode in -limplode" >&5 echo $ECHO_N "checking for _implode in -limplode... $ECHO_C" >&6 if test "${ac_cv_lib_implode__implode+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-limplode $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _implode (); int main () { _implode (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_implode__implode=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_implode__implode=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_implode__implode" >&5 echo "${ECHO_T}$ac_cv_lib_implode__implode" >&6 if test $ac_cv_lib_implode__implode = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBIMPLODE 1 _ACEOF LIBS="-limplode $LIBS" fi echo "$as_me:$LINENO: checking for jpeg_CreateCompress in -ljpeg" >&5 echo $ECHO_N "checking for jpeg_CreateCompress in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_CreateCompress+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_CreateCompress (); int main () { jpeg_CreateCompress (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_CreateCompress=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_CreateCompress=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_CreateCompress" >&5 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_CreateCompress" >&6 if test $ac_cv_lib_jpeg_jpeg_CreateCompress = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJPEG 1 _ACEOF LIBS="-ljpeg $LIBS" fi echo "$as_me:$LINENO: checking for DFopen in -ldf" >&5 echo $ECHO_N "checking for DFopen in -ldf... $ECHO_C" >&6 if test "${ac_cv_lib_df_DFopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldf $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char DFopen (); int main () { DFopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_df_DFopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_df_DFopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_df_DFopen" >&5 echo "${ECHO_T}$ac_cv_lib_df_DFopen" >&6 if test $ac_cv_lib_df_DFopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDF 1 _ACEOF LIBS="-ldf $LIBS" fi echo "$as_me:$LINENO: checking for SDstart in -lmfhdf" >&5 echo $ECHO_N "checking for SDstart in -lmfhdf... $ECHO_C" >&6 if test "${ac_cv_lib_mfhdf_SDstart+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmfhdf $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char SDstart (); int main () { SDstart (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mfhdf_SDstart=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mfhdf_SDstart=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mfhdf_SDstart" >&5 echo "${ECHO_T}$ac_cv_lib_mfhdf_SDstart" >&6 if test $ac_cv_lib_mfhdf_SDstart = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMFHDF 1 _ACEOF LIBS="-lmfhdf $LIBS" fi echo "$as_me:$LINENO: checking for TKopen in -ltsdistk" >&5 echo $ECHO_N "checking for TKopen in -ltsdistk... $ECHO_C" >&6 if test "${ac_cv_lib_tsdistk_TKopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltsdistk $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char TKopen (); int main () { TKopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tsdistk_TKopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_tsdistk_TKopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_tsdistk_TKopen" >&5 echo "${ECHO_T}$ac_cv_lib_tsdistk_TKopen" >&6 if test $ac_cv_lib_tsdistk_TKopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTSDISTK 1 _ACEOF LIBS="-ltsdistk $LIBS" fi # Because -letor may depend on RSL being installed, just check for # the library libetor.a in a couple of places. L="" if test "$L" = ""; then # Check for the file directly. as_ac_File=`echo "ac_cv_file_$prefix/lib/libetor.a" | $as_tr_sh` echo "$as_me:$LINENO: checking for $prefix/lib/libetor.a" >&5 echo $ECHO_N "checking for $prefix/lib/libetor.a... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$prefix/lib/libetor.a"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 if test `eval echo '${'$as_ac_File'}'` = yes; then L="-letor -lrsl -letor"; cat >>confdefs.h <<\_ACEOF #define HAVE_LIBETOR 1 _ACEOF fi fi if test "$L" = ""; then # Check for the file directly. echo "$as_me:$LINENO: checking for /usr/local/lib/libetor.a" >&5 echo $ECHO_N "checking for /usr/local/lib/libetor.a... $ECHO_C" >&6 if test "${ac_cv_file__usr_local_lib_libetor_a+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/local/lib/libetor.a"; then ac_cv_file__usr_local_lib_libetor_a=yes else ac_cv_file__usr_local_lib_libetor_a=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_lib_libetor_a" >&5 echo "${ECHO_T}$ac_cv_file__usr_local_lib_libetor_a" >&6 if test $ac_cv_file__usr_local_lib_libetor_a = yes; then L="-letor -lrsl -letor"; cat >>confdefs.h <<\_ACEOF #define HAVE_LIBETOR 1 _ACEOF fi fi if test "$L" != ""; then # libetor exists. LIBS="$LIBDIR $L $LIBS" else LIBS="$LIBDIR $LIBS" fi # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not. YYWRAP="" echo "$as_me:$LINENO: checking for yywrap in -ltsdistk" >&5 echo $ECHO_N "checking for yywrap in -ltsdistk... $ECHO_C" >&6 if test "${ac_cv_lib_tsdistk_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltsdistk $LIBDIR $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tsdistk_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_tsdistk_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_tsdistk_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_tsdistk_yywrap" >&6 if test $ac_cv_lib_tsdistk_yywrap = yes; then YYWRAP="yes" fi if test "$YYWRAP" = ""; then LIBS="$LIBS $LEXLIB" fi echo "$as_me:$LINENO: result: LIBS = $LIBS" >&5 echo "${ECHO_T}LIBS = $LIBS" >&6 ac_config_files="$ac_config_files Makefile colors/Makefile doc/Makefile examples/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, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs 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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by rsl $as_me v1.43, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ rsl config.status v1.43 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir 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 ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "colors/Makefile" ) CONFIG_FILES="$CONFIG_FILES colors/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@SED@,$SED,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@YACC@,$YACC,;t t s,@LEX@,$LEX,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # 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" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) 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=`(dirname "$mf") 2>/dev/null || $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=`(dirname "$file") 2>/dev/null || $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'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi rsl-v1.43/rapic-lex.c0000644000102200007640000015161611600461213011400 00000000000000#define yy_create_buffer rapic_create_buffer #define yy_delete_buffer rapic_delete_buffer #define yy_scan_buffer rapic_scan_buffer #define yy_scan_string rapic_scan_string #define yy_scan_bytes rapic_scan_bytes #define yy_flex_debug rapic_flex_debug #define yy_init_buffer rapic_init_buffer #define yy_flush_buffer rapic_flush_buffer #define yy_load_buffer_state rapic_load_buffer_state #define yy_switch_to_buffer rapic_switch_to_buffer #define yyin rapicin #define yyleng rapicleng #define yylex rapiclex #define yyout rapicout #define yyrestart rapicrestart #define yytext rapictext #define yywrap rapicwrap /* A lexical scanner generated by flex*/ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* Some routines like yy_flex_realloc() are emitted as static but are not called by all lexers. This generates warnings in some compilers, notably GCC. Arrange to suppress these. */ #ifdef __GNUC__ #define YY_MAY_BE_UNUSED __attribute__((unused)) #else #define YY_MAY_BE_UNUSED #endif /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yytext_ptr -= yy_more_len; \ yyleng = (int) (yy_cp - yytext_ptr); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 61 #define YY_END_OF_BUFFER 62 static yyconst short int yy_accept[309] = { 0, 0, 0, 0, 0, 62, 59, 60, 59, 59, 59, 47, 58, 53, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 59, 51, 51, 51, 51, 54, 55, 54, 0, 47, 48, 0, 0, 49, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 38, 39, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 40, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 42, 51, 42, 51, 51, 45, 44, 50, 57, 56, 0, 0, 51, 51, 51, 51, 51, 51, 0, 51, 51, 51, 51, 51, 51, 51, 37, 51, 51, 51, 18, 51, 51, 41, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 5, 51, 51, 51, 51, 13, 30, 0, 51, 51, 51, 51, 51, 51, 8, 51, 51, 28, 51, 51, 51, 51, 51, 14, 51, 51, 51, 51, 16, 51, 51, 51, 46, 0, 51, 51, 51, 51, 0, 51, 51, 51, 51, 51, 51, 36, 51, 51, 51, 51, 51, 9, 51, 51, 51, 51, 31, 51, 51, 1, 0, 0, 0, 51, 21, 51, 51, 0, 26, 51, 12, 29, 51, 51, 51, 51, 51, 20, 51, 51, 51, 51, 32, 24, 51, 0, 0, 0, 0, 51, 51, 7, 0, 51, 51, 51, 33, 27, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 51, 23, 0, 51, 10, 51, 51, 25, 51, 43, 51, 51, 2, 0, 0, 0, 22, 0, 17, 11, 51, 15, 34, 35, 0, 0, 4, 0, 51, 0, 3, 0, 19, 0, 0, 0, 0, 0, 52, 0, 6, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 1, 1, 1, 1, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 12, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, 32, 33, 34, 1, 35, 1, 1, 1, 12, 12, 36, 37, 38, 39, 12, 40, 41, 12, 12, 42, 12, 43, 44, 12, 12, 45, 12, 46, 47, 48, 31, 12, 12, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[51] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 } ; static yyconst short int yy_base[311] = { 0, 0, 0, 49, 50, 366, 367, 367, 47, 357, 35, 50, 367, 367, 342, 0, 37, 352, 39, 336, 346, 339, 52, 53, 49, 55, 52, 331, 339, 46, 63, 50, 56, 349, 50, 57, 55, 64, 367, 367, 306, 347, 97, 346, 332, 339, 343, 0, 333, 334, 319, 319, 331, 331, 329, 324, 325, 313, 318, 318, 61, 313, 74, 90, 0, 310, 91, 316, 92, 318, 98, 313, 97, 98, 95, 319, 312, 96, 98, 96, 110, 116, 320, 319, 321, 104, 317, 305, 311, 295, 121, 299, 306, 306, 302, 303, 304, 108, 297, 288, 0, 289, 306, 300, 286, 107, 286, 285, 291, 294, 109, 285, 287, 279, 0, 113, 276, 108, 0, 367, 367, 367, 287, 281, 287, 286, 274, 271, 289, 288, 270, 273, 265, 275, 271, 263, 271, 280, 0, 277, 268, 277, 367, 256, 269, 0, 268, 254, 267, 131, 116, 260, 249, 269, 254, 261, 254, 125, 259, 367, 247, 245, 260, 244, 367, 367, 258, 251, 252, 238, 237, 235, 235, 367, 242, 234, 367, 247, 239, 231, 231, 247, 367, 227, 118, 240, 233, 367, 243, 224, 235, 0, 141, 238, 239, 228, 214, 231, 235, 221, 233, 232, 226, 210, 0, 210, 209, 221, 226, 212, 367, 222, 133, 213, 222, 367, 221, 201, 367, 206, 212, 138, 198, 367, 199, 215, 212, 367, 209, 367, 367, 206, 206, 210, 209, 195, 367, 199, 194, 136, 192, 367, 367, 187, 198, 200, 199, 176, 193, 198, 367, 180, 173, 195, 188, 367, 367, 185, 192, 176, 135, 182, 179, 188, 182, 173, 179, 184, 367, 188, 182, 367, 181, 161, 367, 179, 0, 178, 173, 367, 170, 157, 174, 367, 163, 367, 367, 163, 367, 367, 0, 154, 167, 367, 153, 164, 168, 367, 159, 367, 154, 150, 144, 149, 148, 367, 151, 367, 367, 177, 78 } ; static yyconst short int yy_def[311] = { 0, 308, 1, 309, 309, 308, 308, 308, 308, 308, 308, 308, 308, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 308, 308, 308, 308, 308, 308, 308, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 308, 308, 308, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 308, 308, 308, 308, 310, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 308, 310, 310, 310, 310, 308, 308, 308, 310, 310, 310, 310, 310, 310, 308, 310, 310, 308, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 310, 310, 308, 308, 308, 308, 310, 308, 310, 310, 308, 308, 310, 308, 308, 310, 310, 310, 310, 310, 308, 310, 310, 310, 310, 308, 308, 310, 308, 308, 308, 308, 310, 310, 308, 308, 310, 310, 310, 308, 308, 310, 310, 310, 310, 310, 310, 308, 308, 308, 308, 310, 308, 308, 310, 308, 310, 310, 308, 310, 310, 310, 310, 308, 308, 308, 308, 308, 308, 308, 308, 310, 308, 308, 310, 308, 308, 308, 308, 310, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 0, 308, 308 } ; static yyconst short int yy_nxt[418] = { 0, 6, 7, 6, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 15, 20, 21, 22, 15, 23, 24, 25, 15, 26, 27, 28, 29, 30, 31, 15, 32, 33, 6, 15, 15, 15, 15, 15, 15, 15, 34, 24, 35, 15, 36, 37, 32, 6, 39, 39, 41, 44, 42, 46, 49, 42, 52, 50, 53, 45, 57, 59, 63, 65, 68, 72, 78, 79, 64, 68, 62, 69, 58, 60, 73, 74, 77, 47, 66, 75, 97, 67, 61, 76, 98, 63, 73, 68, 78, 64, 79, 62, 68, 97, 62, 73, 40, 40, 77, 77, 46, 97, 42, 100, 102, 105, 107, 110, 110, 117, 111, 103, 112, 114, 97, 80, 120, 108, 113, 118, 138, 124, 130, 121, 145, 154, 100, 125, 105, 150, 110, 110, 117, 157, 114, 114, 155, 182, 118, 184, 191, 212, 119, 138, 131, 239, 145, 218, 246, 260, 150, 157, 276, 219, 247, 183, 220, 307, 184, 306, 212, 305, 191, 304, 303, 221, 302, 301, 239, 300, 299, 298, 260, 297, 276, 38, 38, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 245, 244, 243, 242, 241, 240, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 217, 216, 215, 214, 213, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 190, 189, 188, 187, 186, 185, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 156, 153, 152, 151, 149, 148, 147, 146, 144, 143, 142, 141, 140, 139, 137, 136, 135, 134, 133, 132, 129, 128, 127, 126, 84, 123, 122, 116, 115, 109, 106, 104, 101, 99, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 43, 43, 81, 80, 71, 70, 56, 55, 54, 51, 48, 43, 308, 5, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308 } ; static yyconst short int yy_chk[418] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 8, 10, 8, 11, 16, 11, 18, 16, 18, 10, 22, 23, 24, 25, 26, 29, 31, 32, 24, 35, 34, 26, 22, 23, 36, 30, 37, 310, 25, 30, 60, 25, 23, 30, 60, 24, 29, 26, 31, 24, 32, 34, 35, 62, 23, 36, 3, 4, 30, 37, 42, 60, 42, 63, 66, 68, 70, 72, 73, 78, 72, 66, 74, 77, 62, 80, 81, 70, 74, 79, 97, 85, 90, 81, 105, 115, 63, 85, 68, 110, 72, 73, 78, 117, 74, 77, 115, 149, 79, 150, 157, 184, 80, 97, 90, 212, 105, 192, 221, 239, 110, 117, 260, 192, 221, 149, 192, 306, 150, 304, 184, 303, 157, 302, 301, 192, 300, 298, 212, 296, 295, 294, 239, 292, 260, 309, 309, 291, 287, 284, 282, 281, 280, 278, 277, 275, 273, 272, 270, 269, 267, 266, 265, 264, 263, 262, 261, 259, 258, 257, 254, 253, 252, 251, 249, 248, 247, 246, 245, 244, 243, 240, 238, 237, 235, 234, 233, 232, 231, 228, 226, 225, 224, 222, 220, 219, 217, 216, 214, 213, 211, 209, 208, 207, 206, 205, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 190, 189, 188, 186, 185, 183, 181, 180, 179, 178, 177, 175, 174, 172, 171, 170, 169, 168, 167, 166, 163, 162, 161, 160, 158, 156, 155, 154, 153, 152, 151, 148, 147, 146, 144, 143, 141, 140, 139, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 116, 113, 112, 111, 109, 108, 107, 106, 104, 103, 102, 101, 99, 98, 96, 95, 94, 93, 92, 91, 89, 88, 87, 86, 84, 83, 82, 76, 75, 71, 69, 67, 65, 61, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 46, 45, 44, 43, 41, 40, 33, 28, 27, 21, 20, 19, 17, 14, 9, 5, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected static int yy_more_flag = 0; static int yy_more_len = 0; #define yymore() (yy_more_flag = 1) #define YY_MORE_ADJ yy_more_len #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "rapic-lex.l" #define INITIAL 0 /* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997, 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * 2/18/98 - John Merritt */ #line 27 "rapic-lex.l" #include #include "rapic_routines.h" #include "rapic.h" #include /* fprintf(stderr, "LEX len=%d text=<", yyleng);\ binprint(yytext, yyleng);\ fprintf(stderr, "> token=[%d]\n", x);\ */ #define strreturn(x) rapiclval.token.s = calloc(yyleng+1, sizeof(char));\ rapiclval.token.len=yyleng;\ memcpy(rapiclval.token.s, yytext, yyleng);\ return x; #define ATMODE 1 #line 630 "rapic-lex.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; #line 48 "rapic-lex.l" #line 784 "rapic-lex.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_more_len = 0; if ( yy_more_flag ) { yy_more_len = yy_c_buf_p - yytext_ptr; yy_more_flag = 0; } yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 309 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 367 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 50 "rapic-lex.l" {strreturn(IMAGE);} YY_BREAK case 2: YY_RULE_SETUP #line 51 "rapic-lex.l" {strreturn(IMAGEEND);} YY_BREAK case 3: YY_RULE_SETUP #line 52 "rapic-lex.l" {strreturn(IMAGESCANS);} YY_BREAK case 4: YY_RULE_SETUP #line 53 "rapic-lex.l" {strreturn(IMAGESIZE);} YY_BREAK case 5: YY_RULE_SETUP #line 54 "rapic-lex.l" {strreturn(SCAN);} YY_BREAK case 6: YY_RULE_SETUP #line 55 "rapic-lex.l" {strreturn(IMAGEHEADEREND);} YY_BREAK case 7: YY_RULE_SETUP #line 56 "rapic-lex.l" {strreturn(COUNTRY);} YY_BREAK case 8: YY_RULE_SETUP #line 57 "rapic-lex.l" {strreturn(NAME);} YY_BREAK case 9: YY_RULE_SETUP #line 58 "rapic-lex.l" {strreturn(STNID);} YY_BREAK case 10: YY_RULE_SETUP #line 59 "rapic-lex.l" {strreturn(LATITUDE);} YY_BREAK case 11: YY_RULE_SETUP #line 60 "rapic-lex.l" {strreturn(LONGITUDE);} YY_BREAK case 12: YY_RULE_SETUP #line 61 "rapic-lex.l" {strreturn(HEIGHT);} YY_BREAK case 13: YY_RULE_SETUP #line 62 "rapic-lex.l" {strreturn(DATE);} YY_BREAK case 14: YY_RULE_SETUP #line 63 "rapic-lex.l" {strreturn(TIME);} YY_BREAK case 15: YY_RULE_SETUP #line 64 "rapic-lex.l" {strreturn(TIMESTAMP);} YY_BREAK case 16: YY_RULE_SETUP #line 65 "rapic-lex.l" {strreturn(VERS);} YY_BREAK case 17: YY_RULE_SETUP #line 66 "rapic-lex.l" {strreturn(FREQUENCY);} YY_BREAK case 18: YY_RULE_SETUP #line 67 "rapic-lex.l" {strreturn(PRF);} YY_BREAK case 19: YY_RULE_SETUP #line 68 "rapic-lex.l" {strreturn(PULSELENGTH);} YY_BREAK case 20: YY_RULE_SETUP #line 69 "rapic-lex.l" {strreturn(RNGRES);} YY_BREAK case 21: YY_RULE_SETUP #line 70 "rapic-lex.l" {strreturn(ANGRES);} YY_BREAK case 22: YY_RULE_SETUP #line 71 "rapic-lex.l" {strreturn(ANGLERATE);} YY_BREAK case 23: YY_RULE_SETUP #line 72 "rapic-lex.l" {strreturn(CLEARAIR);} YY_BREAK case 24: YY_RULE_SETUP #line 73 "rapic-lex.l" {strreturn(VIDRES);} YY_BREAK case 25: YY_RULE_SETUP #line 74 "rapic-lex.l" {strreturn(STARTRNG);} YY_BREAK case 26: YY_RULE_SETUP #line 75 "rapic-lex.l" {strreturn(ENDRNG);} YY_BREAK case 27: YY_RULE_SETUP #line 76 "rapic-lex.l" {strreturn(PRODUCT);} YY_BREAK case 28: YY_RULE_SETUP #line 77 "rapic-lex.l" {strreturn(PASS);} YY_BREAK case 29: YY_RULE_SETUP #line 78 "rapic-lex.l" {strreturn(IMGFMT);} YY_BREAK case 30: YY_RULE_SETUP #line 79 "rapic-lex.l" {strreturn(ELEV);} YY_BREAK case 31: YY_RULE_SETUP #line 80 "rapic-lex.l" {strreturn(VIDEO);} YY_BREAK case 32: YY_RULE_SETUP #line 81 "rapic-lex.l" {strreturn(VELLVL);} YY_BREAK case 33: YY_RULE_SETUP #line 82 "rapic-lex.l" {strreturn(NYQUIST);} YY_BREAK case 34: YY_RULE_SETUP #line 83 "rapic-lex.l" {strreturn(UNFOLDING);} YY_BREAK case 35: YY_RULE_SETUP #line 84 "rapic-lex.l" {strreturn(VOLUMETRIC);} YY_BREAK case 36: YY_RULE_SETUP #line 85 "rapic-lex.l" {strreturn(NORMAL);} YY_BREAK case 37: YY_RULE_SETUP #line 86 "rapic-lex.l" {strreturn(NONE);} YY_BREAK case 38: YY_RULE_SETUP #line 87 "rapic-lex.l" {strreturn(OF);} YY_BREAK case 39: YY_RULE_SETUP #line 88 "rapic-lex.l" {strreturn(ON);} YY_BREAK case 40: YY_RULE_SETUP #line 89 "rapic-lex.l" {strreturn(OFF);} YY_BREAK case 41: YY_RULE_SETUP #line 90 "rapic-lex.l" {strreturn(REFL);} YY_BREAK case 42: YY_RULE_SETUP #line 91 "rapic-lex.l" {strreturn(VEL);} YY_BREAK case 43: YY_RULE_SETUP #line 92 "rapic-lex.l" {strreturn(UNCORREFL);} YY_BREAK case 44: YY_RULE_SETUP #line 93 "rapic-lex.l" {strreturn(ZDR);} YY_BREAK case 45: #line 95 "rapic-lex.l" case 46: YY_RULE_SETUP #line 95 "rapic-lex.l" {strreturn(WID);} YY_BREAK case 47: YY_RULE_SETUP #line 97 "rapic-lex.l" {strreturn(NUMBER);} YY_BREAK case 48: #line 99 "rapic-lex.l" case 49: YY_RULE_SETUP #line 99 "rapic-lex.l" {strreturn(FLOATNUMBER);} YY_BREAK case 50: YY_RULE_SETUP #line 100 "rapic-lex.l" {strreturn(BRACKETNUM);} YY_BREAK case 51: YY_RULE_SETUP #line 102 "rapic-lex.l" {strreturn(ALPHA);} YY_BREAK case 52: YY_RULE_SETUP #line 104 "rapic-lex.l" {strreturn(ENDRADARIMAGE);} YY_BREAK case 53: YY_RULE_SETUP #line 108 "rapic-lex.l" {BEGIN ATMODE; yymore();} YY_BREAK case 54: #line 110 "rapic-lex.l" case 55: YY_RULE_SETUP #line 110 "rapic-lex.l" {yymore();} YY_BREAK case 56: #line 112 "rapic-lex.l" case 57: YY_RULE_SETUP #line 112 "rapic-lex.l" {BEGIN INITIAL; yyless(yyleng-1); strreturn(RAYDATA);} YY_BREAK case 58: YY_RULE_SETUP #line 114 "rapic-lex.l" {return(yytext[0]);} YY_BREAK case 59: YY_RULE_SETUP #line 116 "rapic-lex.l" ; /* Ignore. */ YY_BREAK case 60: YY_RULE_SETUP #line 117 "rapic-lex.l" ; /* Ignore. */ YY_BREAK case 61: YY_RULE_SETUP #line 119 "rapic-lex.l" ECHO; YY_BREAK #line 1166 "rapic-lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(ATMODE): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 50); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 309 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 50; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 309 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 308); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; return c; } #endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 119 "rapic-lex.l" rsl-v1.43/rsl.h0000644000102200007640000010532111747574010010325 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996 John H. Merritt Space Applications Corporation Vienna, Virginia, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _rsl_h #define _rsl_h /* Are we building the library? */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define RSL_VERSION_STR "v1.43" /**********************************************************************/ /* Configure: Define USE_TWO_BYTE_PRECISION to have RSL store internal*/ /* values with two bytes. Otherwise, use one byte. */ /* It is a good idea to use two byte precision. */ /* See 'makefile' for an additional explaination. */ /* */ /**********************************************************************/ #define USE_TWO_BYTE_PRECISION /**********************************************************************/ /* Configure: Define the file name of the red,green, and blue color */ /* color tables. This maps reflectance to color. */ /* This should be $(LIBDIR)/colors, from the makefile */ /* so you shouldn't have to modify anything here. */ /**********************************************************************/ #ifndef COLORDIR #define COLORDIR "/usr/local/trmm/lib/colors" #endif /* These are the color table indexes. See RSL_set/get_color_table. */ #define RSL_RED_TABLE 0 #define RSL_GREEN_TABLE 1 #define RSL_BLUE_TABLE 2 /* The default color tables for reflectivity, velocity, spectral width, * height, rainfall, and zdr. */ #define REFL_RED_FILE COLORDIR "/red_reflectivity.clr" #define REFL_GREEN_FILE COLORDIR "/grn_reflectivity.clr" #define REFL_BLUE_FILE COLORDIR "/blu_reflectivity.clr" #define VEL_RED_FILE COLORDIR "/red_velocity.clr" #define VEL_GREEN_FILE COLORDIR "/grn_velocity.clr" #define VEL_BLUE_FILE COLORDIR "/blu_velocity.clr" #define SW_RED_FILE COLORDIR "/red_spectral_width.clr" #define SW_GREEN_FILE COLORDIR "/grn_spectral_width.clr" #define SW_BLUE_FILE COLORDIR "/blu_spectral_width.clr" #define HEIGHT_RED_FILE COLORDIR "/red_height.clr" #define HEIGHT_GREEN_FILE COLORDIR "/grn_height.clr" #define HEIGHT_BLUE_FILE COLORDIR "/blu_height.clr" #define RAINFALL_RED_FILE COLORDIR "/red_rainfall.clr" #define RAINFALL_GREEN_FILE COLORDIR "/grn_rainfall.clr" #define RAINFALL_BLUE_FILE COLORDIR "/blu_rainfall.clr" /* Added by D. Wolff 07/31/97 */ #define ZDR_RED_FILE COLORDIR "/red_zdr.clr" #define ZDR_GREEN_FILE COLORDIR "/grn_zdr.clr" #define ZDR_BLUE_FILE COLORDIR "/blu_zdr.clr" /*************************************************************************/ /* You should not have to change anything below this line. * The rest is my fault. */ /*************************************************************************/ #include /* * Magic numbers. These are used to uniquely identify the type of * values present in a particular structure: Volume, Sweep, Ray. * The magic numbers V_DZ, V_VR, V_SW, etc. represent Volume magic * numbers for the field types DZ, VR, SW, etc. Similiar magic numbers * are implimented for Sweep, and Ray. The magic number is the first word * of the data structure. These magic number may determine which conversion * function is used, see volume.c and the end of this file for the * conversion functions. (As of v0.39 -- NOT YET IMPLEMENTED.) */ enum Rsl_magic_num { V_DZ, V_VR, V_SW, V_CZ, V_ZT, V_DR, V_LR, S_DZ, S_VR, S_SW, S_CZ, S_ZT, S_DR, S_LR, R_DZ, R_VR, R_SW, R_CZ, R_ZT, R_DR, R_LR }; /* File format types recognized by RSL. */ enum File_type {UNKNOWN, WSR88D_FILE, UF_FILE, LASSEN_FILE, TOGA_FILE, NSIG_FILE_V1, NSIG_FILE_V2, RSL_FILE, MCGILL_FILE, HDF_FILE, RAPIC_FILE, RADTEC_FILE, DORADE_FILE, RAINBOW_FILE}; /* Pick a BADVAL that is out of range. That is, the range * of the conversion cannot include these reserved values. * Typically, pick a number that cannot be stored in the Range data type. */ #ifdef USE_TWO_BYTE_PRECISION typedef unsigned short Range; #define BADVAL (float)0x20000 #else typedef unsigned char Range; #define BADVAL (float)0500 /* non-meaningful value (500 octal) */ #endif #define RFVAL (BADVAL-1) /* Range folded value. See rfival. */ #define APFLAG (BADVAL-2) #define NOTFOUND_H (BADVAL-3) #define NOTFOUND_V (BADVAL-4) #define NOECHO (BADVAL-5) /* For nsig and UF -32, for kwaj -30 */ #define RSL_SPEED_OF_LIGHT 299792458.0 /* m/s */ typedef struct { int month; /* Time for this ray; month (1-12). */ int day; /* Time for this ray; day (1-31). */ int year; /* Time for this ray; year (eg. 1993). */ int hour; /* Date for this ray; hour (0-23). */ int minute;/* Date for this ray; minute (0-59).*/ float sec; /* Date for this ray; second + fraction of second. */ float unam_rng; /* Unambiguous range. (KM). */ float azimuth; /* Azimuth angle (degrees). Must be positive. * 0=North, 90=east, -90/270=west. * This angle is the mean azimuth for the whole ray. * E.g. for NSIG the beginning and end azimuths are averaged. */ int ray_num; /* Ray no. within elevation scan. */ float elev; /* Elevation angle. (degrees). */ int elev_num; /* Elevation no. within volume scan. */ int range_bin1; /* Range to first gate.(meters) */ int gate_size; /* Data gate size (meters)*/ float vel_res; /* Doppler velocity resolution */ float sweep_rate; /* Sweep rate. Full sweeps/min. */ int prf; /* Pulse repetition frequency, in Hz. */ int prf2; /* Second PRF, for Sigmet dual PRF */ float azim_rate; /* Sweep rate in degrees/sec. */ float fix_angle; /* Elevation angle for the sweep. (degrees). */ float pitch; /* Pitch angle. */ float roll; /* Roll angle. */ float heading; /* Heading. */ float pitch_rate; /* (angle/sec) */ float roll_rate; /* (angle/sec) */ float heading_rate; /* (angle/sec) */ float lat; /* Latitude (degrees) */ float lon; /* Longitude (degrees) */ int alt; /* Altitude (m) */ float rvc; /* Radial velocity correction (m/sec) */ float vel_east; /* Platform velocity to the east (negative for west) (m/sec) */ float vel_north; /* Platform velocity to the north (negative south) (m/sec) */ float vel_up; /* Platform velocity toward up (negative down) (m/sec) */ int pulse_count; /* Pulses used in a single dwell time. */ float pulse_width; /* Pulse width (micro-sec). */ float beam_width; /* Beamwidth in degrees. */ float frequency; /* Carrier freq. GHz. */ float wavelength; /* Wavelength. Meters. */ float nyq_vel; /* Nyquist velocity. m/s */ float (*f)(Range x); /* Data conversion function. f(x). */ Range (*invf)(float x); /* Data conversion function. invf(x). */ int nbins; /* Number of array elements for 'Range'. */ } Ray_header; typedef struct { Ray_header h; Range *range; /* range[0..nbins-1] * For wsr88d file: * 0..460 for reflectivity, 0..920 for velocity and * spectrum width. */ } Ray; typedef struct _azimuth_hash { Ray *ray; struct _azimuth_hash *next, *ray_high, *ray_low; } Azimuth_hash; typedef struct { Azimuth_hash **indexes; int nindexes; } Hash_table; typedef struct { int sweep_num; /* Integer sweep number. This may be redundant, since * this will be the same as the Volume.sweep array index.*/ float elev; /* Elevation angle (mean) for the sweep. Value is -999 for * RHI. */ float azimuth; /* Azimuth for the sweep (RHI). Value is -999 for PPI. */ float beam_width; /* This is in the ray header too. */ float vert_half_bw; /* Vertical beam width divided by 2 */ float horz_half_bw; /* Horizontal beam width divided by 2 */ int nrays; float (*f)(Range x); /* Data conversion function. f(x). */ Range (*invf)(float x); /* Data conversion function. invf(x). */ } Sweep_header; typedef struct { Sweep_header h; Ray **ray; /* ray[0..nrays-1]. */ } Sweep; typedef struct { char *type_str; /* One of:'Reflectivity', 'Velocity' or 'Spectrum width' */ int nsweeps; float calibr_const; /* Calibration constant. HDF specific. */ float (*f)(Range x); /* Data conversion function. f(x). */ Range (*invf)(float x); /* Data conversion function. invf(x). */ } Volume_header; typedef struct { Volume_header h; /* Specific info for each elev. */ /* Includes resolution: km/bin. */ Sweep **sweep; /* sweep[0..nsweeps-1]. */ } Volume; typedef Range Carpi_value; typedef Range Cappi_value; typedef struct { int month; /* (1-12). */ int day; /* (1-31). */ int year; /* (eg. 1993). */ int hour; /* (0-23). */ int minute; /* (0-59).*/ float sec; /* second + fraction of second. */ float dx, dy; /* Size of cell in km. */ int nx, ny; /* Number of cells. */ int radar_x, radar_y; /* Location of center of radar. */ float height; /* Height of this Carpi. */ float lat, lon; /* Lat/lon of lower left corner of Carpi. */ char radar_type[50]; /* Radar types. */ int field_type; /* Same as for Radar. */ int interp_method; /* ??? string describing interpolation method. */ float (*f)(Carpi_value x); /* Data conversion function. f(x). */ Carpi_value (*invf)(float x); /* Data conversion function. invf(x). */ Carpi_value **data; /* data[ny][nx] */ } Carpi; /** Cappi data structure info **/ /* Paul A. Kucera **/ /* Element in location array of Cappi data structure. * Each element is elvation and range to data value. */ typedef struct { float elev; /* elevation angle */ float srange; /* slant range !!! */ } Er_loc; /* Cappi data structure. */ typedef struct { int month; /* Begin time for this Cappi; month (1-12). */ int day; /* Begin time for this Cappi; day (1-31). */ int year; /* Begin time for this Cappi; year (eg. 1993). */ int hour; /* Begin date for this Cappi; hour (0-23). */ int minute; /* Begin date for this Cappi; minute (0-59).*/ float sec; /* Begin date for this Cappi; second + frac. of second.*/ float height; /* Height for this Cappi in m */ float lat; float lon; int field_type; /* Value of Constant ??_INDEX */ char radar_type[50]; /* Value of Constant radar->h.radar_type */ int interp_method; /* ??? string describing interpolation method. */ Er_loc *loc; /* elevation and range coordinate array */ Sweep *sweep; /* Pointers to rays of data */ } Cappi; /* The Cube data type. */ typedef Range Cube_value; typedef Range Slice_value; typedef struct { float lat, lon; float dx, dy, dz; int nx, ny, nz; char *data_type; Carpi **carpi; /* Pointers to carpi[0] thru carpi[nz-1] */ } Cube; typedef struct { float dx, dy; int nx, ny; char *data_type; float (*f)(Slice_value x); /* Data conversion function. f(x). */ Slice_value (*invf)(float x); /* Data conversion function. invf(x). */ Slice_value **data; /* data[ny][nx]. */ } Slice; typedef struct { int nbins; int low; int hi; int ucount; int ccount; int *data; } Histogram; enum scan_mode {PPI, RHI}; typedef struct { int month, day, year; int hour, minute; float sec; /* Second plus fractional part. */ char radar_type[50]; /* Type of radar. Use for QC-ing the data. * Supported types are: * "wsr88d", "lassen", "uf", * "nsig", "mcgill", * "kwajalein", "rsl", "toga", * "rapic", (rapic is Berrimah Austrailia) * "radtec", (SPANDAR radar at Wallops Is, VA) * "dorade", * "south_africa". * Set by appropriate ingest routine. */ int nvolumes; int number; /* arbitrary number of this radar site */ char name[8]; /* Nexrad site name */ char radar_name[8]; /* Radar name. */ char project[24]; /* Project identifier. */ char city[15]; /* nearest city to radar site */ char state[3]; /* state of radar site */ char country[15]; int latd; /* degrees of latitude of site */ int latm; /* minutes of latitude of site */ int lats; /* seconds of latitude of site */ int lond; /* degrees of longitude of site */ int lonm; /* minutes of longitude of site */ int lons; /* seconds of longitude of site */ int height; /* height of site in meters above sea level*/ int spulse; /* length of short pulse (ns)*/ int lpulse; /* length of long pulse (ns) */ int scan_mode; /* 0 = PPI, 1 = RHI */ int vcp; /* Volume Coverage Pattern (for WSR-88D only) */ } Radar_header; typedef struct { Radar_header h; Volume **v; /* Array 0..nvolumes-1 of pointers to Volumes. * 0 = DZ_INDEX = reflectivity. * 1 = VR_INDEX = velocity. * 2 = SW_INDEX = spectrum_width. * 3 = CZ_INDEX = corrected reflectivity. * 4 = ZT_INDEX = uncorrected reflectivity. * 5 = DR_INDEX = differential refl. * 6 = LR_INDEX = another differential refl. * 7 = ZD_INDEX = another differential refl. * 8 = DM_INDEX = received power. * 9 = RH_INDEX = RhoHV: Horz-Vert power corr coeff *10 = PH_INDEX = PhiDP: Differential phase angle *11 = XZ_INDEX = X-band reflectivity. *12 = CD_INDEX = Corrected DR. *13 = MZ_INDEX = DZ mask for 1C-51 HDF. *14 = MR_INDEX = DR mask for 1C-51 HDF. *15 = ZE_INDEX = Edited reflectivity. *16 = VE_INDEX = Edited velocity. *17 = KD_INDEX = KDP: Specific differential phase, deg/km. *18 = TI_INDEX = TIME (unknown) for MCTEX data. *19 = DX_INDEX *20 = CH_INDEX *21 = AH_INDEX *22 = CV_INDEX *23 = AV_INDEX *24 = SQ_INDEX = Signal Quality Index (Sigmet) *25 = VS_INDEX = Radial Velocity Combined (DORADE) *26 = VL_INDEX = Radial Velocity Combined (DORADE) *27 = VG_INDEX = Radial Velocity Combined (DORADE) *28 = VT_INDEX = Radial Velocity Combined (DORADE) *29 = NP_INDEX = Normalized Coherent Power (DORADE) *30 = HC_INDEX = HydroClass (Sigmet) *31 = VC_INDEX = Radial Velocity Corrected (Sigmet) *32 = V2_INDEX = Radial Velocity for VCP 121 second Doppler cut. *33 = S2_INDEX = Spectrum Width for VCP 121 second Doppler cut. *34 = V3_INDEX = Radial Velocity for VCP 121 third Doppler cut. *35 = S3_INDEX = Spectrum Width for VCP 121 third Doppler cut. */ } Radar; /* * DZ Reflectivity (dBZ), may contain some DZ_INDEX * signal-processor level QC and/or * filters. This field would contain * Darwin's CZ, or WSR88D's standard * reflectivity. In other words, unless * the field is described otherwise, it * should always go here. In essence, this * is the "cleanest" reflectivity field * for a radar. * * VR Radial Velocity (m/s) VR_INDEX * * SW Spectral Width (m2/s2) SW_INDEX * * CZ QC Reflectivity (dBZ), contains * post-processed QC'd data CZ_INDEX * * ZT Total Reflectivity (dBZ) ZT_INDEX * Reflectivity unfiltered for clutter... * This is UZ in UF files. * * DR Differential reflectivity DR_INDEX * DR and LR are for dual-polarization * radars only. Unitless or in dB. * * LR Another form of differential ref LR_INDEX * called LDR, not sure of units * * ZD ZDR: Reflectivity Depolarization Ratio ZD_INDEX * ZDR = 10log(ZH/ZV) (dB) * * DM Received power measured by the radar. DM_INDEX * Units are dBm. * * RH RhoHV: Horz-Vert power correlation RH_INDEX * coefficient. (0 to 1) See volume.c * * PH PhiDP: Differential phase angle. PH_INDEX * (0 to 180 deg in steps of 0.71) * See volume.c * * XZ X-band reflectivity XZ_INDEX * * CD Corrected ZD reflectivity (differential) CD_INDEX * contains QC'ed data * * MZ DZ mask volume for HDF 1C-51 product. MZ_INDEX * * MD ZD mask volume for HDF 1C-51 product. MD_INDEX * * ZE Edited Reflectivity. ZE_INDEX * * VE Edited Velocity. VE_INDEX * * KD KDP (deg/km) Differencial Phase KD_INDEX * (Sigmet, Lassen) * * TI TIME (unknown) for MCTEX data. TI_INDEX * * SQ SQI: Signal Quality Index. (Sigmet) SQ_INDEX * Decimal fraction from 0 to 1, where 0 * is noise, 1 is noiseless. * * VS Radial Velocity, Short PRT (m/s) (DORADE) VS_INDEX * * VL Radial Velocity, Long PRT (m/s) (DORADE) VL_INDEX * * VG Radial Velocity, combined (m/s) (DORADE) VG_INDEX * * VT Radial Velocity, combined (m/s) (DORADE) VT_INDEX * * NP Normalized Coherent Power. (DORADE) NP_INDEX * * HC HydroClass: enumerated class. (Sigmet) HC_INDEX * * VC Radial Velocity corrected for (Sigmet) VC_INDEX * Nyquist unfolding. */ /* * The number of *_INDEX must never exceed MAX_RADAR_VOLUMES. * Increase MAX_RADAR_VOLUMES appropriately, for new ingest formats. * * Also, when adding new *_INDEXes, you must update the following three arrays * located near the end of this file: RSL_ftype, RSL_f_list, and RSL_invf_list. * You also need to modify volume.c, updating the initialization of array * rsl_qfield by adding a '1' for each new volume index. */ #define MAX_RADAR_VOLUMES 42 #define DZ_INDEX 0 #define VR_INDEX 1 #define SW_INDEX 2 #define CZ_INDEX 3 #define ZT_INDEX 4 #define DR_INDEX 5 #define LR_INDEX 6 #define ZD_INDEX 7 #define DM_INDEX 8 #define RH_INDEX 9 #define PH_INDEX 10 #define XZ_INDEX 11 #define CD_INDEX 12 #define MZ_INDEX 13 #define MD_INDEX 14 #define ZE_INDEX 15 #define VE_INDEX 16 #define KD_INDEX 17 #define TI_INDEX 18 #define DX_INDEX 19 #define CH_INDEX 20 #define AH_INDEX 21 #define CV_INDEX 22 #define AV_INDEX 23 #define SQ_INDEX 24 #define VS_INDEX 25 #define VL_INDEX 26 #define VG_INDEX 27 #define VT_INDEX 28 #define NP_INDEX 29 #define HC_INDEX 30 #define VC_INDEX 31 #define V2_INDEX 32 #define S2_INDEX 33 #define V3_INDEX 34 #define S3_INDEX 35 #define CR_INDEX 36 #define CC_INDEX 37 #define PR_INDEX 38 #define SD_INDEX 39 #define ZZ_INDEX 40 #define RD_INDEX 41 /* Prototypes for functions. */ /* Alphabetical and grouped by object returned. */ Radar *RSL_africa_to_radar(char *infile); Radar *RSL_anyformat_to_radar(char *infile, ...); Radar *RSL_dorade_to_radar(char *infile); Radar *RSL_fix_radar_header(Radar *radar); Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range,float low_azim, float hi_azim); Radar *RSL_hdf_to_radar(char *infile); Radar *RSL_hdf_to_radar_unQC(char *infile); Radar *RSL_kwaj_to_radar(char *infile); Radar *RSL_lassen_to_radar(char *infile); Radar *RSL_mcgill_to_radar(char *infile); Radar *RSL_new_radar(int nvolumes); Radar *RSL_nsig_to_radar(char *infile); Radar *RSL_nsig2_to_radar(char *infile); Radar *RSL_prune_radar(Radar *radar); Radar *RSL_radtec_to_radar(char *infile); Radar *RSL_rainbow_to_radar(char *infile); Radar *RSL_rapic_to_radar(char *infile); Radar *RSL_read_radar(char *infile); Radar *RSL_sort_radar(Radar *r); Radar *RSL_toga_to_radar(char *infile); Radar *RSL_uf_to_radar(char *infile); Radar *RSL_uf_to_radar_fp(FILE *fp); Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file); Volume *RSL_clear_volume(Volume *v); Volume *RSL_copy_volume(Volume *v); Volume *RSL_fix_volume_header(Volume *v); Volume *RSL_get_volume(Radar *r, int type_wanted); Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim); Volume *RSL_new_volume(int max_sweeps); Volume *RSL_prune_volume(Volume *v); Volume *RSL_read_volume(FILE *fp); Volume *RSL_reverse_sweep_order(Volume *v); Volume *RSL_sort_rays_in_volume(Volume *v); Volume *RSL_sort_sweeps_in_volume(Volume *v); Volume *RSL_sort_volume(Volume *v); Volume *RSL_volume_z_to_r(Volume *z_volume, float k, float a); Sweep *RSL_clear_sweep(Sweep *s); Sweep *RSL_copy_sweep(Sweep *s); Sweep *RSL_fix_sweep_header(Sweep *sweep); Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit); Sweep *RSL_get_eth_sweep(Volume *v,float et_point,float max_range); Sweep *RSL_get_first_sweep_of_volume(Volume *v); Sweep *RSL_get_sweep(Volume *v, float elev); Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim); Sweep *RSL_new_sweep(int max_rays); Sweep *RSL_prune_sweep(Sweep *s); Sweep *RSL_read_sweep (FILE *fp); Sweep *RSL_sort_rays_in_sweep(Sweep *s); Sweep *RSL_sort_rays_by_time(Sweep *s); Sweep *RSL_sweep_z_to_r(Sweep *z_sweep, float k, float a); Ray *RSL_clear_ray(Ray *r); Ray *RSL_copy_ray(Ray *r); Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit); Ray *RSL_get_first_ray_of_sweep(Sweep *s); Ray *RSL_get_first_ray_of_volume(Volume *v); Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle,float limit); Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *ray); Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *ray); Ray *RSL_get_ray(Volume *v, float elev, float azimuth); Ray *RSL_get_ray_above(Volume *v, Ray *current_ray); Ray *RSL_get_ray_below(Volume *v, Ray *current_ray); Ray *RSL_get_ray_from_sweep(Sweep *s, float azim); Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim); Ray *RSL_new_ray(int max_bins); Ray *RSL_prune_ray(Ray *ray); Ray *RSL_ray_z_to_r(Ray *z_ray, float k, float a); Ray *RSL_read_ray (FILE *fp); float RSL_area_of_ray(Ray *r, float lo, float hi, float min_range, float max_range); float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range); float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range); float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range); float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float min_rng, float max_rng); float RSL_get_echo_top_height(Volume *v,float azim,float grange, float et_point); float RSL_get_linear_value(Volume *v,float srange,float azim,float elev,float limit); float RSL_get_nyquist_from_radar(Radar *radar); float RSL_get_range_of_range_index(Ray *ray, int index); float RSL_get_value(Volume *v, float elev, float azimuth, float range); float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h); float RSL_get_value_from_cappi(Cappi *cappi, float rng, float azm); float RSL_get_value_from_ray(Ray *ray, float r); float RSL_get_value_from_sweep(Sweep *s, float azim, float r); float RSL_z_to_r(float z, float k, float a); int RSL_fill_cappi(Volume *v, Cappi *cap, int method); int RSL_get_ray_index_from_sweep(Sweep *s, float azim,int *next_closest); int RSL_get_sweep_index_from_volume(Volume *v, float elev,int *next_closest); int RSL_radar_to_hdf(Radar *radar, char *outfile); int RSL_write_histogram(Histogram *histogram, char *outfile); int RSL_write_ray(Ray *r, FILE *fp); int RSL_write_sweep(Sweep *s, FILE *fp); int RSL_write_radar(Radar *radar, char *outfile); int RSL_write_radar_gzip(Radar *radar, char *outfile); int RSL_write_volume(Volume *v, FILE *fp); unsigned char *RSL_rhi_sweep_to_cart(Sweep *s, int xdim, int ydim, float range, int vert_scale); unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range); void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset); void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset); void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset); void RSL_bscan_ray(Ray *r, FILE *fp); void RSL_bscan_sweep(Sweep *s, char *outfile); void RSL_bscan_volume(Volume *v, char *basename); void RSL_find_rng_azm(float *r, float *ang, float x, float y); void RSL_fix_time (Ray *ray); void RSL_float_to_char(float *x, Range *c, int n); void RSL_free_cappi(Cappi *c); void RSL_free_carpi(Carpi *carpi); void RSL_free_cube(Cube *cube); void RSL_free_histogram(Histogram *histogram); void RSL_free_ray(Ray *r); void RSL_free_slice(Slice *slice); void RSL_free_sweep(Sweep *s); void RSL_free_radar(Radar *r); void RSL_free_volume(Volume *v); void RSL_get_color_table(int icolor, char buffer[256], int *ncolors); void RSL_get_groundr_and_h(float slant_r, float elev, float *gr, float *h); void RSL_get_slantr_and_elev(float gr, float h, float *slant_r, float *elev); void RSL_get_slantr_and_h(float gr, float elev, float *slant_r, float *h); void RSL_load_color_table(char *infile, char buffer[256], int *ncolors); void RSL_load_height_color_table(); void RSL_load_rainfall_color_table(); void RSL_load_refl_color_table(); void RSL_load_vel_color_table(); void RSL_load_sw_color_table(); void RSL_load_zdr_color_table(); void RSL_load_red_table(char *infile); void RSL_load_green_table(char *infile); void RSL_load_blue_table(char *infile); void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename); void RSL_print_version(); void RSL_radar_to_uf(Radar *r, char *outfile); void RSL_radar_to_uf_gzip(Radar *r, char *outfile); void RSL_radar_verbose_off(void); void RSL_radar_verbose_on(void); void RSL_read_these_sweeps(char *csweep, ...); void RSL_rebin_velocity_ray(Ray *r); void RSL_rebin_velocity_sweep(Sweep *s); void RSL_rebin_velocity_volume(Volume *v); void RSL_rebin_zdr_ray(Ray *r); void RSL_rebin_zdr_sweep(Sweep *s); void RSL_rebin_zdr_volume(Volume *v); void RSL_rhi_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range, int vert_scale); void RSL_select_fields(char *field_type, ...); void RSL_set_color_table(int icolor, char buffer[256], int ncolors); void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range); void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range); void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range); void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range); void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range); void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range); void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range); void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range); void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); void RSL_write_pgm(char *outfile, unsigned char *image, int xdim, int ydim); void RSL_write_pict(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); void RSL_write_ppm(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); Cappi *RSL_new_cappi(Sweep *sweep, float height); Cappi *RSL_cappi_at_h(Volume *v, float height, float max_range); Carpi *RSL_cappi_to_carpi(Cappi *cappi, float dx, float dy, float lat, float lon, int nx, int ny, int radar_x, int radar_y); Carpi *RSL_new_carpi(int nrows, int ncols); Carpi *RSL_volume_to_carpi(Volume *v, float h, float grnd_r, float dx, float dy, int nx, int ny, int radar_x, int radar_y, float lat, float lon); Cube *RSL_new_cube(int ncarpi); Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz, int nx, int ny, int nz, float grnd_r, int radar_x, int radar_y, int radar_z); Slice *RSL_new_slice(int nrows, int ncols); Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z); Histogram *RSL_allocate_histogram(int low, int hi); Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range); Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range); Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range); Histogram *RSL_read_histogram(char *infile); int no_command (char *cmd); FILE *uncompress_pipe (FILE *fp); FILE *compress_pipe (FILE *fp); int rsl_pclose(FILE *fp); /* Carpi image generation functions. These are modified clones of the corresponding sweep image generation functions. */ unsigned char *RSL_carpi_to_cart(Carpi *carpi, int xdim, int ydim, float range); void RSL_carpi_to_gif(Carpi *carpi, char *outfile, int xdim, int ydim, float range); void RSL_carpi_to_pict(Carpi *carpi, char *outfile, int xdim, int ydim, float range); void RSL_carpi_to_ppm(Carpi *carpi, char *outfile, int xdim, int ydim, float range); void RSL_carpi_to_pgm(Carpi *carpi, char *outfile, int xdim, int ydim, float range); /* Internal storage conversion functions. These may be any conversion and * may be dynamically defined; based on the input data conversion. */ float DZ_F(Range x); float VR_F(Range x); float SW_F(Range x); float CZ_F(Range x); float ZT_F(Range x); float DR_F(Range x); float LR_F(Range x); float ZD_F(Range x); float DM_F(Range x); float RH_F(Range x); float PH_F(Range x); float XZ_F(Range x); float CD_F(Range x); float MZ_F(Range x); float MD_F(Range x); float ZE_F(Range x); float VE_F(Range x); float KD_F(Range x); float TI_F(Range x); float DX_F(Range x); float CH_F(Range x); float AH_F(Range x); float CV_F(Range x); float AV_F(Range x); float SQ_F(Range x); float VS_F(Range x); float VL_F(Range x); float VG_F(Range x); float VT_F(Range x); float NP_F(Range x); float HC_F(Range x); float VC_F(Range x); float SD_F(Range x); Range DZ_INVF(float x); Range VR_INVF(float x); Range SW_INVF(float x); Range CZ_INVF(float x); Range ZT_INVF(float x); Range DR_INVF(float x); Range LR_INVF(float x); Range ZD_INVF(float x); Range DM_INVF(float x); Range RH_INVF(float x); Range PH_INVF(float x); Range XZ_INVF(float x); Range CD_INVF(float x); Range MZ_INVF(float x); Range MD_INVF(float x); Range ZE_INVF(float x); Range VE_INVF(float x); Range KD_INVF(float x); Range TI_INVF(float x); Range DX_INVF(float x); Range CH_INVF(float x); Range AH_INVF(float x); Range CV_INVF(float x); Range AV_INVF(float x); Range SQ_INVF(float x); Range VS_INVF(float x); Range VL_INVF(float x); Range VG_INVF(float x); Range VT_INVF(float x); Range NP_INVF(float x); Range HC_INVF(float x); Range VC_INVF(float x); Range SD_INVF(float x); /* If you like these variables, you can use them in your application * by defining USE_RSL_VARS before #include "rsl.h" */ #ifdef USE_RSL_VARS static char *RSL_ftype[] = {"DZ", "VR", "SW", "CZ", "ZT", "DR", "LR", "ZD", "DM", "RH", "PH", "XZ", "CD", "MZ", "MD", "ZE", "VE", "KD", "TI", "DX", "CH", "AH", "CV", "AV", "SQ", "VS", "VL", "VG", "VT", "NP", "HC", "VC", "V2", "S2", "V3", "S3", "CR", "CC", "PR", "SD", "ZZ", "RD"}; static float (*RSL_f_list[])(Range x) = {DZ_F, VR_F, SW_F, CZ_F, ZT_F, DR_F, LR_F, ZD_F, DM_F, RH_F, PH_F, XZ_F, CD_F, MZ_F, MD_F, ZE_F, VE_F, KD_F, TI_F, DX_F, CH_F, AH_F, CV_F, AV_F, SQ_F, VS_F, VL_F, VG_F, VT_F, NP_F, HC_F, VC_F, VR_F, SW_F, VR_F, SW_F, DZ_F, CZ_F, PH_F, SD_F, DZ_F, DZ_F}; static Range (*RSL_invf_list[])(float x) = {DZ_INVF, VR_INVF, SW_INVF, CZ_INVF, ZT_INVF, DR_INVF, LR_INVF, ZD_INVF, DM_INVF, RH_INVF, PH_INVF, XZ_INVF, CD_INVF, MZ_INVF, MD_INVF, ZE_INVF, VE_INVF, KD_INVF, TI_INVF, DX_INVF, CH_INVF, AH_INVF, CV_INVF, AV_INVF, SQ_INVF, VS_INVF, VL_INVF, VG_INVF, VT_INVF, NP_INVF, HC_INVF, VC_INVF, VR_INVF, SW_INVF, VR_INVF, SW_INVF, DZ_INVF, CZ_INVF, PH_INVF, SD_INVF, DZ_INVF, DZ_INVF}; #endif /* Secret routines that are quite useful and useful to developers. */ void radar_load_date_time(Radar *radar); int big_endian(void); int little_endian(void); void swap_4_bytes(void *word); void swap_2_bytes(void *word); Hash_table *hash_table_for_sweep(Sweep *s); int hash_bin(Hash_table *table,float angle); Azimuth_hash *the_closest_hash(Azimuth_hash *hash, float ray_angle); Hash_table *construct_sweep_hash_table(Sweep *s); double angle_diff(float x, float y); int rsl_query_field(char *c_field); /* Debugging prototypes. */ void poke_around_volume(Volume *v); /* SYSTEM: left out prototypes? */ extern int pclose (FILE *f); /* From stdio.h */ #endif rsl-v1.43/examples/0000755000102200007640000000000011747614602011252 500000000000000rsl-v1.43/examples/bscan.c0000644000102200007640000000367207016360561012430 00000000000000/* * For RSL version 0.28 and higher. * * v1.0 Began 2/16/94 by John Merritt. * * Demonstrates reading NEXRAD files and loading the Radar structure. */ #include #ifdef sgi #include #endif #include #include #include "rsl.h" usage() { fprintf(stderr,"Usage: bscan infile [callid]\n"); exit(-1); } process_args(int argc, char **argv, char **in_file, char **callid) { if (argc < 2) usage(); else if (argc == 2) *in_file = strdup(argv[1]); else if (argc == 3) { *in_file = strdup(argv[1]); *callid = strdup(argv[2]); } else { usage(); } } main(int argc, char **argv) { char *infile, *callid; Radar *radar; Volume *cappi_vol; char *index_str[] = {"DZ", "VR", "SW"}; int i; /* 1. Process the arguments. */ callid = NULL; process_args(argc, argv, &infile, &callid); /* malloc for in/outfile */ /* * Pass bitwise or of DZ_MASK, VR_MASK, SW_MASK */ i = DZ_INDEX; RSL_radar_verbose_on(); if ((radar = RSL_anyformat_to_radar(infile, callid)) == NULL) exit(-1); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); printf("Radar file: %s\n", infile); printf("Radar site: %c%c%c%c\n", radar->h.name[0], radar->h.name[1], radar->h.name[2], radar->h.name[3]); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); if (i == DZ_INDEX) RSL_load_refl_color_table(); if (i == VR_INDEX) RSL_load_vel_color_table(); if (i == SW_INDEX) RSL_load_sw_color_table(); if (i == VR_INDEX) RSL_rebin_velocity_volume(radar->v[i]); /* Modifies v[i]. */ printf("Generating bscan ppm images of %s\n", index_str[i]); RSL_bscan_volume((Volume *) radar->v[i], "bscan.ppm"); printf("----> BSCAN complete.\n"); exit(0); } rsl-v1.43/examples/any_to_uf.c0000644000102200007640000000201706600002414013301 00000000000000#include #include "rsl.h" #include #include #include #include void usage(char **argv) { fprintf(stderr, "Usage: %s [-f firstfile] infile outfile\n", argv[0]); exit(-1); } process_args(int argc, char **argv, char **in_file, char **out_file, char **first_file) { int c; while ((c = getopt(argc, argv, "f:")) != -1) switch (c) { case 'f': *first_file = strdup(optarg); break; case '?': usage(argv); break; default: break; } /* must have 2 files listed */ if (argc - optind != 2) usage(argv); /* Can use strdup, if desired */ /* strdup allocates memory */ /* in_file = strdup(argv[optind]); */ *in_file = strdup(argv[optind]); *out_file = strdup(argv[optind+1]); } main (int argc, char **argv) { Radar *radar; char *infile, *outfile, *first_file; first_file = NULL; process_args(argc, argv, &infile, &outfile, &first_file); RSL_radar_verbose_on(); radar = RSL_anyformat_to_radar(infile, first_file); RSL_radar_to_uf(radar, outfile); } rsl-v1.43/examples/Makefile.am0000644000102200007640000000131111401237151013205 00000000000000## Use automake to generate Makefile.in from this file ## AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(prefix)/include LOCAL_LIB = ../.libs/librsl.a LDADD = @LIBS@ $(LOCAL_LIB) bin_PROGRAMS = any_to_gif any_to_uf qlook any_to_gif_LDFLAGS = -static any_to_uf_LDFLAGS = -static # Additional program to build but not install noinst_PROGRAMS = any_to_ppm any_to_ufgz bscan \ cappi_image dorade_main killer_sweep \ kwaj_subtract_one_day lassen_to_gif print_hash_table \ print_header_info sector test_get_win \ wsr88d_to_gif wsr_hist_uf_test # Only this one has more than one source. All the others use the # default *.c format. qlook_SOURCES = qlook.c qlook_usage.c adjust_gate_size.c EXTRA_DIST = run_tests rsl-v1.43/examples/sector.c0000644000102200007640000000451111565520526012635 00000000000000#include #include #include "rsl.h" /* * Cannot compile if the hash table is static in volume.c. For * testing we make it globally known. */ typedef struct { Sweep *s_addr; Hash_table *hash; } Sweep_list; extern int RSL_max_sweeps; /* Initial allocation for sweep_list. * RSL_new_sweep will allocate the space first * time around. */ extern int RSL_nsweep_addr; /* A count of sweeps in the table. */ extern Sweep_list *RSL_sweep_list; extern int RSL_nextents; void print_link_list(Azimuth_hash *list) { if (list == NULL) { printf("\n"); return; } printf("ray# %d azim %f |", list->ray->h.ray_num, list->ray->h.azimuth); print_link_list(list->next); } void print_hash_table (Sweep *s) { int i; int sweep_index; Azimuth_hash *index; float azim; float res; if (s == NULL) return; sweep_index = SWEEP_INDEX(s); res = 360.0/RSL_sweep_list[sweep_index].hash->nindexes; printf("Azimuth resolution = %f for %d bins.\n", res, RSL_sweep_list[sweep_index].hash->nindexes); for (i=0; inindexes; i++) { index = RSL_sweep_list[sweep_index].hash->indexes[i]; azim = i/res; printf("RSL_sweep_list[%d].hash->indexes[%d] = ", sweep_index, i); if (index == NULL) printf("IS NULL\n"); else print_link_list(index); } } Sweep * get_sector(Sweep *s, float lo_azimuth, float hi_azimuth) { int i, j; Sweep *new_sweep; Ray *saved_ray; if (s == NULL) return NULL; if ((new_sweep = RSL_new_sweep(s->h.nrays)) == NULL) return NULL; new_sweep->h = s->h; for (i = 0,j = 0; i < s->h.nrays; i++) { if (s->ray[i] == NULL) continue; if (s->ray[i]->h.azimuth >= lo_azimuth && s->ray[i]->h.azimuth < hi_azimuth) { new_sweep->ray[j] =RSL_copy_ray(s->ray[i]); j++; } } return new_sweep; } int main(int argc, char **argv) { Radar *radar; Sweep *sector; if (argc != 3) {fprintf(stderr, "Usage: %s infile callid_or_firstfile\n", argv[0]); exit(-1);} RSL_radar_verbose_on(); radar = RSL_wsr88d_to_radar(argv[1], argv[2]); if (radar == NULL) exit(-1); RSL_load_refl_color_table(); sector = get_sector(radar->v[DZ_INDEX]->sweep[0], 0.0, 90.0); /* sector = RSL_copy_sweep(radar->v[DZ_INDEX]->sweep[0]); */ print_hash_table(sector); RSL_sweep_to_gif(sector, "dz_sector.gif", 400, 400, 200.0); exit(0); } rsl-v1.43/examples/cappi_image.c0000644000102200007640000000370611565520526013601 00000000000000/* * For RSL version 0.28 and higher. * * v1.0 Began 2/16/94 by John Merritt. * * Demonstrates reading NEXRAD files and loading the Radar structure. */ #include #include #include #include "rsl.h" usage(int argc, char **argv) { fprintf(stderr,"Usage: %s infile [firstfile | callid]\n", argv[0]); exit(-1); } process_args(int argc, char **argv, char **in_file, char **out_file) { if (argc == 2) { *in_file = strdup(argv[1]); *out_file = NULL; } else if (argc == 3) { *in_file = strdup(argv[1]); *out_file = strdup(argv[2]); } else { usage(argc, argv); } } main(int argc, char **argv) { char *infile, *firstfile; char outfile[100]; Radar *radar; Cappi *cappi; int i, j; /* 1. Process the arguments. */ process_args(argc, argv, &infile, &firstfile); /* malloc for in/outfile */ i = DZ_INDEX; RSL_radar_verbose_on(); if ((radar = RSL_anyformat_to_radar(infile, firstfile)) == NULL) exit(-1); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); printf("Radar file: %s\n", infile); printf("Radar site: %c%c%c%c\n", radar->h.name[0], radar->h.name[1], radar->h.name[2], radar->h.name[3]); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); if (i == DZ_INDEX) RSL_load_refl_color_table(); if (i == VR_INDEX) RSL_load_vel_color_table(); if (i == SW_INDEX) RSL_load_sw_color_table(); if (i == VR_INDEX) RSL_rebin_velocity_volume(radar->v[i]); /* Modifies v[i]. */ for (j=1; j<=5; j++) { cappi = RSL_cappi_at_h( radar -> v[i], (float)j/2.0, 200.0); sprintf(outfile, "cappi_%2.2d.gif", j); printf("Writing %s.\n", outfile); RSL_sweep_to_gif(cappi->sweep, outfile, 400, 400, 200.0); RSL_free_cappi(cappi); } exit(0); } rsl-v1.43/examples/any_to_ufgz.c0000644000102200007640000000177306600002414013652 00000000000000#include #include "rsl.h" #include #include #include #include void usage(char **argv) { fprintf(stderr, "Usage: %s [-f firstfile] infile outfile\n", argv[0]); exit(-1); } process_args(int argc, char **argv, char **in_file, char **out_file, char **first_file) { int c; while ((c = getopt(argc, argv, "f:")) != -1) switch (c) { case 'f': *first_file = strdup(optarg); break; case '?': usage(argv); break; default: break; } /* must have 2 files listed */ if (argc - optind != 2) usage(argv); /* Can use strdup, if desired */ /* strdup allocates memory */ /* in_file = strdup(argv[optind]); */ *in_file = strdup(argv[optind]); *out_file = strdup(argv[optind+1]); } main (int argc, char **argv) { Radar *radar; char *infile, *outfile, *first_file; first_file = NULL; process_args(argc, argv, &infile, &outfile, &first_file); radar = RSL_anyformat_to_radar(infile, first_file); RSL_radar_to_uf_gzip(radar, outfile); } rsl-v1.43/examples/qlook.c0000644000102200007640000006270411600471165012465 00000000000000#define TRUE 1 #define FALSE 0 #include #include #include #include #include #include #define USE_RSL_VARS #include "rsl.h" #define ZDR_WIDTH 10 int verbose; void RSL_rebin_ray(Ray *r, int width); void RSL_rebin_sweep(Sweep *s, int width); void RSL_rebin_volume(Volume *v, int width); void adjust_gate_size(Radar *radar, float gate_size_adjustment); void process_args(int argc, char **argv, char *in_file, int *verbose, char *site_id, char *tape_id, int *qc_reflectivity, int *total_reflectivity, int *differential_reflectivity, int *velocity, int *spectral_width, int *make_gif, int *make_pgm, int *make_bscan, int *make_uf, int *num_sweeps, float *dbz_offset, int *xdim, int *ydim, float *range, float *gate_size_adjustment, int *print_azim, char *gifdir, char *pgmdir, char *ufdir); void make_pathname(char *filename, char *dir, char *pathname) { /* Make pathname by combining directory name, if given, with filename. */ if (!dir || !dir[0]) { strcpy(pathname, filename); } else { strcpy(pathname, dir); strcat(pathname, "/"); strcat(pathname, filename); } } /***********************************************************************/ /* This program uses the NASA TRMM Office Radar Software Library (RSL) */ /***********************************************************************/ /*** DBW ***************************************************************/ /***********************************************************************/ main(int argc, char **argv) { Radar *radar; Volume *dz_volume, *vr_volume; Volume *dr_volume, *zt_volume; Volume *sw_volume, *qc_volume, *volume; Sweep *sweep; Sweep *dz_sweep, *qc_sweep; Sweep *dr_sweep, *zt_sweep; Sweep *vr_sweep, *sw_sweep; Ray *ray; int reflectivity, qc_reflectivity, nvolumes; int differential_reflectivity, total_reflectivity; int velocity, spectral_width; int make_catalog, make_gif, make_pgm; int make_uf, make_bscan; int xdim, ydim, num_sweeps; int i,j,k,l,n, verbose, kk; int month, day, year, hour, min; int ncbins, width; int print_azim; float scale, dbz_offset; float latitude, longitude; float sec; float maxr; float nyquist, max_range, gate_size_adjustment; char tape_id[100]; char in_file[100], site_id[100]; char filename[100], outfile[100], nexfile[100]; char command[100], file_prefix[100], file_suffix[3]; char dir_string[100], red[120], grn[120], blu[120]; char time_string[14], site_string[10],img_base[20]; char pathname[256], gifdir[100], pgmdir[100], ufdir[100]; char *inpath; FILE *fp; /* Set default values */ /*strcpy(site_id, "KMLB");*/ strcpy(tape_id, "WSR88D"); verbose = FALSE; reflectivity = TRUE; qc_reflectivity = FALSE; total_reflectivity = FALSE; differential_reflectivity = FALSE; velocity = FALSE; spectral_width = FALSE; make_gif = FALSE; make_pgm = FALSE; make_catalog = FALSE; make_uf = FALSE; print_azim = FALSE; num_sweeps = 1; xdim = ydim = 400; maxr = 200.; dbz_offset = 0.0; gate_size_adjustment = 1.0; *gifdir = *pgmdir = *ufdir = '\0'; *site_id = '\0'; /* Process command_line arguments */ process_args(argc, argv, in_file, &verbose, site_id, tape_id, &qc_reflectivity, &total_reflectivity, &differential_reflectivity, &velocity, &spectral_width, &make_gif, &make_pgm, &make_bscan, &make_uf, &num_sweeps, &dbz_offset, &xdim, &ydim, &maxr, &gate_size_adjustment, &print_azim, gifdir, pgmdir, ufdir); /* If site_id empty, use first 4 characters of file name. */ if (*site_id == 0) { inpath = strdup(in_file); strncpy(site_id, basename(inpath), 4); site_id[4] = '\0'; if (strcmp(site_id, "KWA0") == 0) strcpy(site_id, "KWAJ"); } /* Be a chatty Kathy? */ if(verbose) RSL_radar_verbose_on(); else RSL_radar_verbose_off(); /* Read data into radar */ if(verbose) printf("Calling any_format_to_radar\n"); radar = RSL_anyformat_to_radar(in_file, site_id); if(verbose) printf("Called any_format_to_radar\n"); if(radar==NULL) { if (verbose) printf("No radar loaded, bye\n"); exit(-1); } /* Print command line parameters */ if(verbose) { printf("Site ID = %s\n",site_id); printf("Tape ID = %s\n",tape_id); printf("Do reflectivity = %d\n",reflectivity); printf("Do qc_reflectivity = %d\n",qc_reflectivity); printf("Do differential_reflectivity = %d\n", differential_reflectivity); printf("Do total_reflectivity = %d\n", total_reflectivity); printf("Do qc_reflectivity = %d\n",qc_reflectivity); printf("Do velocity = %d\n",velocity); printf("Do spectral_width = %d\n",spectral_width); printf("Make gif = %d\n",make_gif); printf("Make pgm = %d\n",make_pgm); printf("Make UF file = %d\n",make_uf); if (ufdir != NULL) printf("UF output dir = %s\n",ufdir); if (gifdir != NULL) printf("GIF output dir = %s\n",gifdir); if (pgmdir != NULL) printf("PGM output dir = %s\n",pgmdir); printf("dBZ Offset = %.2f\n",dbz_offset); printf("Gate Size Adjust = %.2f\n",gate_size_adjustment); printf("Print Azimuths = %d\n",print_azim); } /* If Gate Size Adjustment is not unity, then we must change the following: old_gs = radar->v[i]->sweep[sweepIndex]->ray[rayIndex=]->h.gate_size radar->v[i]->sweep[sweepIndex]->ray[rayIndex=]->h.gate_size = old_gs*gate_size_adjustment Here are some comments from Sandra Yuter on the necessity of this fix. > I dug into the revelant code and it looks like we can do a relatively > simple workaround for the SIGMET raw product file range bin size > errors for the RHB data pulses widths of 0.5 usec and 2.0 usec as follows. > > Since we are all converting from sigmet to UF I suggest we resize > the range bin size values in the ray headers in the qlook step > where the sigmet to UF conversion occurs. > > The resize requires only 1 additional line of code (I have included > a few others for context) in qlook.c > > rangeToFirstGate = 0.001 * > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.range_bin1; > gateSize = 0.001 * > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.gate_size; > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.gate_size= > gateSize*0.6*1000; > > I have used 0.6 adjustment factor since that is 75/125 which corresponds > to the error in my 0.5 usec data, for the SUR scans, this adjustment > factor is 133.33/125 or 1.067. The following is from Joe Holmes from SIGMET > > I think you have experienced a problem with the RVP7 range resolution > configuration. Both in IRIS and in the RVP7 you manually type in > the range resolution. The RVP7 allows a separate resolution for > each pulsewidth, while IRIS only allows 1 value. There is no feedback > if these values are not typed in the same. Based on setup information > we have here from the RH Brown from Oct 23, 1998, you had the following > configuration: > > RVP7: > 0 0.50 usec 75.0m > 1 0.80 usec 125.0m > 2 1.39 usec 125.0m > 3 2.00 usec 133.3m > > IRIS: 125.0 meters > > I think the error at PW#0 was corrected a while back, but > the error in PW#3 was never corrected. Next time someone is > at the ship, they should check this, fix the long pulse, and remake > the bandpass filter for the long pulse. > > In the short term, you can correct the error by taking all your > long pulse data and changing the header to correctly document the > range resolution. We have a program to do this, it is called "change_raw". > The source is on any IRIS system, which was installed with the > source, headers, and objects turned on. It is in the > ${IRIS_ROOT}utils/examples directory. We can supply you with > a compiled version of this program, if you want. Available platforms > are Linux, HP-UX, and IRIX. */ if(gate_size_adjustment != 1.0) { printf("Adjusting Gate Size by Factor: %.3f\n",gate_size_adjustment); adjust_gate_size(radar, gate_size_adjustment); } /* Create the filename prefix. Consists of the Site ID, and time string (YYMMDD_hhmm). The file suffix is like MIME type (e.g, .gif, .pgm, .uf, etc.) */ sprintf(time_string,"%4d/%2.2d%2.2d %2.2d:%2.2d UTC", radar->h.year, radar->h.month, radar->h.day, radar->h.hour, radar->h.minute); /* Determine the location (lat/lon) of the radar. */ latitude = radar->h.latd + radar->h.latm/60. + radar->h.lats/3600.; longitude = radar->h.lond + radar->h.lonm/60. + radar->h.lons/3600.; printf("%s %s %s %.6f %.6f \n", in_file, radar->h.radar_name, time_string, longitude, latitude); sprintf(time_string,"%4d_%2.2d%2.2d_%2.2d%2.2d", radar->h.year, radar->h.month, radar->h.day, radar->h.hour, radar->h.minute); /* Print the radar/volume info. */ /* * DZ Reflectivity (dBZ), may contain some DZ_INDEX * signal-processor level QC and/or * filters. This field would contain * Darwin's CZ, or WSR88D's standard * reflectivity. In other words, unless * the field is described otherwise, it * should always go here. In essence, this * is the "cleanest" reflectivity field * for a radar. * * VR Radial Velocity (m/s) VR_INDEX * * SW Spectral Width (m2/s2) SW_INDEX * * CZ QC Reflectivity (dBZ), contains * post-processed QC'd data CZ_INDEX * * ZT Total Reflectivity (dBZ) ZT_INDEX * May be uncommon, but important * * DR Differential reflectivity DR_INDEX * DR and LR are for dual-polarization * radars only. Unitless or in dB. * * LR Another form of differential ref LR_INDEX * called LDR, not sure of units * * ZD ZDR: Reflectivity Depolarization Ratio ZD_INDEX * ZDR = 10log(ZH/ZV) (dB) * * DM Received power measured by the radar. DM_INDEX * Units are dBm. * * RH Rho : Correlation coefficient RH_INDEX * * PH Phi (MCTEX parameter) PH_INDEX * * XZ X-band reflectivity XZ_INDEX * * CR Corrected DR reflectivity (differential) CR_INDEX * * MZ DZ mask volume for HDF 1C-51 product. MZ_INDEX * * MR DR mask volume for HDF 1C-51 product. MR_INDEX * * ZE Edited Reflectivity. ZE_INDEX * * VE Edited Velocity. VE_INDEX * * * 0 = DZ_INDEX = reflectivity. * 1 = VR_INDEX = velocity. * 2 = SW_INDEX = spectrum_width. * 3 = CZ_INDEX = corrected reflectivity. * 4 = ZT_INDEX = uncorrected reflectivity. * 5 = DR_INDEX = differential refl. * 6 = LR_INDEX = another differential refl. * 7 = ZD_INDEX = another differential refl. * 8 = DM_INDEX = received power. * 9 = RH_INDEX = RhoHV: Horz-Vert power corr coeff *10 = PH_INDEX = PhiDP: Differential phase angle *11 = XZ_INDEX = X-band reflectivity. *12 = CR_INDEX = Corrected DR. *13 = MZ_INDEX = DZ mask for 1C-51 HDF. *14 = MR_INDEX = DR mask for 1C-51 HDF. *15 = ZE_INDEX = Edited reflectivity. *16 = VE_INDEX = Edited velocity. *17 = KD_INDEX = KDP deg/km. *18 = TI_INDEX = TIME (unknown) for MCTEX data. *19 = DX_INDEX *20 = CH_INDEX *21 = AH_INDEX *22 = CV_INDEX *23 = AV_INDEX */ if(verbose) { for(i=0; i< radar->h.nvolumes; i++) { if(radar->v[i] != NULL) { printf("Vol[%2.2d] has %d sweeps\n",i,radar->v[i]->h.nsweeps); } else { printf("Vol[%2.2d] == NULL\n",i); } } printf("--------------------------------------------\n"); printf("Number of volumes in radar: %d\n",radar->h.nvolumes); } /* DZ_INDEX */ if(radar->v[DZ_INDEX] == NULL) { printf("DZ_INDEX == NULL\n"); reflectivity = FALSE; } else { dz_volume = radar->v[DZ_INDEX]; if(verbose) printf("Number of sweeps in dz_volume = %d\n", dz_volume->h.nsweeps); } /* CZ_INDEX */ if(radar->v[CZ_INDEX] == NULL) { if(verbose) printf("CZ_INDEX == NULL\n"); qc_reflectivity = FALSE; } else { qc_volume = radar->v[CZ_INDEX]; if(verbose) printf("Number of sweeps in qc_volume = %d\n", qc_volume->h.nsweeps); } /* ZT_INDEX */ if(radar->v[ZT_INDEX] == NULL) { if(verbose) printf("ZT_INDEX == NULL\n"); total_reflectivity = FALSE; } else { zt_volume = radar->v[ZT_INDEX]; if(verbose) printf("Number of sweeps in zt_volume = %d\n", zt_volume->h.nsweeps); } /* DR_INDEX */ if(radar->v[DR_INDEX] == NULL) { if(verbose) printf("DR_INDEX == NULL\n"); differential_reflectivity = FALSE; } else { dr_volume = radar->v[DR_INDEX]; if(verbose) printf("Number of sweeps in dr_volume = %d\n", dr_volume->h.nsweeps); } /* VR_INDEX */ if(radar->v[VR_INDEX] == NULL) { if(verbose) printf("VR_INDEX == NULL\n"); velocity = FALSE; } else { vr_volume = radar->v[VR_INDEX]; if(verbose) printf("Number of sweeps in vr_volume = %d\n", vr_volume->h.nsweeps); } /* SW_INDEX */ if(radar->v[SW_INDEX] == NULL) { if(verbose) printf("SW_INDEX == NULL\n"); spectral_width = FALSE; } else { sw_volume = radar->v[SW_INDEX]; if(verbose) printf("Number of sweeps in sw_volume = %d\n", sw_volume->h.nsweeps); } if(verbose) printf("--------------------------------------------\n"); /* Print out the elevation angles */ if(verbose) { if(reflectivity) { printf("Reflectivity Tilts\n"); printf("----------------------\n"); if(dz_volume != NULL) { for(i=0; ih.nsweeps; i++) { sweep = dz_volume->sweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } printf("Tilt %2d, Elev=%4.1f\n",i,sweep->h.elev); } printf("----------------------\n"); } } } /* Print out the values of the rays in each sweep requsted */ if(print_azim) { printf("Ray angles\n"); if(reflectivity) { for(i=0; ih.nsweeps; i++) { if(dz_volume->sweep[i] != NULL) sweep = dz_volume->sweep[i]; printf("Elevation angle: %f\n",sweep->h.elev); printf("Number of rays in sweep[%d] = %d\n",i,sweep->h.nrays); for(j=0; jh.nrays-1; j++) { if(sweep->ray[j] != NULL) { ray = sweep->ray[j]; printf("%d: %7.2f\n ",j,sweep->ray[j]->h.azimuth); } } } } } /* Write out some volume statistics */ if(verbose) { printf("******************* Volume Statistics *******************\n"); if(reflectivity) { sweep = RSL_get_first_sweep_of_volume(dz_volume); if(sweep != NULL) { printf("Number rays = %d\n", sweep->h.nrays); printf("Beam width = %.2f deg\n", sweep->h.beam_width); ray = RSL_get_first_ray_of_sweep(sweep); if(ray!= NULL) { max_range = ray->h.range_bin1/1000.0 + ray->h.nbins*ray->h.gate_size/1000.0; printf("Number of bins = %d\n",ray->h.nbins); printf("Max range = %.1f km\n", max_range); printf("Range to first bin = %d m\n",ray->h.range_bin1); printf("Gate size = %d m\n",ray->h.gate_size); printf("Pulse Rep. Freq. = %d Hz\n",ray->h.prf); printf("Pulse width = %.2f us\n",ray->h.pulse_width); printf("Wavelength = %.2f m\n",ray->h.wavelength); printf("Frequency = %.2f \n",ray->h.frequency); } } } } /* Add a dBZ offset if requested. The offset can be positive or negative. if(dbz_offset != 0.0) { printf("Adding dbz_offset to dz_volume: %.2f\n", dbz_offset); RSL_add_dbzoffset_to_volume(dz_volume, dbz_offset); printf("Added dbz_offset to dz_volume: %.2f\n", dbz_offset); exit(0); } */ /* **************************************************************** * Make images * **************************************************************** */ /* CZ_INDEX */ if(qc_reflectivity) { if(verbose) printf("Loading refl colortable...\n"); RSL_load_refl_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"qc_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"qc_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* DZ_INDEX */ if(reflectivity) { if(verbose) printf("Loading refl colortable...\n"); RSL_load_refl_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"dz_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"dz_%s_%2.2d.%s", time_string,i,file_suffix); /* sprintf(filename,"dz_%s.%s.%s", time_string,in_file,file_suffix); */ printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* ZT_INDEX */ if(total_reflectivity) { if(verbose) printf("Loading refl colortable...\n"); RSL_load_refl_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"zt_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"zt_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* DR_INDEX */ if(differential_reflectivity) { scale = 0.5; ncbins = 21; width = 10; printf("Calling RSL_rebin, %d\n", width); RSL_rebin_volume(dr_volume, width); if(verbose) printf("Loading zdr colortable...\n"); RSL_load_zdr_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"dr_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"dr_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* VR_INDEX */ if(velocity) { if(verbose) printf("Loading vel colortable...\n"); RSL_load_vel_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"vr_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"vr_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* SW_INDEX */ if(spectral_width) { if(verbose) printf("Loading sw colortable...\n"); RSL_load_sw_color_table(); for(i=0; isweep[i]; if(sweep == NULL) { printf("sweep[%d]==NULL\n",i); continue; } if(make_pgm) { sprintf(file_suffix,"pgm"); sprintf(filename,"sw_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, pgmdir, pathname); RSL_sweep_to_pgm(sweep, pathname, xdim, ydim, maxr); } if(make_gif) { sprintf(file_suffix,"gif"); sprintf(filename,"sw_%s_%2.2d.%s", time_string,i,file_suffix); printf("Creating: %s\n", filename); make_pathname(filename, gifdir, pathname); RSL_sweep_to_gif(sweep,pathname,xdim, ydim, maxr); } } } /* Write uf file if requested */ if(make_uf) { sprintf(filename,"%s_%s.%s",site_id, time_string,"uf.gz"); printf("Creating UF file: %s\n", filename); make_pathname(filename, ufdir, pathname); RSL_radar_to_uf_gzip(radar, pathname); } printf("-->> FIELDS: [ "); /* Modified to use RSL_ftype from rsl.h (#define USE_RSL_VARS) and to * loop through volumes. 10/16/2009, BLK */ for (i=0; i < MAX_RADAR_VOLUMES; i++) if (radar->v[i] != NULL) printf("%s ", RSL_ftype[i]); /* if(radar->v[0] != NULL) printf("DZ "); if(radar->v[1] != NULL) printf("VR "); if(radar->v[2] != NULL) printf("SW "); if(radar->v[3] != NULL) printf("CZ "); if(radar->v[4] != NULL) printf("ZT "); if(radar->v[5] != NULL) printf("DR "); if(radar->v[6] != NULL) printf("LR "); if(radar->v[7] != NULL) printf("ZD "); if(radar->v[8] != NULL) printf("DM "); if(radar->v[9] != NULL) printf("RH "); if(radar->v[10] != NULL) printf("PH "); if(radar->v[11] != NULL) printf("XZ "); if(radar->v[12] != NULL) printf("CR "); if(radar->v[13] != NULL) printf("MZ "); if(radar->v[14] != NULL) printf("MR "); if(radar->v[15] != NULL) printf("ZE "); if(radar->v[16] != NULL) printf("VE "); if(radar->v[17] != NULL) printf("KD "); if(radar->v[18] != NULL) printf("TI "); if(radar->v[19] != NULL) printf("DX "); if(radar->v[20] != NULL) printf("CH "); if(radar->v[21] != NULL) printf("AH "); if(radar->v[22] != NULL) printf("CV "); if(radar->v[23] != NULL) printf("AV "); if(radar->v[24] != NULL) printf("SQ "); */ printf("] \n\n"); /* Wrap it up! */ if(verbose) printf("Finished!\n"); exit (0); } /* End of main */ rsl-v1.43/examples/wsr_hist_uf_test.c0000644000102200007640000000474011272135130014721 00000000000000/* * Test reading and writing of UF files by using the histogram function. * * 1. Read WSR88D file. * 2. Print histogram of DZ volume. * 3. Output Radar to UF. * 3. Free Radar structure. * 4. Read UF into Radar. * 5. Print histogram of DZ volume. * * The two outputted histograms should be identical. * */ #include #ifdef sgi #include #endif #include #include #include #include "rsl.h" usage() { fprintf(stderr,"Usage: wsr_hist_uf_test infile [-s site_id]\n"); exit(-1); } process_args(int argc, char **argv, char **in_file, char **site) { int c; while ((c = getopt(argc, argv, "s:")) != -1) switch (c) { case 's': *site = strdup(optarg); break; case '?': usage(argv); break; default: break; } if (argc - optind == 1) *in_file = strdup(argv[optind]); else usage(); } main(int argc, char **argv) { char *infile; char *site = NULL; Radar *radar; Histogram *histogram = NULL; process_args(argc, argv, &infile, &site); RSL_radar_verbose_on(); if ((radar = RSL_anyformat_to_radar(infile, site)) == NULL) { /* RSL_wsr88d_to_radar writes an error message to stdout. */ exit(-1); } /***********************************************************************/ /* */ /* You now have a pointer to Radar. */ /* Now use *radar all you like. */ /* */ /***********************************************************************/ /* Use radar->v[DZ_INDEX] for REFELECTIVITY * radar->v[VR_INDEX] for VELOCITY * radar->v[SW_INDEX] for SPECTRUM_WIDTH */ printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); RSL_radar_to_uf(radar, "uf_file.uf"); histogram = RSL_get_histogram_from_volume(radar->v[DZ_INDEX], histogram, -30, 70, 0, 200); RSL_print_histogram(histogram, 0, 200, "hist_wsr88d_to_radar.dat"); RSL_free_radar(radar); RSL_radar_verbose_on(); printf("RSL_uf_to_radar\n"); radar = RSL_uf_to_radar("uf_file.uf"); histogram = NULL; /* There should be a free here. */ histogram = RSL_get_histogram_from_volume(radar->v[DZ_INDEX], histogram, -30, 70, 0, 200); RSL_print_histogram(histogram, 0, 200, "hist_uf_to_radar.dat"); exit(0); } rsl-v1.43/examples/Makefile.in0000644000102200007640000005407011747610602013241 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 = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = any_to_gif$(EXEEXT) any_to_uf$(EXEEXT) qlook$(EXEEXT) noinst_PROGRAMS = any_to_ppm$(EXEEXT) any_to_ufgz$(EXEEXT) \ bscan$(EXEEXT) cappi_image$(EXEEXT) dorade_main$(EXEEXT) \ killer_sweep$(EXEEXT) kwaj_subtract_one_day$(EXEEXT) \ lassen_to_gif$(EXEEXT) print_hash_table$(EXEEXT) \ print_header_info$(EXEEXT) sector$(EXEEXT) \ test_get_win$(EXEEXT) wsr88d_to_gif$(EXEEXT) \ wsr_hist_uf_test$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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) $(noinst_PROGRAMS) any_to_gif_SOURCES = any_to_gif.c any_to_gif_OBJECTS = any_to_gif.$(OBJEXT) any_to_gif_LDADD = $(LDADD) am__DEPENDENCIES_1 = ../.libs/librsl.a any_to_gif_DEPENDENCIES = $(am__DEPENDENCIES_1) any_to_ppm_SOURCES = any_to_ppm.c any_to_ppm_OBJECTS = any_to_ppm.$(OBJEXT) any_to_ppm_LDADD = $(LDADD) any_to_ppm_DEPENDENCIES = $(am__DEPENDENCIES_1) any_to_uf_SOURCES = any_to_uf.c any_to_uf_OBJECTS = any_to_uf.$(OBJEXT) any_to_uf_LDADD = $(LDADD) any_to_uf_DEPENDENCIES = $(am__DEPENDENCIES_1) any_to_ufgz_SOURCES = any_to_ufgz.c any_to_ufgz_OBJECTS = any_to_ufgz.$(OBJEXT) any_to_ufgz_LDADD = $(LDADD) any_to_ufgz_DEPENDENCIES = $(am__DEPENDENCIES_1) bscan_SOURCES = bscan.c bscan_OBJECTS = bscan.$(OBJEXT) bscan_LDADD = $(LDADD) bscan_DEPENDENCIES = $(am__DEPENDENCIES_1) cappi_image_SOURCES = cappi_image.c cappi_image_OBJECTS = cappi_image.$(OBJEXT) cappi_image_LDADD = $(LDADD) cappi_image_DEPENDENCIES = $(am__DEPENDENCIES_1) dorade_main_SOURCES = dorade_main.c dorade_main_OBJECTS = dorade_main.$(OBJEXT) dorade_main_LDADD = $(LDADD) dorade_main_DEPENDENCIES = $(am__DEPENDENCIES_1) killer_sweep_SOURCES = killer_sweep.c killer_sweep_OBJECTS = killer_sweep.$(OBJEXT) killer_sweep_LDADD = $(LDADD) killer_sweep_DEPENDENCIES = $(am__DEPENDENCIES_1) kwaj_subtract_one_day_SOURCES = kwaj_subtract_one_day.c kwaj_subtract_one_day_OBJECTS = kwaj_subtract_one_day.$(OBJEXT) kwaj_subtract_one_day_LDADD = $(LDADD) kwaj_subtract_one_day_DEPENDENCIES = $(am__DEPENDENCIES_1) lassen_to_gif_SOURCES = lassen_to_gif.c lassen_to_gif_OBJECTS = lassen_to_gif.$(OBJEXT) lassen_to_gif_LDADD = $(LDADD) lassen_to_gif_DEPENDENCIES = $(am__DEPENDENCIES_1) print_hash_table_SOURCES = print_hash_table.c print_hash_table_OBJECTS = print_hash_table.$(OBJEXT) print_hash_table_LDADD = $(LDADD) print_hash_table_DEPENDENCIES = $(am__DEPENDENCIES_1) print_header_info_SOURCES = print_header_info.c print_header_info_OBJECTS = print_header_info.$(OBJEXT) print_header_info_LDADD = $(LDADD) print_header_info_DEPENDENCIES = $(am__DEPENDENCIES_1) am_qlook_OBJECTS = qlook.$(OBJEXT) qlook_usage.$(OBJEXT) \ adjust_gate_size.$(OBJEXT) qlook_OBJECTS = $(am_qlook_OBJECTS) qlook_LDADD = $(LDADD) qlook_DEPENDENCIES = $(am__DEPENDENCIES_1) sector_SOURCES = sector.c sector_OBJECTS = sector.$(OBJEXT) sector_LDADD = $(LDADD) sector_DEPENDENCIES = $(am__DEPENDENCIES_1) test_get_win_SOURCES = test_get_win.c test_get_win_OBJECTS = test_get_win.$(OBJEXT) test_get_win_LDADD = $(LDADD) test_get_win_DEPENDENCIES = $(am__DEPENDENCIES_1) wsr88d_to_gif_SOURCES = wsr88d_to_gif.c wsr88d_to_gif_OBJECTS = wsr88d_to_gif.$(OBJEXT) wsr88d_to_gif_LDADD = $(LDADD) wsr88d_to_gif_DEPENDENCIES = $(am__DEPENDENCIES_1) wsr_hist_uf_test_SOURCES = wsr_hist_uf_test.c wsr_hist_uf_test_OBJECTS = wsr_hist_uf_test.$(OBJEXT) wsr_hist_uf_test_LDADD = $(LDADD) wsr_hist_uf_test_DEPENDENCIES = $(am__DEPENDENCIES_1) 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) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = any_to_gif.c any_to_ppm.c any_to_uf.c any_to_ufgz.c bscan.c \ cappi_image.c dorade_main.c killer_sweep.c \ kwaj_subtract_one_day.c lassen_to_gif.c print_hash_table.c \ print_header_info.c $(qlook_SOURCES) sector.c test_get_win.c \ wsr88d_to_gif.c wsr_hist_uf_test.c DIST_SOURCES = any_to_gif.c any_to_ppm.c any_to_uf.c any_to_ufgz.c \ bscan.c cappi_image.c dorade_main.c killer_sweep.c \ kwaj_subtract_one_day.c lassen_to_gif.c print_hash_table.c \ print_header_info.c $(qlook_SOURCES) sector.c test_get_win.c \ wsr88d_to_gif.c wsr_hist_uf_test.c ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ 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@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(prefix)/include LOCAL_LIB = ../.libs/librsl.a LDADD = @LIBS@ $(LOCAL_LIB) any_to_gif_LDFLAGS = -static any_to_uf_LDFLAGS = -static # Only this one has more than one source. All the others use the # default *.c format. qlook_SOURCES = qlook.c qlook_usage.c adjust_gate_size.c EXTRA_DIST = run_tests all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(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 examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(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 \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(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: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done any_to_gif$(EXEEXT): $(any_to_gif_OBJECTS) $(any_to_gif_DEPENDENCIES) @rm -f any_to_gif$(EXEEXT) $(LINK) $(any_to_gif_LDFLAGS) $(any_to_gif_OBJECTS) $(any_to_gif_LDADD) $(LIBS) any_to_ppm$(EXEEXT): $(any_to_ppm_OBJECTS) $(any_to_ppm_DEPENDENCIES) @rm -f any_to_ppm$(EXEEXT) $(LINK) $(any_to_ppm_LDFLAGS) $(any_to_ppm_OBJECTS) $(any_to_ppm_LDADD) $(LIBS) any_to_uf$(EXEEXT): $(any_to_uf_OBJECTS) $(any_to_uf_DEPENDENCIES) @rm -f any_to_uf$(EXEEXT) $(LINK) $(any_to_uf_LDFLAGS) $(any_to_uf_OBJECTS) $(any_to_uf_LDADD) $(LIBS) any_to_ufgz$(EXEEXT): $(any_to_ufgz_OBJECTS) $(any_to_ufgz_DEPENDENCIES) @rm -f any_to_ufgz$(EXEEXT) $(LINK) $(any_to_ufgz_LDFLAGS) $(any_to_ufgz_OBJECTS) $(any_to_ufgz_LDADD) $(LIBS) bscan$(EXEEXT): $(bscan_OBJECTS) $(bscan_DEPENDENCIES) @rm -f bscan$(EXEEXT) $(LINK) $(bscan_LDFLAGS) $(bscan_OBJECTS) $(bscan_LDADD) $(LIBS) cappi_image$(EXEEXT): $(cappi_image_OBJECTS) $(cappi_image_DEPENDENCIES) @rm -f cappi_image$(EXEEXT) $(LINK) $(cappi_image_LDFLAGS) $(cappi_image_OBJECTS) $(cappi_image_LDADD) $(LIBS) dorade_main$(EXEEXT): $(dorade_main_OBJECTS) $(dorade_main_DEPENDENCIES) @rm -f dorade_main$(EXEEXT) $(LINK) $(dorade_main_LDFLAGS) $(dorade_main_OBJECTS) $(dorade_main_LDADD) $(LIBS) killer_sweep$(EXEEXT): $(killer_sweep_OBJECTS) $(killer_sweep_DEPENDENCIES) @rm -f killer_sweep$(EXEEXT) $(LINK) $(killer_sweep_LDFLAGS) $(killer_sweep_OBJECTS) $(killer_sweep_LDADD) $(LIBS) kwaj_subtract_one_day$(EXEEXT): $(kwaj_subtract_one_day_OBJECTS) $(kwaj_subtract_one_day_DEPENDENCIES) @rm -f kwaj_subtract_one_day$(EXEEXT) $(LINK) $(kwaj_subtract_one_day_LDFLAGS) $(kwaj_subtract_one_day_OBJECTS) $(kwaj_subtract_one_day_LDADD) $(LIBS) lassen_to_gif$(EXEEXT): $(lassen_to_gif_OBJECTS) $(lassen_to_gif_DEPENDENCIES) @rm -f lassen_to_gif$(EXEEXT) $(LINK) $(lassen_to_gif_LDFLAGS) $(lassen_to_gif_OBJECTS) $(lassen_to_gif_LDADD) $(LIBS) print_hash_table$(EXEEXT): $(print_hash_table_OBJECTS) $(print_hash_table_DEPENDENCIES) @rm -f print_hash_table$(EXEEXT) $(LINK) $(print_hash_table_LDFLAGS) $(print_hash_table_OBJECTS) $(print_hash_table_LDADD) $(LIBS) print_header_info$(EXEEXT): $(print_header_info_OBJECTS) $(print_header_info_DEPENDENCIES) @rm -f print_header_info$(EXEEXT) $(LINK) $(print_header_info_LDFLAGS) $(print_header_info_OBJECTS) $(print_header_info_LDADD) $(LIBS) qlook$(EXEEXT): $(qlook_OBJECTS) $(qlook_DEPENDENCIES) @rm -f qlook$(EXEEXT) $(LINK) $(qlook_LDFLAGS) $(qlook_OBJECTS) $(qlook_LDADD) $(LIBS) sector$(EXEEXT): $(sector_OBJECTS) $(sector_DEPENDENCIES) @rm -f sector$(EXEEXT) $(LINK) $(sector_LDFLAGS) $(sector_OBJECTS) $(sector_LDADD) $(LIBS) test_get_win$(EXEEXT): $(test_get_win_OBJECTS) $(test_get_win_DEPENDENCIES) @rm -f test_get_win$(EXEEXT) $(LINK) $(test_get_win_LDFLAGS) $(test_get_win_OBJECTS) $(test_get_win_LDADD) $(LIBS) wsr88d_to_gif$(EXEEXT): $(wsr88d_to_gif_OBJECTS) $(wsr88d_to_gif_DEPENDENCIES) @rm -f wsr88d_to_gif$(EXEEXT) $(LINK) $(wsr88d_to_gif_LDFLAGS) $(wsr88d_to_gif_OBJECTS) $(wsr88d_to_gif_LDADD) $(LIBS) wsr_hist_uf_test$(EXEEXT): $(wsr_hist_uf_test_OBJECTS) $(wsr_hist_uf_test_DEPENDENCIES) @rm -f wsr_hist_uf_test$(EXEEXT) $(LINK) $(wsr_hist_uf_test_LDFLAGS) $(wsr_hist_uf_test_OBJECTS) $(wsr_hist_uf_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjust_gate_size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_to_gif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_to_ppm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_to_uf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/any_to_ufgz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bscan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cappi_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dorade_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/killer_sweep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kwaj_subtract_one_day.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lassen_to_gif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_hash_table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_header_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qlook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qlook_usage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_get_win.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr88d_to_gif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsr_hist_uf_test.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) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool 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 clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool 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 \ mostlyclean-libtool 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 clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool 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 mostlyclean-libtool 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: rsl-v1.43/examples/qlook_usage.c0000644000102200007640000000776411377047116013664 00000000000000#define TRUE 1 #define FALSE 0 #include #include #include #include void process_args(int argc, char **argv, char *in_file, int *verbose, char *site_id, char *tape_id, int *qc_reflectivity, int *total_reflectivity, int *differential_reflectivity, int *velocity, int *spectral_width, int *make_gif, int *make_pgm, int *make_bscan, int *make_uf, int *num_sweeps, float *dbz_offset, int *xdim, int *ydim, float *range, float *gate_size_adjustment, int *print_azim, char *gifdir, char *pgmdir, char *ufdir) { extern char *optarg; extern int optind, optopt; char c; while ((c = getopt(argc, argv, "vgpus:t:n:x:y:r:o:a:ADCQTWVG:P:U:")) != -1) { switch(c) { /* RSL Verbose flag */ case 'v': *verbose = TRUE; break; /* s: First file or call sign */ case 's': strcpy(site_id, optarg); break; case 't': strcpy(tape_id, optarg); break; /* x: x dimension y: y dimension r: max range z: zoom factor (km/pixel) */ case 'x': *xdim = atoi(optarg); break; case 'y': *ydim = atoi(optarg); break; case 'r': *range = atof(optarg); break; case 'a': *gate_size_adjustment = atof(optarg); break; /* dBZ Offset */ case 'o': *dbz_offset = atof(optarg); break; /* T: Total reflectivity Q: Do qc'd reflectivity V: Do radial velocity W: Do spectral width */ case 'Q': *qc_reflectivity = TRUE; break; case 'T': *total_reflectivity = TRUE; break; case 'V': *velocity = TRUE; break; case 'W': *spectral_width = TRUE; break; case 'A': *print_azim = TRUE; break; case 'D': *differential_reflectivity = TRUE; break; /* g: Make gif images p: Make pgm images u: Make uf files */ case 'g': *make_gif = TRUE; break; case 'p': *make_pgm = TRUE; break; case 'u': *make_uf = TRUE; break; /* G: gif directory P: pgm directory U: uf directory */ case 'G': strcpy(gifdir, optarg); break; case 'P': strcpy(pgmdir, optarg); break; case 'U': strcpy(ufdir, optarg); break; /* num_sweeps: Number of sweeps to make images of */ case 'n': *num_sweeps = atoi(optarg); break; /* Deal with bad input */ case '?': fprintf(stderr, "ERROR: option -%c is undefined\n", optopt); goto Usage; case ':': fprintf(stderr, "ERROR: option -%c requires an argument\n",optopt); goto Usage; default: break; } } /* Must have at the least a file listed on the command lines, everything can be defaulted. */ if (argc - optind != 1) { Usage: fprintf(stderr,"ERROR:::\n"); fprintf(stderr,"%s [options] input_file:",argv[0]); fprintf(stderr,"\n[options]: "); fprintf(stderr,"\n\t[-v verbose_flag?] "); fprintf(stderr,"\n\t[-s First file or call sign?] "); fprintf(stderr,"\n\t[-t Tape ID] "); fprintf(stderr,"\n\t[-u Make UF file]"); fprintf(stderr,"\n\t[-g Make GIF images?]"); fprintf(stderr,"\n\t[-p Make PGM images?]"); fprintf(stderr,"\n\t[-U Directory for UF output files]"); fprintf(stderr,"\n\t[-G Directory for GIF output files]"); fprintf(stderr,"\n\t[-P Directory for PGM output files]"); fprintf(stderr,"\n\t[-x X dimension]"); fprintf(stderr,"\n\t[-y Y dimension]"); fprintf(stderr,"\n\t[-r max range]"); fprintf(stderr,"\n\t[-n Number of sweeps to make images]"); fprintf(stderr,"\n\t[-Q Do qc reflectivity]"); fprintf(stderr,"\n\t[-T Do total reflectivity]"); fprintf(stderr,"\n\t[-V Do velocity]"); fprintf(stderr,"\n\t[-W Do spectral_width]"); fprintf(stderr,"\n\t[-D Do differential reflectivity"); fprintf(stderr,"\n\t[-o Apply dBZ offset"); fprintf(stderr,":::\n"); exit(-1); } strcpy(in_file, argv[optind]); } rsl-v1.43/examples/wsr88d_to_gif.c0000644000102200007640000000327311565520526014030 00000000000000/* * Ingest NEXRAD (wsr88d) data and output 3 gif images representing * Reflectivity, Velocity and Spectrum width. * * This example is the most minimum of coding that you need to do * to achieve good results from using the RSL code. * * This is short and sweet to demonstrate the simplicity of use for * the RSL. * * CAN READ STDIN. * * wsr88d_to_gif < file * wsr88d_to_gif file [tape_header_file] */ #include #include "rsl.h" int main(int argc, char **argv) { Radar *radar; /* * Pass bitwise or of DZ_MASK, VR_MASK, SW_MASK */ RSL_radar_verbose_on(); /* Not needed; on a slow network it bides the time. */ radar = RSL_wsr88d_to_radar(argv[1], argv[2]); if (radar == NULL) exit(-1); /* RSL_sort_radar(radar); */ /***********************************************************************/ /* */ /* You now have a pointer to Radar. */ /* Now use *radar all you like. */ /* */ /***********************************************************************/ /* Use radar->v[DZ_INDEX] for REFELECTIVITY * radar->v[VR_INDEX] for VELOCITY * radar->v[SW_INDEX] for SPECTRUM_WIDTH */ RSL_load_refl_color_table(); RSL_volume_to_gif(radar->v[DZ_INDEX], "dz_sweep", 400, 400, 200.0); RSL_load_vel_color_table(); RSL_rebin_velocity_volume(radar->v[VR_INDEX]); /* Modifies v[i]. */ RSL_volume_to_gif(radar->v[VR_INDEX], "vr_sweep", 400, 400, 200.0); RSL_load_sw_color_table(); RSL_volume_to_gif(radar->v[SW_INDEX], "sw_sweep", 400, 400, 200.0); exit(0); } rsl-v1.43/examples/dorade_main.c0000644000102200007640000000056411565520526013604 00000000000000#include #include #include "rsl.h" int main(int argc, char **argv) { Radar *radar; if (argc != 2) { fprintf(stderr, "No filename specified.\n"); exit(0); } RSL_radar_verbose_on(); radar = RSL_dorade_to_radar(argv[1]); if (radar == NULL) printf("radar == NULL\n"); else printf("radar == %x\n", (unsigned int)radar); exit(0); } rsl-v1.43/examples/print_hash_table.c0000644000102200007640000000623311565520526014647 00000000000000/* * Ingest NEXRAD (wsr88d) data and print the azimuth hash table created. * * This example is the most minimum of coding that you need to do * to achieve good results from using the RSL code. * * This is short and sweet to demonstrate the simplicity of use for * the RSL. * */ #include #include "rsl.h" void print_link_list(Azimuth_hash *list) { if (list == NULL) { printf("\n"); return; } printf("ray# %d azim %f, hi# %d lo# %d|", list->ray->h.ray_num, list->ray->h.azimuth, list->ray_high->ray->h.ray_num, list->ray_low->ray->h.ray_num); print_link_list(list->next); } /* * Cannot compile if the hash table is static in volume.c. For * testing we make it globally known. */ typedef struct { Sweep *s_addr; Hash_table *hash; } Sweep_list; extern int RSL_max_sweeps; /* Initial allocation for sweep_list. * RSL_new_sweep will allocate the space first * time around. */ extern int RSL_nsweep_addr; /* A count of sweeps in the table. */ extern Sweep_list *RSL_sweep_list; extern int RSL_nextents; void print_hash_table (Sweep *s) { int i; int sweep_index; Azimuth_hash *index; float azim; float res; if (s == NULL) return; sweep_index = SWEEP_INDEX(s); res = 360.0/RSL_sweep_list[sweep_index].hash->nindexes; printf("Azimuth resolution = %f for %d bins.\n", res, RSL_sweep_list[sweep_index].hash->nindexes); for (i=0; inindexes; i++) { index = RSL_sweep_list[sweep_index].hash->indexes[i]; azim = i/res; printf("RSL_sweep_list[%d].hash->indexes[%d] = ", sweep_index, i); if (index == NULL) printf("IS NULL\n"); else print_link_list(index); } } void poke_about_sweep(Sweep *s) { /* This routine demonstrates that the azimuth we want is the azimuth * we get. */ float azim, res; Ray *ray; ray = RSL_get_first_ray_of_sweep(s); res = 360.0/s->h.nrays; for (azim=0; azim<360; azim+=res) { ray = RSL_get_ray_from_sweep(s, azim); if (ray) printf("Azimuth %f matched in ray # %d, h.azimuth= %f, diff=%f\n", azim, ray->h.ray_num, ray->h.azimuth, ray->h.azimuth-azim); else printf("Azimuth %f NOT FOUND within 1/2 beamwidth; 1/2beam=%f\n", azim, s->h.horz_half_bw); } } int main(int argc, char **argv) { Radar *radar; Sweep *sweep; if (argc != 3) {fprintf(stderr, "Usage: %s infile callid_or_firstfile\n", argv[0]); exit(-1);} RSL_radar_verbose_on(); radar = RSL_wsr88d_to_radar(argv[1], argv[2]); if (radar == NULL) exit(-1); /***********************************************************************/ /* */ /* You now have a pointer to Radar. */ /* Now use *radar all you like. */ /* */ /***********************************************************************/ /* Use radar->v[DZ_INDEX] for REFELECTIVITY * radar->v[VR_INDEX] for VELOCITY * radar->v[SW_INDEX] for SPECTRUM_WIDTH */ sweep = RSL_get_first_sweep_of_volume(radar->v[DZ_INDEX]); print_hash_table(sweep); poke_about_sweep(sweep); exit(0); } rsl-v1.43/examples/any_to_gif.c0000644000102200007640000001105311565520526013453 00000000000000/* * Ingest NEXRAD (wsr88d) data and output images representing * all field types found. * * This example is the most minimum of coding that you need to do * to achieve good results from using the RSL code. * * This is short and sweet to demonstrate the simplicity of use for * the RSL. * */ #define USE_RSL_VARS #include "rsl.h" /* Example use for getopt; argument processing */ /* ------ * Remember that to pass back strings you must pass the * address of the pointer to the string; argument is char **. * (Note: arrays of characters; the name is char **) * Ex. * char *file * process_args(... &file); * DECLARE as: process_args(... char **file) * *file = strdup(argv[optind]); * * char infile[80]; * process_args(... infile ...); * DECLARE as: process_args(... char *infile ...) * strcpy(infile, argv[optind]); */ #include #include #include #include int usage(char **argv) { fprintf(stderr, "Usage: %s (v1.20) [-v] [-V] [-x n] [-y n] [-r x] infile [callid_or_firstfile]\n\n", argv[0]); fprintf(stderr, "Where: -v = verbose print. Default = no printing.\n"); fprintf(stderr, " -V = Output entire volume. Default = output first sweep only.\n"); fprintf(stderr, " -x n = Image dimension, image is n x n pixels. Default = 400x400 pixels.\n"); fprintf(stderr, " -r x = Range of radar data. Default = 400.0 km.\n"); fprintf(stderr, " -b x = Make black for dbz below x. Default = 0 (no action).\n"); exit(-1); } process_args(int argc, char **argv, char **in_file, char **callid, int *verbose, int *wholevolume, int *xdim, float *range, int *dbz_black) { int c; while ((c = getopt(argc, argv, "x:r:b:vV")) != -1) switch (c) { case 'v': *verbose = 1; break; case 'V': *wholevolume = 1; break; case 'x': *xdim = atoi(optarg); break; case 'r': *range = atof(optarg); break; case 'b': *dbz_black = atoi(optarg); break; case '?': usage(argv); break; default: break; } /* must have 2 files listed */ if (argc - optind != 1 && argc - optind != 2) usage(argv); /* Can use strdup, if desired */ /* strdup allocates memory */ /* in_file = strdup(argv[optind]); */ *in_file = strdup(argv[optind]); if (argc - optind == 2) *callid = strdup(argv[optind+1]); else *callid = NULL; } int main(int argc, char **argv) { Radar *radar; Sweep *sweep; Ray *ray; int i, j; char fname[1000]; char *infile, *callid; char time_string[100]; int verbose; int wholevolume; int xdim; float range; int dbz_black; verbose = 0; wholevolume = 0; xdim = 400; range = 400.0; dbz_black = 0; process_args(argc, argv, &infile, &callid, &verbose, &wholevolume, &xdim, &range, &dbz_black); if (verbose) RSL_radar_verbose_on(); /* Not needed; it bides the time. */ RSL_select_fields("all", NULL); RSL_read_these_sweeps("all", NULL); radar = RSL_anyformat_to_radar(infile, callid); if (radar == NULL) exit(-1); if (0) { RSL_write_radar(radar, "rsl.rsl"); exit(0); } sprintf(time_string,"%2.2d%2.2d%2.2d_%2.2d%2.2d", radar->h.month, radar->h.day, radar->h.year-1900, radar->h.hour, radar->h.minute); for (i=0; iv[i]); ray = RSL_get_first_ray_of_volume(radar->v[i]); if (sweep) { if (i == SW_INDEX) RSL_load_sw_color_table(); else if (i == VR_INDEX || i == VE_INDEX) { RSL_load_vel_color_table(); RSL_rebin_velocity_volume(radar->v[i]); } else RSL_load_refl_color_table(); { char r[256], g[256], b[256]; int nc; int i; RSL_get_color_table(RSL_RED_TABLE, r, &nc); RSL_get_color_table(RSL_GREEN_TABLE, g, &nc); RSL_get_color_table(RSL_BLUE_TABLE, b, &nc); for (i=0; ih.name, sizeof(radar->h.name)); for (j=0; jh.name); j++) if (fname[j] == '\0' || fname[j] == ' ') break; if (j==sizeof(radar->h.name)) j--; if (! wholevolume) { sprintf(&fname[j], "_%s_%s.gif", RSL_ftype[i], time_string); /* printf("FNAME = <%s>\n", fname); */ RSL_sweep_to_gif(sweep, fname, xdim, xdim, range); printf("%s\n", fname); } else { sprintf(&fname[j], "_%s_%s", RSL_ftype[i], time_string); /* RSL_volume_to_gif outputs to stdout the filenames produced. */ RSL_volume_to_gif(radar->v[i], fname, xdim, xdim, range); } } } exit(0); } rsl-v1.43/examples/lassen_to_gif.c0000644000102200007640000000122211565520526014146 00000000000000/* * lassen_to_gif [file] * * This program can read the file from stdin. */ #include #include "rsl.h" int main(int argc, char **argv) { Radar *radar; RSL_radar_verbose_on(); radar = RSL_lassen_to_radar(argv[1]); if (radar == NULL) exit(-1); RSL_load_refl_color_table(); RSL_volume_to_gif(radar->v[DZ_INDEX], "dz_sweep", 400, 400, 200.0); RSL_load_vel_color_table(); RSL_rebin_velocity_volume(radar->v[VR_INDEX]); /* Modifies v[i]. */ RSL_volume_to_gif(radar->v[VR_INDEX], "vr_sweep", 400, 400, 200.0); RSL_load_sw_color_table(); RSL_volume_to_gif(radar->v[SW_INDEX], "sw_sweep", 400, 400, 200.0); exit(0); } rsl-v1.43/examples/killer_sweep.c0000644000102200007640000001036011565520526014022 00000000000000/* * This app tests what happens when a sweep has just one azimuth bin for * all the rays. I will first read real data then permute the sweeps. * Then, I'll check how the hash table were built. Based on print_hash_table. */ #include "rsl.h" #include void print_link_list(Azimuth_hash *list) { if (list == NULL) { printf("\n"); return; } printf("\n ray# %d azim %f, hi# %d lo# %d", list->ray->h.ray_num, list->ray->h.azimuth, list->ray_high->ray->h.ray_num, list->ray_low->ray->h.ray_num); print_link_list(list->next); } /* * Cannot compile if the hash table is static in volume.c. For * testing we make it globally known. */ typedef struct { Sweep *s_addr; Hash_table *hash; } Sweep_list; extern int RSL_max_sweeps; /* Initial allocation for sweep_list. * RSL_new_sweep will allocate the space first * time around. */ extern int RSL_nsweep_addr; /* A count of sweeps in the table. */ extern Sweep_list *RSL_sweep_list; extern int RSL_nextents; void print_hash_table (Sweep *s) { int i; int sweep_index; Azimuth_hash *index; float azim; float res; if (s == NULL) return; sweep_index = SWEEP_INDEX(s); res = 360.0/RSL_sweep_list[sweep_index].hash->nindexes; printf("Azimuth resolution = %f for %d bins.\n", res, RSL_sweep_list[sweep_index].hash->nindexes); for (i=0; inindexes; i++) { index = RSL_sweep_list[sweep_index].hash->indexes[i]; azim = i/res; printf("RSL_sweep_list[%d].hash->indexes[%d] = ", sweep_index, i); if (index == NULL) printf("IS NULL\n"); else print_link_list(index); } } void poke_about_sweep(Sweep *s) { /* This routine demonstrates that the azimuth we want is the azimuth * we get. */ float azim, res; Ray *ray; ray = RSL_get_first_ray_of_sweep(s); res = 360.0/s->h.nrays; for (azim=0; azim<360; azim+=res) { ray = RSL_get_ray_from_sweep(s, azim); if (ray) printf("Azimuth %f matched in ray # %d, h.azimuth= %f, diff=%f\n", azim, ray->h.ray_num, ray->h.azimuth, ray->h.azimuth-azim); else printf("Azimuth %f NOT FOUND within 1/2 beamwidth; 1/2beam=%f\n", azim, s->h.horz_half_bw); } } float random_azim(void) { double drand; drand = drand48()*1; return (float)drand; } Sweep *permute_sweep(Sweep *sweep) { int i; Ray *ray; if (sweep == NULL) return NULL; for (i=0; ih.nrays; i++) { ray = sweep->ray[i]; if (ray == NULL) continue; ray->h.azimuth = random_azim(); } return sweep; } Volume *permute_volume(Volume *volume) { int i; if (volume == NULL) return NULL; for (i=0; ih.nsweeps; i++) volume->sweep[i] = permute_sweep(volume->sweep[i]); return volume; } Radar *permute_radar(Radar *radar) { int i; if (radar == NULL) return NULL; for (i=0; ih.nvolumes; i++) radar->v[i] = permute_volume(radar->v[i]); printf("Radar permuted. Now, redo the ray_indexes.\n"); return radar; } void chase_hi_links(Sweep *sweep) { int i; Azimuth_hash *table; Hash_table *hash_table; float last_azimuth; float azimuth; if (sweep == NULL) return; hash_table = hash_table_for_sweep(sweep); table = hash_table->indexes[0]; printf("Printing HI links. This has better be a sorted output.\n"); printf("ELEVATION angle = %f\n", sweep->h.elev); for (i=0, last_azimuth=-1;ih.nrays; i++) { if (table == NULL) continue; printf(" ray# %3d azim %8.6f hi# %3d lo# %3d\n", table->ray->h.ray_num, table->ray->h.azimuth, table->ray_high->ray->h.ray_num, table->ray_low->ray->h.ray_num); azimuth = table->ray->h.azimuth; if (azimuth < last_azimuth) printf("AZIMUTH OUT OF ORDER\n"); last_azimuth = azimuth; table = table->ray_high; } } int main(int argc, char **argv) { Radar *radar; Sweep *sweep; int i; if (argc < 2 || argc > 3) {fprintf(stderr, "Usage: %s infile [callid_or_firstfile]\n", argv[0]); exit(-1);} RSL_radar_verbose_on(); radar = RSL_anyformat_to_radar(argv[1], argv[2]); if (radar == NULL) { printf("RADAR IS NULL.\n"); exit(-1); } printf("permute_radar\n"); radar = permute_radar(radar); for (i=0; iv[DZ_INDEX]->h.nsweeps; i++) { sweep = radar->v[DZ_INDEX]->sweep[i]; chase_hi_links(sweep); } /* print_hash_table(sweep); poke_about_sweep(sweep); */ exit(0); } rsl-v1.43/examples/any_to_ppm.c0000644000102200007640000000326711565520526013512 00000000000000/* * Ingest NEXRAD (wsr88d) data and output images representing * all field types found. * * This example is the most minimum of coding that you need to do * to achieve good results from using the RSL code. * * This is short and sweet to demonstrate the simplicity of use for * the RSL. * */ #include #define USE_RSL_VARS #include "rsl.h" int main(int argc, char **argv) { Radar *radar; Sweep *sweep; Ray *ray; int i; char fname[100]; if (argc < 2 || argc > 3) { fprintf(stderr, "Usage: %s infile [callid_or_firstfile]\n", argv[0]); exit(-1); } RSL_radar_verbose_on(); /* Not needed; it bides the time. */ RSL_select_fields("all", NULL); radar = RSL_anyformat_to_radar(argv[1], argv[2]); if (radar == NULL) exit(-1); if (0) { RSL_write_radar(radar, "rsl.rsl"); exit(0); } { char time_string[100]; sprintf(time_string,"%2.2d%2.2d%2.2d_%2.2d%2.2d", radar->h.month, radar->h.day, radar->h.year-1900, radar->h.hour, radar->h.minute); } for (i=0; iv[i]); ray = RSL_get_first_ray_of_volume(radar->v[i]); if (sweep) { if (i == SW_INDEX) RSL_load_sw_color_table(); else if (i == VR_INDEX || i == VE_INDEX) { RSL_load_vel_color_table(); RSL_rebin_velocity_volume(radar->v[i]); } else RSL_load_refl_color_table(); #undef DO_SWEEP #define DO_SWEEP #ifdef DO_SWEEP sprintf(fname, "%s_sweep.ppm", RSL_ftype[i]); RSL_sweep_to_ppm(sweep, fname, 400, 400, 200.0); fprintf(stderr, "Wrote %s\n", fname); #else sprintf(fname, "%s_sweep", RSL_ftype[i]); RSL_volume_to_gif(radar->v[i], fname, 400, 400, 200.0); #endif } } exit(0); } rsl-v1.43/examples/run_tests0000755000102200007640000001764307021115215013143 00000000000000#!/usr/bin/perl #-*-Perl-*- # Pretty unsophisicated. sub runit { print "COMMAND @_\n"; system("@_"); } sub diffimage { # Convert to ppm. GIF stores date in header! local ($gif) = @_; $ipath = '../../rsl_test_images'; system("giftoppm $gif > img_junk1.ppm"); system("giftoppm $ipath/$gif > img_junk2.ppm"); $s = `diff -q img_junk1.ppm img_junk2.ppm`; unlink(); if ($s eq "") { print "MATCH: $gif and $ipath/$gif are identical ... good.\n"; } else { print "-------- Files $gif and $ipath/$gif are different.\n"; } } &runit('any_to_gif -r200 /d8/merritt/l00038.ppi'); &diffimage('radtec_DZ_051298_1429.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 200 /d8/merritt/1C51.921002.13.MELB.1.HDF'); #runit('xv MELB_DZ_100292_1205.gif'); #runit('xv MELB_CZ_100292_1205.gif'); &diffimage('MELB_DZ_100292_1205.gif'); &diffimage('MELB_CZ_100292_1205.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 200 /d8/merritt/19980127050001.vol'); #runit('xv Berrima_ZT_012798_0500.gif'); #runit('xv Berrima_VR_012798_0500.gif'); #runit('xv Berrima_SW_012798_0500.gif'); &diffimage('Berrima_ZT_012798_0500.gif'); &diffimage('Berrima_VR_012798_0500.gif'); &diffimage('Berrima_SW_012798_0500.gif'); print "---------------------------------------------\n"; &runit('qlook -v -g -D -V /d8/merritt/Lassen_mp.vol'); #runit('xv dz_951117_0730_00.gif'); #runit('xv dr_951117_0730_00.gif'); #runit('xv vr_951117_0730_00.gif'); &diffimage('dz_951117_0730_00.gif'); &diffimage('dr_951117_0730_00.gif'); &diffimage('vr_951117_0730_00.gif'); print "---------------------------------------------\n"; &runit('qlook -v -g -W -V /d8/merritt/nex.file.2'); #runit('xv dz_930701_1957_00.gif'); #runit('xv vr_930701_1957_00.gif'); #runit('xv sw_930701_1957_00.gif'); &diffimage('dz_930701_1957_00.gif'); &diffimage('vr_930701_1957_00.gif'); &diffimage('sw_930701_1957_00.gif'); print "---------------------------------------------\n"; &runit('qlook -v -g -W -V /d8/merritt/nex.file.2.gz'); #runit('xv vr_930701_1957_00.gif'); &diffimage('dz_930701_1957_00.gif'); &diffimage('sw_930701_1957_00.gif'); &diffimage('vr_930701_1957_00.gif'); print "---------------------------------------------\n"; &runit('cappi_image /d8/merritt/nex.file.2.gz KMLB'); #runit('xv cappi_03.gif'); &diffimage('cappi_01.gif'); &diffimage('cappi_02.gif'); &diffimage('cappi_03.gif'); &diffimage('cappi_04.gif'); &diffimage('cappi_05.gif'); print "---------------------------------------------\n"; &runit('any_to_gif /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1'); #runit('xv KMLB_DZ_070193_1957.gif'); #runit('xv KMLB_VR_070193_1957.gif'); #runit('xv KMLB_SW_070193_1957.gif'); &diffimage('KMLB_DZ_070193_1957.gif'); &diffimage('KMLB_VR_070193_1957.gif'); &diffimage('KMLB_SW_070193_1957.gif'); print "---------------------------------------------\n"; #&runit('any_to_gif -r 150 /d8/merritt/34598DE1.vol.gz'); #runit('xv Gunn_Pt_DZ_103197_0739.gif'); #&diffimage('Gunn_Pt_DZ_103197_0739.gif'); #&diffimage('Gunn_Pt_VR_103197_0739.gif'); #&diffimage('Gunn_Pt_SW_103197_0739.gif'); #&diffimage('Gunn_Pt_ZT_103197_0739.gif'); #&diffimage('Gunn_Pt_ZD_103197_0739.gif'); #&diffimage('Gunn_Pt_RH_103197_0739.gif'); #&diffimage('Gunn_Pt_PH_103197_0739.gif'); #print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/2D17FBB4.vol'); #runit('xv Berrima_DZ_122293_0747.gif'); &diffimage('Berrima_DZ_122293_0747.gif'); &diffimage('Berrima_VR_122293_0747.gif'); &diffimage('Berrima_SW_122293_0747.gif'); &diffimage('Berrima_ZT_122293_0747.gif'); &diffimage('Berrima_LR_122293_0747.gif'); &diffimage('Berrima_RH_122293_0747.gif'); &diffimage('Berrima_PH_122293_0747.gif'); &diffimage('Berrima_KD_122293_0747.gif'); &diffimage('Berrima_TI_122293_0747.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/30BE3D11.vol.gz'); #runit('xv Nguiu_DZ_113095_2319.gif'); &diffimage('Nguiu_DZ_113095_2319.gif'); &diffimage('Nguiu_VR_113095_2319.gif'); &diffimage('Nguiu_SW_113095_2319.gif'); &diffimage('Nguiu_ZT_113095_2319.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/tog_930129_1731.raw'); #runit('xv TOGA_DZ_012993_1731.gif'); &diffimage('TOGA_DZ_012993_1731.gif'); &diffimage('TOGA_VR_012993_1731.gif'); &diffimage('TOGA_SW_012993_1731.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 133 /d8/merritt/kwaj.new'); #runit('xv KWAJ_DZ_021496_2351.gif'); &diffimage('KWAJ_DZ_021496_2351.gif'); &diffimage('KWAJ_VR_021496_2351.gif'); &diffimage('KWAJ_SW_021496_2351.gif'); &diffimage('KWAJ_ZT_021496_2351.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/KWA980324084320.ARCPYLY'); #runit('xanim KWAJ_??_032498_0843.gif'); &diffimage('KWAJ_DZ_032498_0843.gif'); &diffimage('KWAJ_VR_032498_0843.gif'); &diffimage('KWAJ_SW_032498_0843.gif'); &diffimage('KWAJ_ZT_032498_0843.gif'); &diffimage('KWAJ_DR_032498_0843.gif'); &diffimage('KWAJ_KD_032498_0843.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/VIC.930129.213153.sig'); #runit('xv MIT-CSU_DZ_012993_2131.gif'); &diffimage('MIT-CSU_DZ_012993_2131.gif'); &diffimage('MIT-CSU_VR_012993_2131.gif'); &diffimage('MIT-CSU_SW_012993_2131.gif'); &diffimage('MIT-CSU_ZT_012993_2131.gif'); print "---------------------------------------------\n"; &runit('any_to_gif -r 150 /d8/merritt/VIC.930130.213215.sig.gz'); #runit('xv MIT-CSU_DZ_013093_2132.gif'); &diffimage('MIT-CSU_DZ_013093_2132.gif'); &diffimage('MIT-CSU_VR_013093_2132.gif'); &diffimage('MIT-CSU_SW_013093_2132.gif'); &diffimage('MIT-CSU_ZT_013093_2132.gif'); print "---------------------------------------------\n"; print "You will be placed in 'less'. Search for the string 'OUT' and\n"; print "examine the angles. You should only see the 'OUT OF ORDER' message\n"; print "when the angle changes from the maximum to the minimum.\n"; &runit('killer_sweep /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1 | less'); print "---------------------------------------------\n"; &runit('wsr88d_to_gif /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1'); #runit('xanim dz_sweep.??.gif'); #runit('xanim vr_sweep.??.gif'); #runit('xanim sw_sweep.??.gif'); &diffimage('dz_sweep.00.gif'); &diffimage('dz_sweep.01.gif'); &diffimage('dz_sweep.02.gif'); &diffimage('dz_sweep.03.gif'); &diffimage('dz_sweep.04.gif'); &diffimage('dz_sweep.05.gif'); &diffimage('dz_sweep.06.gif'); &diffimage('dz_sweep.07.gif'); &diffimage('dz_sweep.08.gif'); &diffimage('dz_sweep.09.gif'); &diffimage('dz_sweep.10.gif'); &diffimage('vr_sweep.00.gif'); &diffimage('vr_sweep.01.gif'); &diffimage('vr_sweep.02.gif'); &diffimage('vr_sweep.03.gif'); &diffimage('vr_sweep.04.gif'); &diffimage('vr_sweep.05.gif'); &diffimage('vr_sweep.06.gif'); &diffimage('vr_sweep.07.gif'); &diffimage('vr_sweep.08.gif'); &diffimage('vr_sweep.09.gif'); &diffimage('vr_sweep.10.gif'); &diffimage('sw_sweep.00.gif'); &diffimage('sw_sweep.01.gif'); &diffimage('sw_sweep.02.gif'); &diffimage('sw_sweep.03.gif'); &diffimage('sw_sweep.04.gif'); &diffimage('sw_sweep.05.gif'); &diffimage('sw_sweep.06.gif'); &diffimage('sw_sweep.07.gif'); &diffimage('sw_sweep.08.gif'); &diffimage('sw_sweep.09.gif'); &diffimage('sw_sweep.10.gif'); print "---------------------------------------------\n"; &runit('wsr_hist_uf_test /d8/merritt/nex.file.2.gz'); $s = `diff *.dat`; if ($s != "") { print "==> Unexpected differences. FAILED test.\n"; } else { print "==> No differences, good. PASSED test.\n"; } ##print "---------------------------------------------\n"; ##&runit('bscan /d8/merritt/pafb_swap'); ##system('mv bscan.00.ppm bscan.00.swap.ppm'); ##&runit('bscan /d8/merritt/pafb_unswap'); ##$s = `diff bscan.00.ppm bscan.00.swap.ppm`; ## if ($s != "") { ## print "==> Unexpected differences. FAILED test.\n"; ## } else { ## print "==> No differences, good. PASSED test.\n"; ## } rsl-v1.43/examples/kwaj_subtract_one_day.c0000644000102200007640000001051211565520526015675 00000000000000#include #include "rsl.h" /**********************************************************************/ /* */ /* usage */ /* */ /**********************************************************************/ void usage(char **argv) { fprintf(stderr, "Usage: %s in out.uf\n", argv[0]); fprintf(stderr, "\n"); fprintf(stderr, "Subtract one day from all time fields in all headers,\n"); fprintf(stderr, "all the way down to the ray. Output to uf.\n"); return; } /**********************************************************************/ /* */ /* subtract_one_day_ray */ /* */ /**********************************************************************/ #include void *subtract_one_day(int month, int day, int year, int *m, int *d, int *y) { /* Connocialize and subtract. */ struct tm *t; time_t the_time; t = (struct tm *)calloc(1, sizeof(struct tm)); t->tm_mon = month-1; /* 0 - 11 */ t->tm_mday = day-1; /* 1 - 31 */ /* And, subtract one day. */ t->tm_year = year-1900; /* since 1900 */ the_time = mktime(t); t = localtime(&the_time); *m = t->tm_mon+1; *d = t->tm_mday; *y = t->tm_year+1900; return; } /**********************************************************************/ /* */ /* subtract_one_day_ray */ /* */ /**********************************************************************/ Ray *subtract_one_day_ray(Ray *x) { if (x == NULL) return x; subtract_one_day(x->h.month, x->h.day, x->h.year, &x->h.month, &x->h.day, &x->h.year); return x; } /**********************************************************************/ /* */ /* subtract_one_day_sweep */ /* */ /**********************************************************************/ Sweep *subtract_one_day_sweep(Sweep *x) { int i; if (x == NULL) return x; for(i=0; ih.nrays; i++) x->ray[i] = subtract_one_day_ray(x->ray[i]); return x; } /**********************************************************************/ /* */ /* subtract_one_day_volume */ /* */ /**********************************************************************/ Volume *subtract_one_day_volume(Volume *x) { int i; if (x == NULL) return x; for(i=0; ih.nsweeps; i++) x->sweep[i] = subtract_one_day_sweep(x->sweep[i]); return x; } /**********************************************************************/ /* */ /* subtract_one_day_radar */ /* */ /**********************************************************************/ Radar *subtract_one_day_radar(Radar *x) { int i; if (x == NULL) return x; for(i=0; ih.nvolumes; i++) x->v[i] = subtract_one_day_volume(x->v[i]); return x; } /**********************************************************************/ /* */ /* m a i n */ /* */ /**********************************************************************/ int main(int argc, char **argv) { Radar *radar; if (argc != 3) { usage(argv); exit(-1); } radar = RSL_anyformat_to_radar(argv[1]); radar = subtract_one_day_radar(radar); subtract_one_day(radar->h.month, radar->h.day, radar->h.year, &radar->h.month, &radar->h.day, &radar->h.year); RSL_radar_to_uf_gzip(radar, argv[2]); exit(0); } rsl-v1.43/examples/test_get_win.c0000644000102200007640000000521306600002415014013 00000000000000#include #include #include #include #include #include "rsl.h" Sweep *load_sweep(Sweep *s) { int i, j; Ray *ray; if (!s) { printf("sweep is NULL-can't load\n"); return NULL; } printf("loading sweep with %d rays\n", s->h.nrays); for (i = 0; i < s->h.nrays; i++) { ray = s->ray[i]; /* set range */ for (j = 0; j < ray->h.nbins; j++) { ray->range[j] = ray->h.invf(40.0); } } return s; } main (int argc, char **argv) { Radar *new_radar, *tmp_radar, *radar; Sweep *s, *new_sweep; float min_range, max_range, low_azim, hi_azim; int j, i; char type; Volume *new_volume, *v; /* RSL_radar_verbose_on(); */ if (argc < 8) { fprintf(stderr, "%s type(r|v|s) min_range max_range low_azim hi_azim ref_uf_file out_file\n", argv[0]); exit(-1); } i = 1; type = argv[i++][0]; min_range = (float) atoi(argv[i++]); max_range = (float) atoi(argv[i++]); low_azim = (float) atoi(argv[i++]); hi_azim = (float) atoi(argv[i++]); radar = RSL_uf_to_radar(argv[i++]); if (!radar) exit(-1); RSL_load_refl_color_table(); switch(type) { case 'r': case 'v': v = RSL_copy_volume(radar->v[DZ_INDEX]); if (!v) exit(-1); if ((v = RSL_clear_volume(v)) == NULL) exit(-1); printf("volume's nsweeps - %d\n", v->h.nsweeps); for (j = 0; j < v->h.nsweeps; j++) { printf("loading sweep %d\n", j); v->sweep[j] = load_sweep(v->sweep[j]); } /* test get*from radar */ if (type == 'r') { if ((tmp_radar = RSL_new_radar(radar->h.nvolumes)) == NULL) exit (-1); tmp_radar->h = radar->h; tmp_radar->v[DZ_INDEX] = v; new_radar = RSL_get_window_from_radar(tmp_radar,min_range, max_range, low_azim, hi_azim); if (new_radar == NULL) { printf("null new radar\n"); exit(-1); } RSL_volume_to_gif(new_radar->v[DZ_INDEX], argv[i], 500, 500, max_range); RSL_free_radar(tmp_radar); RSL_free_radar(new_radar); } else { new_volume = RSL_get_window_from_volume(v, min_range, max_range, low_azim, hi_azim); if (new_volume != NULL) RSL_volume_to_gif(new_volume, argv[i], 500, 500, max_range); /* RSL_bscan_volume(new_volume); */ RSL_free_volume(new_volume); } break; case 's': s = RSL_copy_sweep(radar->v[DZ_INDEX]->sweep[0]); s = RSL_clear_sweep(s); s = load_sweep(s); if (!s) { printf("null sweep\n"); exit(-1); } new_sweep = RSL_get_window_from_sweep(s, min_range, max_range, low_azim, hi_azim ); RSL_sweep_to_gif(new_sweep, argv[i], 500, 500, max_range); /* RSL_bscan_sweep(new_sweep); */ RSL_free_sweep(new_sweep); break; default: break; } RSL_free_radar(radar); printf("done\n"); exit (0); } rsl-v1.43/examples/print_header_info.c0000644000102200007640000001335611565520526015024 00000000000000 #include #include #include #include #include "rsl.h" int qprint_ray; usage(char **argv) { fprintf(stderr,"Usage: %s [-v] [-f nexrad_id] [infile]\n", argv[0]); exit(-1); } process_args(int argc, char **argv, char **in_file, int *qprint_ray, char **site) { int c; while ((c = getopt(argc, argv, "vf:")) != -1) switch (c) { case 'v': *qprint_ray = 1; break; case 'f': *site = strdup(optarg); break; case '?': usage(argv); break; default: break; } if ((argc-optind) == 0) { *in_file = NULL; } else if ((argc-optind) == 1) { *in_file = strdup(argv[optind]); } else { usage(argv); } } void print_ray_values(Ray *ray) { int i,j; if (ray == NULL) { printf("Ray = NULL\n"); return; } for (i=0; ih.nbins; i+=10) { for (j=i; j<(i+10)&&jh.nbins; j++) printf("%10.2f", ray->h.f(ray->range[j])); printf("\n"); } return; } void print_header_for_ray(Ray *ray) { if (ray==NULL) {printf("NULL."); return;} printf(" month %d\n", ray->h.month); /* Time for this ray; month (1-12). */ printf(" day %d\n", ray->h.day); /* Time for this ray; day (1-31). */ printf(" year %d\n", ray->h.year); /* Time for this ray; year (eg. 1993). */ printf(" hour %d\n", ray->h.hour); /* Date for this ray; hour (0-23). */ printf(" minute %d\n", ray->h.minute);/* Date for this ray; minute (0-59).*/ printf(" sec %f\n", ray->h.sec); /* Date for this ray; second + fraction of second. */ printf(" unam %f\n", ray->h.unam_rng); /* Unambiguous range. (KM). */ printf(" azimuth %f\n", ray->h.azimuth); /* Azimuth angle. (degrees). 0=North, 90=east, -90=west. */ printf(" ray_num %d\n", ray->h.ray_num); /* Ray no. within elevation scan. */ printf(" elev %f\n", ray->h.elev); /* Elevation angle. (degrees). */ printf("elev_num %d\n", ray->h.elev_num); /* Elevation no. within volume scan. */ printf(" range_bin1 %d\n", ray->h.range_bin1); /* Range to first gate.(meters) */ printf(" gate_size %d\n", ray->h.gate_size); /* Data gate size (meters)*/ printf(" vel_res %f\n", ray->h.vel_res); /* Doppler velocity resolution */ printf(" sweep_rate %f\n", ray->h.sweep_rate); /* Sweep rate. Full sweeps/min. */ printf(" prf %d\n", ray->h.prf); /* Pulse repitition frequency, in Hz. */ printf(" azim_rate %f\n", ray->h.azim_rate); printf(" fix_angle %f\n", ray->h.fix_angle); printf("pulse_count %d\n", ray->h.pulse_count); printf("pulse_width %f\n", ray->h.pulse_width); /* Pulse width (micro-sec). */ printf(" beam_width %f\n", ray->h.beam_width); /* Beamwidth in degrees. */ printf(" frequency %f\n", ray->h.frequency); /* Bandwidth MHz. */ printf(" wavelength %f\n", ray->h.wavelength); /* Wavelength. Meters. */ printf(" nyq_vel %f\n", ray->h.nyq_vel); /* Nyquist velocity. m/s */ printf(" latitude %f\n", ray->h.lat); /* Latitude (decimal) */ printf(" longitude %f\n", ray->h.lon); /* Longitude (decimal) */ printf(" nbins %d\n", ray->h.nbins); /* Number of array elements for 'Range'. */ if (!qprint_ray) return; print_ray_values(ray); } void print_header_for_sweep(Sweep *s) { int i; if (s==NULL) return; for (i=0; ih.nrays; i++) { printf("ray[%d] ",i ); print_header_for_ray(s->ray[i]); printf("\n"); } } void print_header_for_volume(Volume *v) { int i; if (v==NULL) return; for (i=0; ih.nsweeps; i++) { printf("-------- Sweep %d ---------\n", i); print_header_for_sweep(v->sweep[i]); } } main(int argc, char **argv) { char *infile; Radar *radar; char *site = NULL; int i; qprint_ray = 0; /* Global flag for printing ray values. */ process_args(argc, argv, &infile, &qprint_ray, &site); /* malloc for in/outfile */ RSL_radar_verbose_on(); RSL_read_these_sweeps("all", NULL); radar = RSL_anyformat_to_radar(infile, site); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); printf("Radar file: %s\n", infile); printf("Radar site: %c%c%c%c\n", radar->h.name[0], radar->h.name[1], radar->h.name[2], radar->h.name[3]); printf("Radar date: %2.2d/%2.2d/%2.2d\n", radar->h.month, radar->h.day, radar->h.year); printf("Radar time: %2.2d:%2.2d:%f\n", radar->h.hour, radar->h.minute, radar->h.sec); printf("Radar sec : %f\n", radar->h.sec); /* Second plus fractional part. */ printf("Radar radar_type: %s\n", radar->h.radar_type); /* Type of radar. Use for QC-ing the data. * Supported types are: * "wsr88d", "lassen", "uf", * "nsig", "mcgill", * "kwajalein", "rsl", "toga". * Set by appropriate ingest routine. */ printf("Radar nvolumes : %d\n", radar->h.nvolumes); printf("Radar number : %d\n", radar->h.number); printf("Radar name : %s\n", radar->h.name); printf("Radar radar_name: %s\n", radar->h.radar_name); printf("Radar city : %s\n", radar->h.city); printf("Radar state : %s\n", radar->h.state); printf("Radar latd: %d\n", radar->h.latd); printf("Radar latm: %d\n", radar->h.latm); printf("Radar lats: %d\n", radar->h.lats); printf("Radar lond: %d\n", radar->h.lond); printf("Radar lonm: %d\n", radar->h.lonm); printf("Radar lons: %d\n", radar->h.lons); printf("Radar height: %d\n", radar->h.height); printf("Radar spulse: %d\n", radar->h.spulse); printf("Radar lpulse: %d\n", radar->h.lpulse); printf("Radar lpulse: %d\n", radar->h.lpulse); for (i=0; ih.nvolumes; i++) { if (radar->v[i]) { printf("PRINT_HEADER_FOR_VOLUME, %d, ... nsweeps = %d\n", i, radar->v[i]->h.nsweeps); print_header_for_volume(radar->v[i]); } } exit(0); } rsl-v1.43/examples/adjust_gate_size.c0000644000102200007640000000662507530262634014672 00000000000000#include #include #include #include #include "rsl.h" void adjust_gate_size(Radar *radar, float gate_size_adjustment) { int i,j,k,nvolumes; Volume *volume; Sweep *sweep; Ray *ray; if(gate_size_adjustment != 1.0) { nvolumes = radar->h.nvolumes; for(i=0; iv[i] != NULL) { volume=radar->v[i]; for(j=0; jh.nsweeps; j++) { if(volume->sweep[j] != NULL) { sweep = volume->sweep[j]; for(k=0; kh.nrays; k++) { if(sweep->ray[k] != NULL) { ray = sweep->ray[k]; ray->h.gate_size = ray->h.gate_size*gate_size_adjustment; } } } } } } } /* If Gate Size Adjustment is not unity, then we must change the following: old_gs = radar->v[i]->sweep[sweepIndex]->ray[rayIndex=]->h.gate_size radar->v[i]->sweep[sweepIndex]->ray[rayIndex=]->h.gate_size = old_gs*gate_size_adjustment Here are some comments from Sandra Yuter on the necessity of this fix. > I dug into the revelant code and it looks like we can do a relatively > simple workaround for the SIGMET raw product file range bin size > errors for the RHB data pulses widths of 0.5 usec and 2.0 usec as follows. > > Since we are all converting from sigmet to UF I suggest we resize > the range bin size values in the ray headers in the qlook step > where the sigmet to UF conversion occurs. > > The resize requires only 1 additional line of code (I have included > a few others for context) in qlook.c > > rangeToFirstGate = 0.001 * > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.range_bin1; > gateSize = 0.001 * > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.gate_size; > radar->v[i]->sweep[sweepIndex]->ray[rayIndex]->h.gate_size= > gateSize*0.6*1000; > > I have used 0.6 adjustment factor since that is 75/125 which corresponds > to the error in my 0.5 usec data, for the SUR scans, this adjustment > factor is 133.33/125 or 1.067. The following is from Joe Holmes from SIGMET > > I think you have experienced a problem with the RVP7 range resolution > configuration. Both in IRIS and in the RVP7 you manually type in > the range resolution. The RVP7 allows a separate resolution for > each pulsewidth, while IRIS only allows 1 value. There is no feedback > if these values are not typed in the same. Based on setup information > we have here from the RH Brown from Oct 23, 1998, you had the following > configuration: > > RVP7: > 0 0.50 usec 75.0m > 1 0.80 usec 125.0m > 2 1.39 usec 125.0m > 3 2.00 usec 133.3m > > IRIS: 125.0 meters > > I think the error at PW#0 was corrected a while back, but > the error in PW#3 was never corrected. Next time someone is > at the ship, they should check this, fix the long pulse, and remake > the bandpass filter for the long pulse. > > In the short term, you can correct the error by taking all your > long pulse data and changing the header to correctly document the > range resolution. We have a program to do this, it is called "change_raw". > The source is on any IRIS system, which was installed with the > source, headers, and objects turned on. It is in the > ${IRIS_ROOT}utils/examples directory. We can supply you with > a compiled version of this program, if you want. Available platforms > are Linux, HP-UX, and IRIX. */ return; } rsl-v1.43/mcgill.h0000644000102200007640000000701706736151436011004 00000000000000/********************************************************************** * Structure and parameter definitions for Mcgill format * radar data processing. * * Kolander * **********************************************************************/ #include #define MCG_RECORD 2048 /* Mcgill record size (bytes) */ #define MCG_CSP 12288 /* Mcgill CSP block size (bytes) */ #define MCG_MAX_SEG_NUM 107 /* 107 segments per Mcgill logical record */ /* Mcgill method return codes */ #define MCG_EOD 1 /* End_Of_Data flag */ #define MCG_OK 0 /* Successful return */ #define MCG_OPEN_FILE_ERR -1 /* Couldn't open Mcgill data file */ #define MCG_CLOSE_FILE_ERR -2 /* Couldn't close Mcgill data file */ #define MCG_EOF -3 /* Reached end of Mcgill data file */ #define MCG_READ_ERR -4 /* Error occurred reading data file */ #define MCG_FORMAT_ERR -5 /* Unidentified radar site or format error*/ #define SYS_NO_SPACE -6 /* Memory allocation problem */ /* Mcgill segment identifiers */ #define MCG_UNDEFINED_SEG 0 #define MCG_DATA_SEG 1 #define MCG_ELEV_SEG 2 #define MCG_EOD_SEG 3 /* Radar site/format codes */ #define MCG_PAFB_3_4 0 /* Patrick Air Force Base, format 3 or 4 */ #define MCG_PAFB_1_2 1 /* Patrick Air Force Base, format 1 or 2 */ #define MCG_SAOP 2 /* Sao Paulo */ typedef unsigned short word; typedef unsigned char byte; typedef int mcgSegmentID; typedef struct { word unused[40]; /* Word 41 of Mcgill header record. A word is 2 (unsigned) bytes. */ word hour; /* 0 to 23 */ word min; /* 0 to 59 */ word sec; /* 0 to 59 */ word day; /* 1 to 31 */ word month; /* 1 to 12 */ word year; /* 0 to 99 */ word num_records; /* No. logical records in volume scan */ word unused1[3]; /* Word 51 */ word vol_scan_format; /* 1: 24 sweeps, normal 2: 24 sweeps, compressed 3: 12 sweeps, normal 4: 12 sweeps, compressed */ word unused2[4]; /* Word 56 */ word csp_rec; /* 0: No CSP block 1: CSP block */ } mcgHeader_t; typedef struct { FILE *fp; /* Pointer to Mcgill file */ int site; int *num_bins; /* Points to array of 24 bin_counts, one bin_count per sweep. */ mcgHeader_t head; } mcgFile_t; /* Structure to contain a Mcgill logical record (2048 bytes) */ typedef struct { word record_num; /* No. of this logical record in volume scan */ byte last_record_flag; /* 1 if last record in vol_scan, 0 otherwise */ byte start_elev_num; /* Starting elev no. of data in this record */ byte end_elev_num; /* End elev no. of data in this record */ byte unused[9]; byte segment[107][19]; /* 107 elevation and data segments, 19 bytes each. */ byte unused1; } mcgRecord_t; /* Structure to contain Mcgill reflectivity data from 1 ray */ typedef struct { float elev; float azm; int sweep_num; int num_bins; /* no. of bins for this ray */ char data[240]; /* reflectivity data value for each bin */ } mcgRay_t; /*************** Function Prototypes **********************/ /* Grouped by object operated on and/or returned. */ mcgFile_t *mcgFileOpen(int *code, char *filename); int mcgFileClose(mcgFile_t *file); int mcgRecordRead(mcgRecord_t *record, mcgFile_t *file); mcgSegmentID mcgSegmentKeyIdentify(int key); int mcgRayBuild(mcgRay_t *ray, mcgFile_t *file); rsl-v1.43/radtec.h0000644000102200007640000001031506622673257010776 00000000000000/* * RADTEC Version 3.20 data structures. * * By John H. Merritt * * May 21, 1998 */ /* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1998 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * An integer word in RADTEC is 16 bits, however, floats and doubles * are 32 and 64 bits respectively. */ typedef struct { double rcvr_slope; short isolation; short noise_level; short counts_hi; short counts_lo; short power_hi; short power_lo; } Video_calibration; /* 16 bytes */ typedef struct { short average_power; short reference_range; double zconstant; double zcorrection; } Radar_calibration; /* 20 bytes */ typedef struct { Video_calibration video_cal; Radar_calibration radar_cal; } Log_video_transmitter; /* 36 bytes */ typedef Log_video_transmitter Doppler_transmitter; typedef struct { short doppler_velocity_range; /* 0=0-16, 1=0-32 */ short ground_clutter_filter_status; short adtnl_log_gc_filter_status; short adtnl_lin_gc_filter_status; } Model_info; typedef struct { short version; /* Version number multiplied by 100. 320 means 3.20 */ short scan_type; /* 1=PPI, 2=RHI */ short scan_mode; /* Recording mode. 0=Log Video, 1=Doppler */ short seqno; /* Sequence number of this data file. */ short month; /* 1-12 */ short day; /* 1-31 */ short year; /* YYYY */ short hour; /* 0-23 */ short min; /* 0-59 */ short sec; /* 0-59 */ float az_el; /* RHI azimuth or PPI elevation in degrees. */ double azim_resolution; double azim_offset; double elev_resolution; double elev_offset; double site_elevation; double site_latitude; double site_longitude; float skip; /* In microseconds, 1-1024. */ float range_bin_size; /* In microseconds, 1-1024. */ short num_range_bins; /* 16-240. */ short num_integrations; /* # of integrations comprising each ray. 1-1024. */ short num_rays; /* Number of rays. */ Log_video_transmitter log_video; Doppler_transmitter doppler; short model; /* Processor model. 0=none, 1=750, 2=940, 3=950. */ Model_info model_info; char spare[12]; /* Fill to 200 bytes. */ } Radtec_header; typedef struct { short ray_num; /* Ray number. 0-n */ float azim_angle; /* Azimuth angle in degrees. */ float elev_angle; /* Elevation angle in degrees. */ short hour; /* 0-23 */ short min; /* 0-59 */ short sec; /* 0-59 */ } Radtec_ray_header; typedef float Radtec_dbz[240]; typedef struct { Radtec_ray_header *h; /* May be set during reading of data. Can * be safely ignored. However, you'd have * to maintain two arrays -- headers and rays. */ Radtec_dbz dbz; } Radtec_ray; typedef struct { Radtec_header h; Radtec_ray *ray; } Radtec_file; void radtec_free_file(Radtec_file *rfile); Radtec_file *radtec_read_file(char *infile); void radtec_print_header(Radtec_header *h); void radtec_print_ray_header(Radtec_ray_header *h); unsigned int _explode( unsigned int (*read_buf)(char *buf, unsigned int *size, void *param), void (*write_buf)(char *buf, unsigned int *size, void *param), char *work_buf, void *param); unsigned long _crc32( char *buffer, unsigned int *size, unsigned long *old_crc); rsl-v1.43/fraction.c0000644000102200007640000001004607634132711011322 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /**********************************************************************/ /* By: John Merritt */ /* Space Applications Corporation */ /* June 12, 1994 */ /**********************************************************************/ #include #include "rsl.h" /**********************************************************************/ /* */ /* RSL_fraction_of_ray */ /* RSL_fraction_of_sweep */ /* RSL_fraction_of_volume */ /* */ /* Compute fraction of dBz within a specified range. */ /* Loops are unrolled in each higher function because we are */ /* computing fractiion. I thought about a returning a Ratio */ /* structure, but dismissed it. */ /* */ /**********************************************************************/ typedef struct { int n; int ntotal; } Frac_ratio; Frac_ratio RSL_ratio_of_ray(Ray *r, float lo, float hi, float range) { int i; int ibin_range; /* Maximum bin include, based on range. */ Frac_ratio fr; fr.n = fr.ntotal = 0; if (r == NULL) return fr; fr.n = 0; ibin_range = range /( (float)r->h.gate_size / 1000.0 ); if (ibin_range > r->h.nbins) ibin_range = r->h.nbins; for (i=0; ih.f(r->range[i]) && r->h.f(r->range[i]) <= hi) fr.n++; fr.ntotal++; } return fr; } float RSL_fraction_of_ray(Ray *r, float lo, float hi, float range) { Frac_ratio fr; fr = RSL_ratio_of_ray(r, lo, hi, range); return (float)fr.n / (float)fr.ntotal; } Frac_ratio RSL_ratio_of_sweep(Sweep *s, float lo, float hi, float range) { Frac_ratio total_ratio; Frac_ratio ray_ratio; int i; total_ratio.n = total_ratio.ntotal = 0; if (s == NULL) return total_ratio; for (i = 0; ih.nrays; i++) { ray_ratio = RSL_ratio_of_ray(s->ray[i], lo, hi, range); total_ratio.n += ray_ratio.n; total_ratio.ntotal += ray_ratio.ntotal; } return total_ratio; } float RSL_fraction_of_sweep(Sweep *s, float lo, float hi, float range) { Frac_ratio fr; fr = RSL_ratio_of_sweep(s, lo, hi, range); return (float)fr.n / (float)fr.ntotal; } Frac_ratio RSL_ratio_of_volume(Volume *v, float lo, float hi, float range) { Frac_ratio total_ratio; Frac_ratio sweep_ratio; int i; total_ratio.n = total_ratio.ntotal = 0; if (v == NULL) return total_ratio; for (i = 0; ih.nsweeps; i++) { sweep_ratio = RSL_ratio_of_sweep(v->sweep[i], lo, hi, range); total_ratio.n += sweep_ratio.n; total_ratio.ntotal += sweep_ratio.ntotal; } return total_ratio; } float RSL_fraction_of_volume(Volume *v, float lo, float hi, float range) { Frac_ratio fr; fr = RSL_ratio_of_volume(v, lo, hi, range); return (float)fr.n / (float)fr.ntotal; } rsl-v1.43/radar_to_hdf_1.c0000644000102200007640000011445407634130346012363 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBTSDISTK /****************************************************************** Writes one VOS from a RSL radar structure into one 1B-51/1C-51 HDF file. A 1B-51/1C-51 HDF file contains multiple VOS's recorded by a radar site during a 1-hour time period, and the HDF file is named using the date/hour of the constituent VOS's. Functions defined herein perform tasks preparatory to building a TSDIS toolkit 'L1B_1C_GV' structure, the contents of which are written into the HDF file by the TSDIS toolkit. Construction of the toolkit 'L1B_1C_GV' structure is done via the subroutines defined in RSL file 'radar_to_hdf_2.c'. ----------------------------------------------------------------- Libraries required for execution of this code : -ltsdistk : TSDIS toolkit -lmfhdf -ldf -ljpeg -lz : HDF -lrsl : rsl -lm : C math ----------------------------------------------------------------- *******************************************************************/ #include #include #include #include #include #include #include #include #include /* TSDIS toolkit function and structure definitions. */ #include "IO.h" #include "IO_GV.h" /* RSL function and structure definitions. */ #include "rsl.h" /* Parameter definitions for 1B-51 and 1C-51 HDF file handling applications using the TSDIS toolkit. */ #include "toolkit_1BC-51_appl.h" /*************************************************************/ /* */ /* Function Prototypes */ /* */ /*************************************************************/ void RSL_set_tkMetaDataString(char *string, int param); void RSL_set_hdf_qc_parameters(float *inParm); void radarVolumesSave(Volume *v[MAX_RADAR_VOLUMES], Radar *radar); void radarVolumesRestore(Radar *radar, Volume *v[MAX_RADAR_VOLUMES]); int nextVolume(Radar *radar, int last_volume); Volume *maskBuild(Volume *cv, Volume *ucv); void metaDataWrite(IO_HANDLE *granuleHandle, Radar *radar, char *hdfFileName, int fileAccessMode); int tkVosDimensions(VosSize *vs, Radar *radar); Ray *first_ray_in_sweep(Sweep *sweep); int rslVosDimensions(VosSize *vs, Radar *radar, float maxRange); int L1GVtemplateInit(VosSize *vs, Radar *radar, char *hdfFileName, float maxRange); static int hdfFileOpen(IO_HANDLE *granuleHandle, VosSize *vs, char *hdfFileName, Radar *radar); int radarPrep1B51(Radar *radar); int radarPrep1C51(Radar *radar); int nullGranuleCreate(char *hdfFileName, IO_HANDLE *granuleHandle, Radar *radar); int RSL_radar_to_hdf(Radar *radar, char *hdfFileName); extern L1B_1C_GV *gvl1Build(Radar *radar, float *qcParm, VosSize *vs, int productID); extern int radar_verbose_flag; /* The 1st non-NULL ray in each volume is widely used. Hence global. */ Ray *first_ray_in_volume[MAX_RADAR_VOLUMES]; /*************************************************************/ /* */ /* RSL_set_tkMetaDataString */ /* */ /*************************************************************/ static struct { char GenInputDate[128]; char AlgorithmVersion[128]; int ProductVersion; char SoftwareVersion[128]; } tkMetaDataString; void RSL_set_tkMetaDataString(char *string, int param) { /* Allows the application 'level_1' to store metadata strings into the tkMetaDataString buffers for later insertion by RSL function 'metaDataWrite()' into the HDF file. Call **before** RSL_radar_to_hdf(). */ #define CP_TKMETA(s, str) \ memset(tkMetaDataString.s, '\0', sizeof(tkMetaDataString.s));\ strncpy(tkMetaDataString.s, str, sizeof(tkMetaDataString.s)-1) if (param == TK_GEN_DATE_INPUT_FILES) { CP_TKMETA(GenInputDate, string); /* 1C-51 kludge... To decide whether or not to write a VOS into a 1C-51 HDF file (See 'hdf1C51Create()' in file 'level_1.c'), I need to know something about the times of the VOSs already in the file; ie, if no satellite overpass, the file is to contain just one VOS from each half-hour. The only efficient way to do this is by encoding time info into a metadata field. The 'GenInputDate' metaData string contains info indicating which hourly time slots are filled by the VOSs contained in the HDF file. (See function 'metaDataWrite()' in this file for details.) Called by 'hdfFilePeek()' in file 'level_1.c'. */ } else if (param == TK_ALGORITHM_VERSION) { CP_TKMETA(AlgorithmVersion, string); } else if (param == TK_SOFTWARE_VERSION) { CP_TKMETA(SoftwareVersion, string); if (radar_verbose_flag) fprintf(stderr, "TK_SOFTWARE_VERSION = <%s>\n", string); } else if (param == TK_PRODUCT_VERSION) { sscanf(string, "%d", &tkMetaDataString.ProductVersion); } else { fprintf(stderr, "RSL_set_tkMetaDataString: Unknown param==%d!!\n", param); } } /*************************************************************/ /* */ /* RSL_set_hdf_qc_parameters */ /* */ /*************************************************************/ static float qcParm[NUMBER_QC_PARAMS] = { NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT, NOVAL_FLOAT }; void RSL_set_hdf_qc_parameters(float *inParm) { /* Stores 1C-51 QC parameters for later insertion into 1C-51 HDF file. Call **before** RSL_radar_to_hdf(). */ int j; for (j=0; jh.nvolumes; j++) v[j] = radar->v[j]; } /*************************************************************/ /* */ /* radarVolumesRestore */ /* */ /*************************************************************/ void radarVolumesRestore(Radar *radar, Volume *v[MAX_RADAR_VOLUMES]) { /* Restore array of radar volume pointers. */ int j; for (j=0; jh.nvolumes; j++) radar->v[j] = v[j]; } /*************************************************************/ /* */ /* nextVolume */ /* */ /*************************************************************/ int nextVolume(Radar *radar, int last_volume) /* Find the index of the next volume in the radar structure, given the index of the last volume found. Returns: index of next volume, if success. -1 if failure. */ { int j; for (j=last_volume+1; jh.nvolumes; j++) if (radar->v[j] != NULL) return(j); /* Found volume. Return the index. */ return(-1); /* No volume found. Return bogus index. */ } /*************************************************************/ /* */ /* maskBuild */ /* */ /*************************************************************/ Volume *maskBuild(Volume *cv, Volume *ucv) { /* Create a mask volume. A mask value, in conjunction with a corresponding corrected reflectivity value, enables the future recovery of a uncorrected value from a 1C-51 HDF file, since the original, uncorrected reflectivity values are not stored in 1C-51 HDF files. This function used for both reflectivity 'DZ' and differential reflectivity 'ZD'. cv: corrected volume pointer. (CZ or CD) ucv: uncorrected volume pointer. (DZ or ZD) mv: mask volume pointer. (MZ or MD) */ Volume *mv; int sindex, rindex, bindex; mv = RSL_copy_volume(cv); mv->h.f = MZ_F; /* MZ_F identical to MD_F. Can use either. */ mv->h.invf = MZ_INVF; /* MZ_INVF identical to MD_INVF. Can use either. */ for (sindex=0; sindexh.nsweeps; sindex++) { if (cv->sweep[sindex] == NULL) continue; mv->sweep[sindex]->h.f = MZ_F; mv->sweep[sindex]->h.invf = MZ_INVF; for (rindex=0; rindexsweep[sindex]->h.nrays; rindex++) { if (cv->sweep[sindex]->ray[rindex] == NULL) continue; mv->sweep[sindex]->ray[rindex]->h.f = MZ_F; mv->sweep[sindex]->ray[rindex]->h.invf = MZ_INVF; for (bindex=0; bindexsweep[sindex]->ray[rindex]->h.nbins; bindex++) /* Has the Z_value been corrected by the QC algorithm? */ if (cv->sweep[sindex]->ray[rindex]->range[bindex] == cv->h.invf(BADVAL)) mv->sweep[sindex]->ray[rindex]->range[bindex] = 1; else /* Uncorrected Z_value. */ mv->sweep[sindex]->ray[rindex]->range[bindex] = 0; } /* end for (rindex=0; ... */ } /* end for (sindex=0; ... */ return(mv); } /*************************************************************/ /* */ /* metaDataWrite */ /* */ /*************************************************************/ void metaDataWrite(IO_HANDLE *granuleHandle, Radar *radar, char *hdfFileName, int fileAccessMode) { /* Write out some metadata values into toolkit structures. */ /* * YOU REALLY DON'T KNOW, A PRIORI, WHAT DATATYPE THE METADATA ITEM IS. * TRIAL and ERROR is how we figured some of them out. * * THEY SHOULD ALL BE STRINGS!!!!! */ char buf[1024]; int intVal, vindex; float floatVal; DATE_STR tkdate; TIME_STR tktime; vindex = nextVolume(radar, -1); /* Find 1st non-NULL rsl volume. */ /* ----------------- Core MetaData ---------------*/ /* Begin/end date of the HDF granule. */ tkdate.tkyear = (short) radar->h.year; tkdate.tkmonth = (short) radar->h.month; tkdate.tkday = (short) radar->h.day; TKwriteMetadataInt(granuleHandle, TK_BEGIN_DATE, &tkdate); TKwriteMetadataInt(granuleHandle, TK_END_DATE, &tkdate); /* Begin time of the HDF granule. */ tktime.tkhour = (int8) radar->h.hour; tktime.tkminute = (int8) 0; tktime.tksecond = (int8) 0; TKwriteMetadataInt(granuleHandle, TK_BEGIN_TIME, &tktime); /* End time of the HDF granule. */ tktime.tkhour = (int8) radar->h.hour; tktime.tkminute = (int8) 59; tktime.tksecond = (int8) 59; TKwriteMetadataInt(granuleHandle, TK_END_TIME, &tktime); /* Longitude & Bounding Coordinates */ floatVal = radar->h.lond + radar->h.lonm/60.0 + radar->h.lons/3600.0; TKwriteMetadataFloat(granuleHandle, TK_CENTER_POINT_LON, &floatVal); floatVal = floatVal - 2.0; TKwriteMetadataFloat(granuleHandle, TK_WEST_BOUND_COORD, &floatVal); floatVal = floatVal + 4.0; TKwriteMetadataFloat(granuleHandle, TK_EAST_BOUND_COORD, &floatVal); /* Latitude & Bounding Coordinates */ floatVal = radar->h.latd + radar->h.latm/60.0 + radar->h.lats/3600.0; TKwriteMetadataFloat(granuleHandle, TK_CENTER_POINT_LAT, &floatVal); floatVal = floatVal - 2.0; TKwriteMetadataFloat(granuleHandle, TK_SOUTH_BOUND_COORD, &floatVal); floatVal = floatVal + 4.0; TKwriteMetadataFloat(granuleHandle, TK_NORTH_BOUND_COORD, &floatVal); TKwriteMetadataChar(granuleHandle, TK_CONTACT, "Danny Rosenfeld"); /* ----------------- PS MetaData ---------------*/ TKwriteMetadataChar(granuleHandle, TK_ALGORITHM_VERSION, tkMetaDataString.AlgorithmVersion); TKwriteMetadataInt(granuleHandle, TK_PRODUCT_VERSION, &tkMetaDataString.ProductVersion); TKwriteMetadataChar(granuleHandle, TK_SOFTWARE_VERSION, tkMetaDataString.SoftwareVersion); TKwriteMetadataChar(granuleHandle, TK_MAX_VALID_CHANNEL, "70 dBz"); TKwriteMetadataChar(granuleHandle, TK_MIN_VALID_CHANNEL, "-20 dBz"); if (radar->h.nvolumes > 0) { floatVal = first_ray_in_volume[vindex]->h.wavelength; } else /* No radar volumes. Creating empty granule. */ { TKwriteMetadataChar(granuleHandle, TK_ANOMALY_FLAG, "EMPTY: REASON UNKNOWN"); floatVal = 0.0; } TKwriteMetadataFloat(granuleHandle, TK_RADAR_WAVELENGTH, &floatVal); floatVal = -20.0; /* MIN_REFL_THRESHOLD */ TKwriteMetadataFloat(granuleHandle, TK_MIN_REF_THRESHOLD, &floatVal); TKwriteMetadataChar(granuleHandle, TK_RADAR_NAME, radar->h.radar_name); TKwriteMetadataChar(granuleHandle, TK_RADAR_CITY, radar->h.city); TKwriteMetadataChar(granuleHandle, TK_RADAR_STATE, radar->h.state); TKwriteMetadataChar(granuleHandle, TK_RADAR_COUNTRY, radar->h.country); intVal = (int)TKgetNvos(granuleHandle); TKwriteMetadataInt(granuleHandle, TK_NUM_VOS, &intVal); TKwriteMetadataFloat(granuleHandle, TK_GV_DZCAL, &qcParm[ZCAL]); floatVal = X; /* Mask scale factor */ TKwriteMetadataFloat(granuleHandle, TK_GV_L1C_SCALE, &floatVal); floatVal = 0.0; /* Correction for gaseous two-way attenuation */ TKwriteMetadataFloat(granuleHandle, TK_GV_ALPHA, &floatVal); TKwriteMetadataChar(granuleHandle, TK_INPUT_FILES, "8mm tape files"); TKwriteMetadataChar(granuleHandle, TK_DATA_CENTER_SRC, radar->h.radar_name); /* I really, really hate this 1C-51 kludge, but... To decide (within function 'hdf1C51Create') whether or not to write a VOS into a 1C-51 file, I need to know something about the times of the VOSs already in the file; ie, if no satellite overpass, the file is to contain just one VOS from each half-hour. The only efficient way to do this is by encoding info into a metadata field. So... I use the 'GEN_DATE_INPUT_FILES' metaData field. The intial value of this field is the string 'unKNOWN'. When a VOS from the first half_of_the_hour is written into the file, change the first char 'u' to upper_case. When a VOS from the second half_of_the_hour is written into the file, change the second char 'n' to upper_case. The final string, after both time slots are filled, is entirely upper_case: 'UNKOWN'. */ if (granuleHandle->productID == TK_L1C_GV) /* 1C-51 file? */ { /* If new file, then intitialize 'GEN_DATE_INPUT_FILES' string. If file exists, then get the existing string from the file. */ if (fileAccessMode == TK_NEW_FILE) strcpy(buf, "unKNOWN"); else strcpy(buf, tkMetaDataString.GenInputDate); if (radar->h.nvolumes > 0) /* Don't mess with an empty granule. */ { if (radar->h.minute < 30) /* 1st half_of_the_hour? */ buf[0] = (char) toupper((int)buf[0]); /* Convert char to upper_case */ else /* 2nd half_of_the_hour */ buf[1] = (char) toupper((int)buf[1]); /* Convert char to upper_case */ } } else /* 1B-51 file */ { strcpy(buf, "UNKNOWN"); } TKwriteMetadataChar(granuleHandle, TK_GEN_DATE_INPUT_FILES, buf); } /*************************************************************/ /* */ /* newPhysicalSweep */ /* */ /*************************************************************/ int newPhysicalSweep(Sweep *phys_sweep, Sweep *sweep) { /* Checks if the rsl 'sweep' belongs to a different physical sweep than 'phys_sweep'. Returns: 1, if sweep is a new physical sweep 0, if not new physical sweep -1, if error. */ int nrays, iray; /* If elevations don't match, new sweep. */ if (phys_sweep->h.elev != sweep->h.elev) return(1); /* Check the first 50 rays of both sweeps. * If azimuths don't match, new sweep. */ nrays = 50; if (sweep->h.nrays < nrays) nrays = sweep->h.nrays; if (phys_sweep->h.nrays < nrays) nrays = phys_sweep->h.nrays; for (iray=0; irayray[iray] == NULL) continue; if (phys_sweep->ray[iray] == NULL) continue; if (phys_sweep->ray[iray]->h.azimuth != sweep->ray[iray]->h.azimuth) return(1); /* New physical sweep */ } /* No new physical sweep. */ return(0); } /*************************************************************/ /* */ /* tkVosDimensions */ /* */ /*************************************************************/ int tkVosDimensions(VosSize *vs, Radar *radar) { /* Logically reconfigures the VOS in the rsl radar structure into a sequence of physical sweeps as required for the toolkit L1GV structure. Records required toolkit gvl1 dimensions in the 'VosSize->tk' structure. When we later load the toolkit gvl1 structure with actual data values, vs->tk.ncell[tk_sindex][pindex] will be zero for those data types not collected by the radar during physical sweep 'tk_sindex'. The algorithm used herein to locate physical sweeps is as simple as possible. It works for all VOSs processed to date. However, if more complicated radar scanning regimes turn up, this function will surely require an overhaul and additional complexity. Algorithm: Within the rsl radar structure, walks horizontally across the radar volumes at one sweep level, checking for elev and azim values different from the last physical sweep located. Then increments the sweep level and repeats at the next rsl sweep level. Returns: OK, if success. <0, if error. */ int pindex, sindex, tk_sindex, status; Sweep *sweep; /* Note: 'vs->tk' structure contains all zeroes upon entry into this function. */ sindex = 0; /* rsl sweep index */ tk_sindex = -1; /* toolkit sweep index */ while (sindex < vs->rsl.maxNsweep) /* for each rsl sweep... */ { for (pindex=0; pindextk.nparm; pindex++) /* for each rsl volume */ { if (sindex >= vs->rsl.nsweep[pindex]) continue; sweep = vs->rsl.v[pindex]->sweep[sindex]; /* No null sweep ptrs allowed in rsl ptr array. */ if (sweep == NULL) return(QUIT); /* Check for a new physical sweep. */ if (tk_sindex == -1) { tk_sindex++; vs->tk.nray[tk_sindex] = vs->rsl.nray[pindex][sindex]; vs->rsl.sweep[tk_sindex] = sweep; } else if ((status=newPhysicalSweep(vs->rsl.sweep[tk_sindex], sweep))) { if (status < 0) return(status); tk_sindex++; if (tk_sindex >= MAX_SWEEP) { if (radar_verbose_flag) fprintf(stderr, "tkVosDimensions(): Too many toolkit sweeps.\n"); return(QUIT); } vs->tk.nray[tk_sindex] = vs->rsl.nray[pindex][sindex]; vs->rsl.sweep[tk_sindex] = sweep; } /* end if (newPhysicalSweep */ vs->tk.ncell[tk_sindex][pindex] = vs->rsl.ncell[pindex][sindex]; } /* end for (pindex=0;... */ sindex++; } /* end while (sindex < vs->rsl.maxNsweep) */ vs->tk.nsweep = tk_sindex + 1; return(OK); } /*************************************************************/ /* */ /* first_ray_in_sweep */ /* */ /*************************************************************/ Ray *first_ray_in_sweep(Sweep *sweep) { /* * Return the first non-NULL ray in the sweep. * Returns NULL, if error. */ int iray; if (sweep == NULL) return(NULL); for (iray=0; irayh.nrays; iray++) { if (sweep->ray[iray] != NULL) return(sweep->ray[iray]); } return(NULL); } /*************************************************************/ /* */ /* rslVosDimensions */ /* */ /*************************************************************/ int rslVosDimensions(VosSize *vs, Radar *radar, float maxRange) { /* Scopes out all dimensions of the VOS contained in the rsl radar structure. Records dimensions in the 'VosSize->rsl' structure. The ncell values may be less than the actual number of bins in the radar structure, since the 1B-51/1C-51 standards call for range truncation. Truncates range as necessary. For 1B-51: Max range is the lesser of: 1: max_range from radar structure, and 2: 230 km For 1C-51: Max range is the lesser of: 1: max_range from radar structure, and 2: 200 km Returns OK, or <0, if error. */ /* Must differentiate between rsl and vosSize array indices, since the rsl arrays may contain NULL elements. */ int ivolume, isweep, iray; /* Indices for rsl arrays. */ int Vindex, Sindex; /* Indices for non-NULL rsl array elements. */ int nrays_in_sweep; float maxRangeActual = 0.0; Ray *ray; Ray *longest_ray_in_sweep; /* Initialize the 'VosSize' structure. */ memset(vs, '\0', sizeof(VosSize)); vs->rsl.sweep[0] = NULL; /* if (radar_verbose_flag) fprintf(stderr, "RSL VOS Dimensions...\n"); */ Vindex = -1; for (ivolume=0; ivolumeh.nvolumes; ivolume++) { if (radar->v[ivolume] == NULL) continue; Vindex++; vs->rsl.v[Vindex] = radar->v[ivolume]; Sindex = -1; for (isweep=0; isweepv[ivolume]->h.nsweeps; isweep++) { if (radar->v[ivolume]->sweep[isweep] == NULL) continue; Sindex++; longest_ray_in_sweep = first_ray_in_sweep(radar->v[ivolume]->sweep[isweep]); if (longest_ray_in_sweep == NULL) { fprintf(stderr, "rslVosDimensions(): no rays in sweep:%d ???\n\n", isweep); return(QUIT); } nrays_in_sweep = 0; if (Sindex == 0) /* First sweep in volume? */ first_ray_in_volume[ivolume] = longest_ray_in_sweep; /* * Go thru the entire sweep to find the number of * rays, and the longest ray. */ for (iray=0; irayv[ivolume]->sweep[isweep]->h.nrays; iray++) { if (radar->v[ivolume]->sweep[isweep]->ray[iray] == NULL) continue; ray = radar->v[ivolume]->sweep[isweep]->ray[iray]; nrays_in_sweep++; if (ray->h.nbins > longest_ray_in_sweep->h.nbins) longest_ray_in_sweep = ray; } /* end for (iray=0;... */ if (Sindex == 0) /* 1st sweep of this volume? */ { /* Find max range (km) of data in this sweep. */ maxRangeActual = (longest_ray_in_sweep->h.range_bin1 + longest_ray_in_sweep->h.nbins * longest_ray_in_sweep->h.gate_size) / 1000.0; /*km*/ if (maxRangeActual > maxRange+0.5) /* Truncate range at maxRange km */ vs->rsl.ncell[Vindex][Sindex] = (int) ((maxRange*1000.0 - longest_ray_in_sweep->h.range_bin1) / longest_ray_in_sweep->h.gate_size); else vs->rsl.ncell[Vindex][Sindex] = (int) ((maxRangeActual*1000.0 - longest_ray_in_sweep->h.range_bin1) / longest_ray_in_sweep->h.gate_size); if (vs->rsl.ncell[Vindex][Sindex] > MAX_CELL) { fprintf(stderr, "rslVosDimensions(): ncell[parm%d]=%d > MAX_CELL=%d ", Vindex, vs->rsl.ncell[Vindex][Sindex], MAX_CELL); fprintf(stderr, " gate_size:%d\n", longest_ray_in_sweep->h.gate_size); return(QUIT); } } /* end if (Sindex == 0) */ else /* Not the 1st sweep of volume. */ { if (longest_ray_in_sweep->h.nbins > vs->rsl.ncell[Vindex][0]) vs->rsl.ncell[Vindex][Sindex] = vs->rsl.ncell[Vindex][0]; else vs->rsl.ncell[Vindex][Sindex] = longest_ray_in_sweep->h.nbins; } vs->rsl.nray[Vindex][Sindex] = nrays_in_sweep; if (vs->rsl.nray[Vindex][Sindex] > vs->rsl.maxNray) { vs->rsl.maxNray = vs->rsl.nray[Vindex][Sindex]; if (vs->rsl.maxNray > MAX_RAY) { fprintf(stderr, "rslVosDimensions(): v[%d]->sweep[%d].nray=%d > MAX_RAY=%d\n", ivolume, isweep, vs->rsl.nray[Vindex][Sindex], MAX_RAY); return(QUIT); } } } /* end for (isweep=0;... */ vs->rsl.nsweep[Vindex] = Sindex + 1; if (vs->rsl.nsweep[Vindex] > vs->rsl.maxNsweep) { vs->rsl.maxNsweep = vs->rsl.nsweep[Vindex]; if (vs->rsl.maxNsweep > MAX_SWEEP) { fprintf(stderr, "rslVosDimensions(): v[%d].nsweep=%d > MAX_SWEEP=%d\n", ivolume, vs->rsl.nsweep[Vindex], MAX_SWEEP); return(QUIT); } } /* if (radar_verbose_flag) { fprintf(stderr, " vIndex:%2d nsweeps:%d cellSize(m):%4d ncells:%d maxRng(km):%.1f\n", ivolume, vs->rsl.nsweep[Vindex], longest_ray_in_sweep->h.gate_size, longest_ray_in_sweep->h.nbins, maxRangeActual); } */ } /* for (ivolume=0;... */ vs->tk.nparm = Vindex + 1; if ((vs->tk.nparm == 0) || (vs->tk.nparm > MAX_PARM)) { fprintf(stderr, "rslVosDimensions(): Invalid nparm=%d\n", vs->tk.nparm); return(QUIT); } return(OK); } /*************************************************************/ /* */ /* L1GVtemplateInit */ /* */ /*************************************************************/ int L1GVtemplateInit(VosSize *vs, Radar *radar, char *hdfFileName, float maxRange) { /* Create a toolkit 'Level_1B_1C_GV' template_node for the VOS contained in the radar structure. To do this: 1: Based on the data contained in the rsl structure, initialize the following toolkit arrays: 'TKnparm' : no. of volumes in radar structure (DZ, VR, ZD, etc). 'TKnsweep': max no. of sweeps/volume, over all volumes. 'TKnray' : max no. of rays per sweep, over all volumes. 'TKncell': max no. of cells (bins) per ray, over all volumes, all sweeps. These values are parameters for the 'TKsetL1GVtemplate()' toolkit function call. 2: Call TKsetL1GVtemplate(). Returns: OK, if success. <0, if failure. */ int pindex, status; int32 TKnparm[MAX_VOS], TKnsweep[MAX_VOS], TKnray[MAX_VOS]; int32 TKncell[MAX_VOS][MAX_PARM]; /* Scope out all dimensions of the VOS contained in the rsl structure. */ status = rslVosDimensions(vs, radar, maxRange); if (status < 0) return(status); /* Set the toolkit VOS dimensions. These are different from the rsl dimensions. The toolkit L1GV structure is organized as a sequence of physical sweeps, while RSL is organized as a sequence of logical "volumes". */ status = tkVosDimensions(vs, radar); if (status < 0) return(status); /* Fill required toolkit array values for TKsetL1GVtemplate() call. */ TKnparm[0] = vs->tk.nparm; TKnsweep[0] = vs->tk.nsweep; TKnray[0] = vs->rsl.maxNray; /* if (radar_verbose_flag) fprintf(stderr, "Toolkit VOS Dimensions...\n"); */ for (pindex=0; pindextk.nparm; pindex++) { TKncell[0][pindex] = vs->rsl.ncell[pindex][0]; /* if (radar_verbose_flag) fprintf(stderr, " pIndex:%d nsweep:%d nray:%d ncell:%d\n", pindex, (int)TKnsweep[0], (int)TKnray[0], (int)TKncell[0][pindex]); */ } /* Create a toolkit template_node for this VOS. */ status = TKsetL1GVtemplate(1, TKnparm, TKncell, TKnray, TKnsweep, hdfFileName); if (status != TK_SUCCESS) { fprintf(stderr, "L1GVtemplateInit(): *****TKsetL1GVtemplate() error\n"); return(ABORT); } return(OK); /* Successful template_node creation. */ } /*************************************************************/ /* */ /* hdfFileOpen */ /* */ /*************************************************************/ static int hdfFileOpen(IO_HANDLE *granuleHandle, VosSize *vs, char *hdfFileName, Radar *radar) { /* Create a toolkit template node for the new VOS, and then open a HDF file in which to write the VOS. Returns: OK, if success. <0, if failure. */ char fileAccessMode; int productID, status; float maxRange; struct stat buf; /* Based on the product desired, set the maximum range of radar data values for the HDF file. For 1B-51: Max range = 230.0 km. For 1C-51: Max range = 200.0 km */ productID = (int)granuleHandle->productID; if (productID == TK_L1B_GV) maxRange = MAX_RANGE_1B51; else if (productID == TK_L1C_GV) maxRange = MAX_RANGE_1C51; else { fprintf(stderr, "hdfFileOpen(): Invalid product type\n"); return(ABORT); } /* Create a L1BGV template node for the new VOS. */ /* if (radar_verbose_flag) fprintf(stderr, "\n****** Creating toolkit template_node for VOS ...\n"); */ status = L1GVtemplateInit(vs, radar, hdfFileName, maxRange); if (status < 0) return(status); /* Determine if the HDF file to which this VOS belongs already exists.*/ if (stat(hdfFileName, &buf) == 0) { /* The HDF file already exists. We will append this VOS to it. */ fileAccessMode = TK_APPEND; if (radar_verbose_flag) fprintf(stderr, "\n****** Opening HDF file: %s to append VOS ...\n", hdfFileName); } else /* The HDF file does not exist. We must create it. */ { fileAccessMode = TK_NEW_FILE; if (radar_verbose_flag) fprintf(stderr, "\n****** Opening new HDF file: %s to write VOS ...\n", hdfFileName); } /* Finally, open the HDF file. */ status = TKopen(hdfFileName, productID, fileAccessMode, granuleHandle); if (status != TK_SUCCESS) { if (radar_verbose_flag) fprintf(stderr, "level_1(): ***** TKopen() error\n"); return(ABORT); } /* Find the slot number in the HDF granule for this VOS. */ vs->vos_num = TKgetNvos(granuleHandle) - 1; /* Write metadata fields into HDF file. */ metaDataWrite(granuleHandle, radar, hdfFileName, fileAccessMode); return(OK); } /*************************************************************/ /* */ /* radarPrep1B51 */ /* */ /*************************************************************/ int radarPrep1B51(Radar *radar) { /* Prepare the RSL radar structure for 1B-51 processing: Null the pointers to RSL volumes not required for 1B-51. Returns OK. */ int j; /* For 1B-51, we need only the DZ, VR, and ZD data volumes. NULL the pointers to all other volumes. */ for (j=0; jh.nvolumes; j++) { if (radar->v[j] == NULL) continue; if ((j == DZ_INDEX) || (j == VR_INDEX) || (j == ZD_INDEX)) continue; radar->v[j] = NULL; } /* end for (j=0; ... */ return(OK); } /*************************************************************/ /* */ /* radarPrep1C51 */ /* */ /*************************************************************/ int radarPrep1C51(Radar *radar) { /* Prepare the RSL radar structure for 1C-51 processing. 1. Check that the necessary RSL volumes exist. 2. Create mask volumes. 3. Null the pointers to RSL volumes not required for 1C-51. Returns: OK, if success. <0, if failure. */ int j; if (radar->v[DZ_INDEX] != NULL) /* Is there a DZ volume? */ { if (radar->v[CZ_INDEX] == NULL) /* DZ exists, hence CZ should exist. */ { fprintf(stderr, "RSL_radar_to_hdf(): CZ volume expected but not found.\n"); return(QUIT); } else /* Both DZ and CZ volumes exist. */ { /* Construct mask volume MZ */ radar->v[MZ_INDEX] = maskBuild(radar->v[CZ_INDEX], radar->v[DZ_INDEX]); /* We're now finished with the RSL CZ data, so let the CZ volume point to the uncorrected volume DZ. We will later use it, in combination with the mask volume MZ, to create the HDF CZ volume. (The HDF CZ values differ from the RSL CZ values.) */ radar->v[CZ_INDEX] = radar->v[DZ_INDEX]; } } /* end if (radar->v[DZ_INDEX] != NULL) */ /* For 1C-51, we need only the following volumes: CZ: QC'ed reflectivity, which we will later obtain from DZ and MZ MZ: mask to obtain DZ from CZ NULL the pointers to all other volumes. */ for (j=0; jh.nvolumes; j++) { if (radar->v[j] == NULL) continue; if ((j == CZ_INDEX) || (j == MZ_INDEX)) continue; radar->v[j] = NULL; } /* end for (j=0; ... */ return(OK); } /*************************************************************/ /* */ /* nullGranuleCreate */ /* */ /*************************************************************/ int nullGranuleCreate(char *hdfFileName, IO_HANDLE *granuleHandle, Radar *radar) { /* Create an HDF file containing an empty granule. */ int status; struct stat buf; /* Following arrays required by toolkit function 'TKsetL1GVtemplate()'*/ int32 TKnparm[MAX_VOS], TKnsweep[MAX_VOS], TKnray[MAX_VOS]; int32 TKncell[MAX_VOS][MAX_PARM]; /* Check if this HDF file already exists. If it exists, abort. */ if (stat(hdfFileName, &buf) == 0) { if (radar_verbose_flag) fprintf(stderr, "\nnullGranuleCreate(): File %s already exists.\n", hdfFileName); return(ABORT); } /* Fill toolkit array values for subsequent TKsetL1GVtemplate() call. */ TKnparm[0] = TKnsweep[0] = TKnray[0] = TKncell[0][0] = 0; /* Create a L1 GV template_node. */ status = TKsetL1GVtemplate(0, TKnparm, TKncell, TKnray, TKnsweep, hdfFileName); if (status != TK_SUCCESS) { fprintf(stderr, "nullGranuleCreate(): ***** TKsetL1GVtemplate() error\n"); return(ABORT); } /* Open the HDF file. */ if (radar_verbose_flag) fprintf(stderr, "\n\n****** Opening new HDF file: %s for empty granule...\n", hdfFileName); status = TKopen(hdfFileName, TK_L1C_GV, TK_NEW_FILE, granuleHandle); if (status != TK_SUCCESS) { if (radar_verbose_flag) fprintf(stderr, "nullGranuleCreate(): ***** TKopen() error\n"); return(ABORT); } /* Write metadata fields into HDF file. */ metaDataWrite(granuleHandle, radar, hdfFileName, TK_NEW_FILE); /* Close the HDF file */ if (radar_verbose_flag) fprintf(stderr, "\n****** Closing HDF file: %s ...\n\n", hdfFileName); status = TKclose(granuleHandle); if (status != TK_SUCCESS) { if (radar_verbose_flag) fprintf(stderr, "nullGranuleCreate(): ***** TKclose() error\n"); return(ABORT); } return(OK); } /*************************************************************/ /* */ /* RSL_radar_to_hdf */ /* */ /*************************************************************/ int RSL_radar_to_hdf(Radar *radar, char *hdfFileName) { /* Writes one VOS from a RSL radar structure into one HDF file. Returns: OK , if success. <0 , if failure. (See Error code definitions at top of file.) */ char product[8]; int status; L1B_1C_GV *gvl1; /* Toolkit structure for VOS storage. */ IO_HANDLE granuleHandle; /* Toolkit file_descriptor structure. */ VosSize vs; /* Storage of VOS dimensions. */ Volume *v[MAX_RADAR_VOLUMES]; /* Storage of radar volume pointers. */ if (radar == NULL) return(ABORT); if (radar->h.nvolumes == 0) /* Create an HDF file to contain an empty granule. */ { status = nullGranuleCreate(hdfFileName, &granuleHandle, radar); return(status); } /* We will, within functions radarPrep1B51() and radarPrep1C51(), manipulate the array of radar volume pointers radar->v[]. Hence we here save the array radar->v[] in v[], so we can restore radar->v[] to its original condition before leaving this function. */ radarVolumesSave(v, radar); /* Get the desired product out of the HDF filename. */ sscanf(strrchr(hdfFileName, '/'), "/%4s", product); if (strcmp(product, "1B51") == 0) { granuleHandle.productID = TK_L1B_GV; status = radarPrep1B51(radar); } else if (strcmp(product, "1C51") == 0) { granuleHandle.productID = TK_L1C_GV; status = radarPrep1C51(radar); /* Creates mask volumes. */ } else /* Unknown product. */ { status = ABORT; if (radar_verbose_flag) fprintf(stderr, "RSL_radar_to_hdf(): Unknown product requested: %s.\n", product); } if (status < 0) goto quit; /* Open the HDF file 'hdfFileName'. */ status = hdfFileOpen(&granuleHandle, &vs, hdfFileName, radar); if (status < 0) goto quit; /* Build toolkit 'L1B_1C_GV' structure using data from radar structure.*/ if (radar_verbose_flag) fprintf(stderr, "\n****** Moving VOS from RSL structure --> toolkit structure ...\n"); gvl1 = gvl1Build(radar, qcParm, &vs, (int)granuleHandle.productID); /* Write data from toolkit 'L1B_1C_GV' structure to HDF file. */ if (radar_verbose_flag) fprintf(stderr, "\n****** Writing VOS to HDF file: %s ...\n", hdfFileName); status = TKwriteL1GV(&granuleHandle, gvl1); if (status != TK_SUCCESS) { TKclose(&granuleHandle); status = ABORT; if (radar_verbose_flag) fprintf(stderr, "RSL_radar_to_hdf(): *** TKwriteL1GV() error\n"); goto free_memory_and_quit; } /* Close the HDF file */ if (radar_verbose_flag) fprintf(stderr, "\n****** Closing HDF file: %s ...\n\n", hdfFileName); status = TKclose(&granuleHandle); if (status == TK_SUCCESS) status = OK; else { if (radar_verbose_flag) fprintf(stderr, "RSL_radar_to_hdf(): *** TKclose() error\n"); status = ABORT; } free_memory_and_quit: /* Free memory allocated to the toolkit 'L1B_1C_GV' structure. */ TKfreeGVL1(gvl1); /* If RSL mask volumes for 1C-51 were created above, free them. */ if (radar->v[MZ_INDEX] != NULL) RSL_free_volume(radar->v[MZ_INDEX]); if (radar->v[MD_INDEX] != NULL) RSL_free_volume(radar->v[MD_INDEX]); quit: /* Restore the array of radar volume pointers in radar->v[]. */ radarVolumesRestore(radar, v); return(status); } #endif rsl-v1.43/fix_headers.c0000644000102200007640000000677407634132711012013 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Fix header fields in ray headers. * * This routine is initially written to support 1C-51. * It has been noticed that several radar files contain bad header * information. Herein, we correct it by simple linear interpolation. * * By: John Merritt * Space Applications Corporation * Copyright 7/16/96 * */ #include #include "rsl.h" Ray *RSL_fix_ray_header(Ray *ray) { return ray; } Sweep *RSL_fix_sweep_header(Sweep *sweep) { int i; int nfixed = 0; int needed_to_fix = 0; Ray *ray; if (sweep == NULL) return sweep; for (i=0; ih.nrays; i++) { /* Here, we check and use more than one ray. */ ray = sweep->ray[i]; if (ray == NULL) continue; if (ray->h.month < 1 || ray->h.month > 12) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.month = %d\n", i, ray->h.month); } if (ray->h.day < 1 || ray->h.day > 31) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.day = %d\n", i, ray->h.day); } if (ray->h.year < 1980 || ray->h.year > 2020) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.year = %d\n", i, ray->h.year); } if (ray->h.hour < 0 || ray->h.hour > 23) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.hour = %d\n", i, ray->h.hour); } if (ray->h.minute < 0 || ray->h.minute > 59) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.minute= %d\n", i, ray->h.minute); } if (ray->h.sec < 0 || ray->h.sec > 59) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.sec = %f\n", i, ray->h.sec); } if (ray->h.elev < 0 || ray->h.elev > 90) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.elev = %f\n", i, ray->h.elev); } if (ray->h.range_bin1 < 0 || ray->h.range_bin1 > 150000) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.range_bin1 = %d\n", i, ray->h.range_bin1); } if (ray->h.gate_size < 0 || ray->h.gate_size > 100000) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.gate_size = %d\n", i, ray->h.gate_size); } if (ray->h.beam_width <= 0 || ray->h.beam_width > 10) { needed_to_fix = 1; fprintf(stderr, "ray[%3.3d]->h.beam_width = %f\n", i, ray->h.beam_width); } if (needed_to_fix) { needed_to_fix = 0; nfixed++; } } fprintf(stderr, "Repaired %d rays in this sweep.\n", nfixed); return sweep; } Volume *RSL_fix_volume_header(Volume *v) { int i; if (v == NULL) return v; for (i=0; ih.nsweeps; i++) RSL_fix_sweep_header(v->sweep[i]); return v; } Radar *RSL_fix_radar_header(Radar *radar) { int i; if (radar == NULL) return radar; for (i=0; ih.nvolumes; i++) RSL_fix_volume_header(radar->v[i]); return radar; } rsl-v1.43/nsig_to_radar.c0000644000102200007640000010261511640167041012330 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996 Paul A. Kucera of Applied Research Corporation, Landover, Maryland, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /*************************************************************/ /* */ /* Function: nsig_to_radar.c */ /* */ /* Paul A. Kucera */ /* Applied Research Corporation */ /* NASA/GSFC */ /* TRMM/Code 910.1 */ /* */ /* Modifications by: */ /* John H. Merritt */ /* Space Applications Corporation */ /* NASA/GSFC */ /* TRMM/Code 910.1 */ /* */ /* Started: 08 AUG 96 */ /* */ /* Derived from Paul Kucera's nsig_to_radar.c */ /* Copyright 1996 */ /*************************************************************/ #include #include #include #include #include #include #include #include #include"nsig.h" #include"rsl.h" extern int radar_verbose_flag; extern int rsl_qfield[]; /* See RSL_select_fields */ /* We need this entry for various things esp in Ray_header */ #define MISSING_HEADER_DATA -9999 /* The following is speed of light _in_ _air_ ! */ #define SPEED_OF_LIGHT 299702547 #define MIT_BEAMWIDTH 1.65 #define TOG_BEAMWIDTH 1.65 #define KWA_BEAMWIDTH 1.0 #define DEFAULT_BEAMWIDTH 1.0 #define NSIG_NO_DATA -1 #define MAX_NSIG_SWEEPS 30 #define MAX_NSIG_RAYS 400 #define NSIG_NO_ECHO -32.0 #define NSIG_NO_ECHO2 -999.0 static float (*f)(Range x); static Range (*invf)(float x); extern FILE *file; void get_extended_header_info(NSIG_Sweep **nsig_sweep, int xh_size, int iray, int nparams, int *msec, float *azm, float *elev, float *pitch, float *roll, float *heading, float *azm_rate, float *elev_rate, float *pitch_rate, float *roll_rate, float *heading_rate, float *lat, float *lon, int *alt, float *rvc, float *vel_east, float *vel_north, float *vel_up) { static NSIG_Ext_header_ver1 xh; int data_type, itype; *msec = *azm = *elev = *pitch = *roll = *heading = *azm_rate = *elev_rate = *pitch_rate = *roll_rate = *heading_rate = *lat = *lon = *alt = *rvc = 0; /* Determine where 'itype' for extended header is. */ for (itype = 0; itypeidh.data_type); if (data_type == NSIG_DTB_EXH) break; } /* printf("...extended header itype=%d, nparams=%d\n", itype, nparams); */ if (itype == nparams) return; /* No extended header. */ /* Version 1. */ if (nsig_sweep[itype]->ray[iray] == NULL) return; if (nsig_sweep[itype]->ray[iray]->range == NULL) return; memmove(&xh, nsig_sweep[itype]->ray[iray]->range, sizeof(xh)); *msec = NSIG_I4(xh.msec); /* printf("...extended header msec= %d\n", *msec); */ if (xh_size <= 20) /* Stop, only have version 0. */ return; /* Version 1 processing. */ *azm = nsig_from_bang(xh.azm); *elev = nsig_from_bang(xh.elev); *pitch = nsig_from_bang(xh.pitch); *roll = nsig_from_bang(xh.roll); *heading = nsig_from_bang(xh.heading); *azm_rate = nsig_from_bang(xh.azm_rate); *elev_rate = nsig_from_bang(xh.elev_rate); *pitch_rate = nsig_from_bang(xh.pitch_rate); *roll_rate = nsig_from_bang(xh.roll_rate); #ifdef NSIG_VER2 #else *heading_rate = nsig_from_bang(xh.heading_rate); #endif *lat = nsig_from_fourb_ang(xh.lat); *lon = nsig_from_fourb_ang(xh.lon); if(*lat > 180.0) *lat -= 360.0; if(*lon > 180.0) *lon -= 360.0; *alt = NSIG_I2(xh.alt); *rvc = NSIG_I2(xh.rad_vel_cor)/100.0; /* cm to m */ *vel_east = NSIG_I2(xh.vel_e)/100.0; /* cm to m */ *vel_north = NSIG_I2(xh.vel_n)/100.0; /* cm to m */ *vel_up = NSIG_I2(xh.vel_u)/100.0; /* cm to m */ return; } /** Main code **/ Radar * #ifdef NSIG_VER2 RSL_nsig2_to_radar #else RSL_nsig_to_radar #endif (char *filename) { FILE *fp; /* RSL structures */ Radar *radar; Ray *ray; int i, j, k, n; int year, month, day; int hour, minute, sec; int numbins, numsweep; int num_rays, sea_lvl_hgt; int radar_number, num_samples; int latd, latm, lats, lond, lonm, lons; int data_type; int bin_num; int sweep_year, sweep_day, sweep_month; int sweep_hour, sweep_minute, sweep_second; int sweep_sec; int z_flag_unc, z_flag_cor, v_flag, w_flag, speckle; int ant_scan_mode; float second; float pw; float bin_space; float prf, prf2, wave, beam_width; int prf_mode; float prf_modes[] = {1.0, 2.0/3.0, 3.0/4.0, 4.0/5.0}; float vert_half_bw, horz_half_bw; float rng_last_bin; float rng_first_bin, freq; float max_vel, sweep_rate, azim_rate; float ray_data; float az1, az2; double tmp; float sqi, log, csr, sig, cal_dbz; char radar_type[50], state[2], city[15]; char site_name[16]; NSIG_Product_file *prod_file; short id; int data_mask, nrays; int masks[5]; int nparams, nsweeps; NSIG_Sweep **nsig_sweep; NSIG_Ray *ray_p; int itype, ifield; unsigned short nsig_2byte; /* New for 2-byte data types, Aug 2009 */ twob nsig_twob; Sweep *sweep; int msec; float azm, elev, pitch, roll, heading, azm_rate, elev_rate, pitch_rate, roll_rate, heading_rate, lat, lon; float fix_angle; int alt; /* Altitude */ float rvc; /* Radial correction velocity m/s */ float vel_east, vel_north, vel_up; /* Platform velocity vectors m/sec */ int xh_size; float incr; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; extern float rsl_kdp_wavelen; radar = NULL; if (radar_verbose_flag) fprintf(stderr, "open file: %s\n", filename); /** Opening nsig file **/ if((fp = nsig_open(filename)) == NULL) return NULL; #ifdef NSIG_VER2 sprintf(radar_type, "nsig2"); radar_number = 22; /** Arbitrary number given to nsig2 data **/ #else sprintf(radar_type, "nsig"); radar_number = 21; /* What are these suppose to be? */ #endif sprintf(state,"NA"); sprintf(city,"NA"); /* MAINLINE CODE */ prod_file = (NSIG_Product_file *)calloc(1, sizeof(NSIG_Product_file)); n = nsig_read_record(fp, (char *)&prod_file->rec1); nsig_endianess(&prod_file->rec1); if (radar_verbose_flag) fprintf(stderr, "Read %d bytes for rec1.\n", n); id = NSIG_I2(prod_file->rec1.struct_head.id); if (radar_verbose_flag) fprintf(stderr, "ID = %d\n", (int)id); if (id != 7 && id != 27) { /* testing: Use 27 for Version 2 data */ fprintf(stderr, "File is not a SIGMET version 1 nor version 2 raw product file.\n"); return NULL; } n = nsig_read_record(fp, (char *)&prod_file->rec2); if (radar_verbose_flag) fprintf(stderr, "Read %d bytes for rec2.\n", n); /* Count the bits set in 'data_mask' to determine the number * of parameters present. */ xh_size = NSIG_I2(prod_file->rec2.ingest_head.size_ext_ray_headers); nrays = NSIG_I2(prod_file->rec2.ingest_head.num_rays); if (radar_verbose_flag) fprintf(stderr, "Expecting %d rays in each sweep.\n", nrays); #ifdef NSIG_VER2 memmove(&masks[0], prod_file->rec2.task_config.dsp_info.data_mask_cur.mask_word_0, sizeof(fourb)); memmove(&masks[1], &prod_file->rec2.task_config.dsp_info.data_mask_cur.mask_word_1, 4*sizeof(fourb)); nparams = 0; for (j=0; j < 5; j++) { data_mask = masks[j]; for (i=0; i<32; i++) nparams += (data_mask >> i) & 0x1; } #else memmove(&data_mask, prod_file->rec2.task_config.dsp_info.data_mask, sizeof(fourb)); for (nparams=i=0; i<32; i++) nparams += (data_mask >> i) & 0x1; #endif /* Number of sweeps */ nsweeps = NSIG_I2(prod_file->rec2.task_config.scan_info.num_swp); memmove(site_name, prod_file->rec1.prod_end.site_name, sizeof(prod_file->rec1.prod_end.site_name)); site_name[sizeof(site_name)-1] = '\0'; if (radar_verbose_flag) { fprintf(stderr, "nparams = %d, nsweeps = %d\n", nparams, nsweeps); fprintf(stderr, "Site name = <%s>\n", site_name); } /* nsig_sweep = nsig_read_sweep(fp, prod_file) * * Use: nsig_sweep[i]->ray[j]->range * * where 'range' is [0..nbins-1] */ /* * All the information you need is in: * prod_file->rec1 * .struct_head, .prod_config .prod_end * prod_file->rec2 * .struct_head, .ingest_head, .task_config .device_stat, * .dsp1, .dsp2 * nsig_sweep[0..nparams-1] 'nparams' is the true number * of parameters present. You * must check the 'id' (or type) * to determine the field type. * So far seen, nparams <= 6. * nsig_sweep[i]->bhdr * nsig_sweep[i]->idh * nsig_sweep[i]->ray[j] * * Note: * For extended header access, you'll typically use nsig_sweep[0] * (double check the id) and the ray data allocated (nsig_ray->range) * is a pointer to the extended header, either v0 or v1. * You can typecast the pointer to NSIG_Ext_header_ver0 or * NSIG_Ext_header_ver1, as you like. To determine which * version of the extended headers you have use: * xh_size <= 20 for version 0, else version 1. * Access: * xh_size = NSIG_I2(prod_file->rec2.ingest_head.size_ext_ray_headers) * * Functions: * NSIG_I2(nsig_sweep[i]->idh.num_rays_act); -- # of rays. (j) * NSIG_I2(nsig_sweep[i]->ray[j]->h.num_bins); -- # of bins in a ray. * * NSIG_I2(x), NSIG_I4(x) - Convert data, x, to floating point. * * IMPORTANT NOTE: It must be known whether or not to perform * byte-swapping. To determine this, call * 'nsig_endianess'. It returns 0 for no-swapping * and 1 for swapping. Additionally, it transparently * initializes the nsig library to automatically * swap when using NSIG_I2 or NSIG_I4. * The function 'nsig_read_sweep' automatically * calls 'nsig_endianess', too. */ sea_lvl_hgt = NSIG_I2(prod_file->rec1.prod_end.grnd_sea_ht); if (radar_verbose_flag) fprintf(stderr, "sea: %d\n", sea_lvl_hgt); if (radar_verbose_flag) fprintf(stderr, "site_name: %s", site_name); /** Determine beamwidth from input variables (not saved in nsig file) **/ if(strncmp(site_name,"mit",3) == 0 || strncmp(site_name,"MIT",3) == 0) beam_width = MIT_BEAMWIDTH; else if(strncmp(site_name,"tog",3) == 0 || strncmp(site_name,"TOG",3) == 0) beam_width = TOG_BEAMWIDTH; else if(strncmp(site_name,"kwa",3) == 0 || strncmp(site_name,"KWA",3) == 0) beam_width = KWA_BEAMWIDTH; else beam_width = DEFAULT_BEAMWIDTH; if (radar_verbose_flag) fprintf(stderr, "beamwidth: %f\n", beam_width); vert_half_bw = beam_width/2.0; horz_half_bw = beam_width/2.0; /** Reading date and time **/ month = NSIG_I2(prod_file->rec2.ingest_head.start_time.month); year = NSIG_I2(prod_file->rec2.ingest_head.start_time.year); day = NSIG_I2(prod_file->rec2.ingest_head.start_time.day); sec = NSIG_I4(prod_file->rec2.ingest_head.start_time.sec); /* converting seconds since mid to time of day */ tmp = sec/3600.0; hour = (int)tmp; tmp = (tmp - hour) * 60.0; minute = (int)tmp; second = (tmp - minute) * 60.0; /** records of the nsig file. **/ num_rays = 0; pw = (NSIG_I4(prod_file->rec1.prod_end.pulse_wd))/100.0; /* pulse width */ prf = NSIG_I4(prod_file->rec1.prod_end.prf); /* pulse repetition frequency */ prf_mode = NSIG_I2(prod_file->rec2.task_config.dsp_info.prf_mode); prf2 = prf * prf_modes[prf_mode]; wave = (NSIG_I4(prod_file->rec1.prod_end.wavelen))/100.0; /* wavelength (cm) */ rsl_kdp_wavelen = wave; /* EXTERNAL (volume.c) This sets KD_F and KD_INVF * to operate with the proper wavelength. */ numbins = NSIG_I4(prod_file->rec1.prod_end.num_bin); /* # bins in ray */ rng_first_bin = (float)NSIG_I4(prod_file->rec1.prod_end.rng_f_bin)/100.0; rng_last_bin = (float)NSIG_I4(prod_file->rec1.prod_end.rng_l_bin)/100.0; bin_space = ((rng_last_bin-rng_first_bin)/numbins); /*rng res (m)*/ numsweep = NSIG_I2(prod_file->rec2.task_config.scan_info.num_swp); /* # sweeps in volume */ num_samples = NSIG_I2(prod_file->rec1.prod_end.num_samp); sweep_rate = 3.0; /** Approximate value -- info not stored **/ azim_rate = sweep_rate*360.0/60.0; if (prf_mode != 0) { float max_vel1 = wave*prf/(100.0*4.0); float max_vel2 = wave*prf2/(100.0*4.0); max_vel = (max_vel1 * max_vel2)/(max_vel1-max_vel2); } else { max_vel = wave*prf/(100.0*4.0); } freq = (299793000.0/wave)*1.0e-4; /** freq in MHZ **/ sqi = NSIG_I2(prod_file->rec2.task_config.calib_info.sqi)/256.0; log = NSIG_I2(prod_file->rec2.task_config.calib_info.noise)/16.0; csr = NSIG_I2(prod_file->rec2.task_config.calib_info.clutr_corr)/(-16.0); sig = NSIG_I2(prod_file->rec2.task_config.calib_info.power)/16.0; cal_dbz = NSIG_I2(prod_file->rec2.task_config.calib_info.cal_ref)/16.0; z_flag_unc = NSIG_I2(prod_file->rec2.task_config.calib_info.z_flag_unc); z_flag_cor = NSIG_I2(prod_file->rec2.task_config.calib_info.z_flag_cor); v_flag = NSIG_I2(prod_file->rec2.task_config.calib_info.v_flag); w_flag = NSIG_I2(prod_file->rec2.task_config.calib_info.w_flag); speckle = NSIG_I2(prod_file->rec2.task_config.calib_info.speckle); /** Verbose calibration information **/ if (radar_verbose_flag) { fprintf(stderr, "LOG = %5.2f\n", log); fprintf(stderr, "SQI = %5.2f\n", sqi); fprintf(stderr, "CSR = %5.2f\n", csr); fprintf(stderr, "SIG = %5.2f\n", sig); fprintf(stderr, "Calibration reflectivity: %5.2f dBZ\n", cal_dbz); fprintf(stderr, "ZT flags: %d\n", z_flag_unc); /** can find these **/ fprintf(stderr, "DZ flags: %d\n", z_flag_cor); /** defn in the **/ fprintf(stderr, "VR flags: %d\n", v_flag); /** SIGMET Doc **/ fprintf(stderr, "SW flags: %d\n", w_flag); fprintf(stderr, "Flags: -3856 = SQI thresholding\n"); fprintf(stderr, " -21846 = LOG thresholding\n"); fprintf(stderr, " -24416 = LOG & SQI thresholding\n"); fprintf(stderr, " -24516 = LOG & SQI & SIG thresholding\n"); fprintf(stderr, "speckle remover: %d\n", speckle); } if (radar_verbose_flag) fprintf(stderr, "vel: %f prf: %f prf2: %f\n", max_vel, prf, prf2); /** Extracting Latitude and Longitude from nsig file **/ lat = nsig_from_fourb_ang(prod_file->rec2.ingest_head.lat_rad); lon = nsig_from_fourb_ang(prod_file->rec2.ingest_head.lon_rad); if(lat > 180.0) lat -= 360.0; if(lon > 180.0) lon -= 360.0; if (radar_verbose_flag) fprintf(stderr, "nsig_to_radar: lat %f, lon %f\n", lat, lon); /** Latitude deg, min, sec **/ latd = (int)lat; tmp = (lat - latd) * 60.0; latm = (int)tmp; lats = (int)((tmp - latm) * 60.0); /** Longitude deg, min, sec **/ lond = (int)lon; tmp = (lon - lond) * 60.0; lonm = (int)tmp; lons = (int)((tmp - lonm) * 60.0); /** Allocating memory for radar structure **/ radar = RSL_new_radar(MAX_RADAR_VOLUMES); if (radar == NULL) { fprintf(stderr, "nsig_to_radar: radar is NULL\n"); return NULL; } /** Filling Radar Header **/ radar->h.month = month; radar->h.day = day; radar->h.year = year; /* Year 2000 compliant. */ radar->h.hour = hour; radar->h.minute = minute; radar->h.sec = second; sprintf(radar->h.radar_type, "%s", radar_type); radar->h.number = radar_number; memmove(radar->h.name, site_name, sizeof(radar->h.name)); memmove(radar->h.radar_name, site_name, sizeof(radar->h.radar_name)); memmove(radar->h.city, city, sizeof(radar->h.city)); memmove(radar->h.state, state, sizeof(radar->h.state)); radar->h.latd = latd; radar->h.latm = latm; radar->h.lats = lats; radar->h.lond = lond; radar->h.lonm = lonm; radar->h.lons = lons; radar->h.height = (int)sea_lvl_hgt; radar->h.spulse = (int)(pw*1000); radar->h.lpulse = (int)(pw*1000); ant_scan_mode = NSIG_I2(prod_file->rec2.task_config.scan_info.ant_scan_mode); if(ant_scan_mode == 2 || ant_scan_mode == 7) radar->h.scan_mode = RHI; else radar->h.scan_mode = PPI; if (radar_verbose_flag) { #ifdef NSIG_VER2 fprintf(stderr, "\nSIGMET version 2 raw product file.\n"); #else fprintf(stderr, "\nSIGMET version 1 raw product file.\n"); #endif fprintf(stderr, "Date: %2.2d/%2.2d/%4.4d %2.2d:%2.2d:%f\n", radar->h.month, radar->h.day, radar->h.year, radar->h.hour, radar->h.minute, radar->h.sec); fprintf(stderr, "Name: "); for (i=0; ih.name); i++) fprintf(stderr, "%c", radar->h.name[i]); fprintf(stderr, "\n"); fprintf(stderr, "Lat/lon (%d %d' %d'', %d %d' %d'')\n", radar->h.latd, radar->h.latm, radar->h.lats, radar->h.lond, radar->h.lonm, radar->h.lons); } /** Converting data **/ if (radar_verbose_flag) fprintf(stderr, "Expecting %d sweeps.\n", numsweep); for(i = 0; i < numsweep; i++) { nsig_sweep = nsig_read_sweep(fp, prod_file); if (nsig_sweep == NULL) { /* EOF possibility */ if (feof(fp)) break; else continue; } if (rsl_qsweep != NULL) { if (i > rsl_qsweep_max) break; if (rsl_qsweep[i] == 0) continue; } if (radar_verbose_flag) fprintf(stderr, "Read sweep # %d\n", i); /* The whole sweep is 'nsig_sweep' ... pretty slick. * * nsig_sweep[itype] -- [0..nparams], if non-null. */ for (itype=0; itypeidh.time.month); sweep_year = NSIG_I2(nsig_sweep[itype]->idh.time.year); sweep_day = NSIG_I2(nsig_sweep[itype]->idh.time.day); sweep_sec = NSIG_I4(nsig_sweep[itype]->idh.time.sec); #ifdef NSIG_VER2 msec = NSIG_I2(nsig_sweep[itype]->idh.time.msec); /* printf("....... msec == %d\n", msec); */ #endif /* converting seconds since mid to time of day */ tmp = sweep_sec/3600.0; sweep_hour = (int)tmp; tmp = (tmp - sweep_hour) * 60.0; sweep_minute = (int)tmp; sweep_second = sweep_sec - (sweep_hour*3600 + sweep_minute*60); num_rays = NSIG_I2(nsig_sweep[itype]->idh.num_rays_exp); data_type = NSIG_I2(nsig_sweep[itype]->idh.data_type); ifield = 0; switch (data_type) { case NSIG_DTB_EXH: ifield = -1; break; case NSIG_DTB_UCR: case NSIG_DTB_UCR2: ifield = ZT_INDEX; f = ZT_F; invf = ZT_INVF; break; case NSIG_DTB_CR: case NSIG_DTB_CR2: ifield = DZ_INDEX; f = DZ_F; invf = DZ_INVF; break; case NSIG_DTB_VEL: case NSIG_DTB_VEL2: ifield = VR_INDEX; f = VR_F; invf = VR_INVF; break; case NSIG_DTB_WID: case NSIG_DTB_WID2: ifield = SW_INDEX; f = SW_F; invf = SW_INVF; break; case NSIG_DTB_ZDR: case NSIG_DTB_ZDR2: ifield = DR_INDEX; f = DR_F; invf = DR_INVF; break; case NSIG_DTB_KDP: ifield = KD_INDEX; f = KD_F; invf = KD_INVF; break; case NSIG_DTB_PHIDP: /* SRB 990127 */ ifield = PH_INDEX; f = PH_F; invf = PH_INVF; break; case NSIG_DTB_RHOHV: /* SRB 000414 */ ifield = RH_INDEX; f = RH_F; invf = RH_INVF; break; case NSIG_DTB_VELC: case NSIG_DTB_VELC2: ifield = VC_INDEX; f = VC_F; invf = VC_INVF; break; case NSIG_DTB_KDP2: ifield = KD_INDEX; f = KD_F; invf = KD_INVF; break; case NSIG_DTB_PHIDP2: ifield = PH_INDEX; f = PH_F; invf = PH_INVF; break; case NSIG_DTB_RHOHV2: ifield = RH_INDEX; f = RH_F; invf = RH_INVF; break; case NSIG_DTB_SQI: case NSIG_DTB_SQI2: ifield = SQ_INDEX; f = SQ_F; invf = SQ_INVF; break; case NSIG_DTB_HCLASS: case NSIG_DTB_HCLASS2: ifield = HC_INDEX; f = HC_F; invf = HC_INVF; case NSIG_DTB_DBZ2: ifield = CZ_INDEX; f = CZ_F; invf = CZ_INVF; case NSIG_DTB_ZDRC2: ifield = ZD_INDEX; f = ZD_F; invf = ZD_INVF; break; default: fprintf(stderr,"Unknown field type: %d Skipping it.\n", data_type); continue; } if (radar_verbose_flag) fprintf(stderr, " nsig_sweep[%d], data_type = %d, rays(expected) = %d, nrays(actual) = %d\n", itype, data_type, num_rays, NSIG_I2(nsig_sweep[itype]->idh.num_rays_act)); if (data_type != NSIG_DTB_EXH) { if ((radar->v[ifield] == NULL)) { if (rsl_qfield[ifield]) { radar->v[ifield] = RSL_new_volume(numsweep); radar->v[ifield]->h.f = f; radar->v[ifield]->h.invf = invf; } else { /* Skip this field, because, the user does not want it. */ continue; } } if (radar->v[ifield]->sweep[i] == NULL) radar->v[ifield]->sweep[i] = RSL_new_sweep(num_rays); } else continue; /* Skip the actual extended header processing. * This is different than getting it, so that * the information is available for the other * fields when filling the RSL ray headers. */ /** DATA conversion time **/ sweep = radar->v[ifield]->sweep[i]; sweep->h.f = f; sweep->h.invf = invf; sweep->h.sweep_num = i; sweep->h.beam_width = beam_width; sweep->h.vert_half_bw = vert_half_bw; sweep->h.horz_half_bw = horz_half_bw; fix_angle = nsig_from_bang(nsig_sweep[itype]->idh.fix_ang); if (radar->h.scan_mode == PPI) sweep->h.elev = fix_angle; else sweep->h.azimuth = fix_angle; for(j = 0; j < num_rays; j++) { ray_p = nsig_sweep[itype]->ray[j]; if (ray_p == NULL) continue; bin_num = NSIG_I2(ray_p->h.num_bins); /* Load extended header information, if available. * We need to pass the entire nsig_sweep and search for * the extended header field (it may not be data_type==0). */ get_extended_header_info(nsig_sweep, xh_size, j, nparams, &msec, &azm, &elev, &pitch, &roll, &heading, &azm_rate, &elev_rate, &pitch_rate, &roll_rate, &heading_rate, &lat, &lon, &alt, &rvc, &vel_east, &vel_north, &vel_up); if (radar->v[ifield]->sweep[i]->ray[j] == NULL) radar->v[ifield]->sweep[i]->ray[j] = RSL_new_ray(bin_num); ray = radar->v[ifield]->sweep[i]->ray[j]; ray->h.f = f; ray->h.invf = invf; /** Ray is at nsig_sweep[itype].ray->... **/ /** Loading nsig data into data structure **/ ray->h.month = sweep_month; ray->h.day = sweep_day; ray->h.year = sweep_year; /* Year 2000 compliant. */ ray->h.hour = sweep_hour; ray->h.minute = sweep_minute; if (msec == 0) { /* No extended header */ ray->h.sec = NSIG_I2(ray_p->h.sec) + sweep_second; elev = sweep->h.elev; } else ray->h.sec = sweep_second + msec/1000.0; /* add time ... handles end of min,hour,month,year and century. */ if (ray->h.sec >= 60) /* Should I fix the time no matter what? */ RSL_fix_time(ray); /* Repair second overflow. */ ray->h.ray_num = j; ray->h.elev_num = i; ray->h.range_bin1 = (int)rng_first_bin; ray->h.gate_size = (int)(bin_space+.5); /* Nearest int */ ray->h.vel_res = bin_space; ray->h.sweep_rate = sweep_rate; ray->h.prf = (int)prf; if (prf != 0) ray->h.unam_rng = 299793000.0 / (2.0 * prf * 1000.0); /* km */ else ray->h.unam_rng = 0.0; ray->h.prf2 = (int) prf2; ray->h.fix_angle = fix_angle; ray->h.azim_rate = azim_rate; ray->h.pulse_count = num_samples; ray->h.pulse_width = pw; ray->h.beam_width = beam_width; ray->h.frequency = freq / 1000.0; /* GHz */ ray->h.wavelength = wave/100.0; /* meters */ ray->h.nyq_vel = max_vel; /* m/s */ if (elev == 0.) elev = sweep->h.elev; ray->h.elev = (nsig_from_bang(ray_p->h.end_elev)+nsig_from_bang(ray_p->h.beg_elev))/2.0; /* Compute mean azimuth angle for ray. */ az1 = nsig_from_bang(ray_p->h.beg_azm); az2 = nsig_from_bang(ray_p->h.end_azm); /* printf("az1, %f, az2 %f\n", az1, az2); */ if(az1 > az2) if((az1 - az2) > 180.0) az2 += 360.0; else ; else if((az2 - az1) > 180.0) az1 += 360.0; az1 = (az1 + az2) / 2.0; if (az1 > 360) az1 -= 360; ray->h.azimuth = az1; /* From the extended header information, we learn the following. */ ray->h.pitch = pitch; ray->h.roll = roll; ray->h.heading = heading; ray->h.pitch_rate = pitch_rate; ray->h.roll_rate = roll_rate; ray->h.heading_rate = heading_rate; ray->h.lat = lat; ray->h.lon = lon; ray->h.alt = alt; ray->h.rvc = rvc; ray->h.vel_east = vel_east; ray->h.vel_north = vel_north; ray->h.vel_up = vel_up; /* printf("Processing sweep[%d]->ray[%d]: %d %f %f %f %f %f %f %f %f %d nbins=%d, bin1=%d gate=%d\n", i, j, msec, ray->h.sec, ray->h.azimuth, ray->h.elev, ray->h.pitch, ray->h.roll, ray->h.heading, ray->h.lat, ray->h.lon, ray->h.alt, ray->h.nbins, ray->h.range_bin1, ray->h.gate_size); */ /* TODO: ingest data header contains a value for bits-per-bin. * This might be of use to allocate an array for ray->range with * either 1-byte or 2-byte elements. Then there's no need for * memmove() whenever we need 2 bytes. */ if (data_type == NSIG_DTB_EXH) continue; ray_data = 0; for(k = 0; k < bin_num; k++) { switch(data_type) { case NSIG_DTB_UCR: case NSIG_DTB_CR: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else ray_data = (float)((ray_p->range[k]-64.0)/2.0); break; /* Simplified the velocity conversion for NSIG_DTB_VEL, using * formula from IRIS Programmer's Manual. BLK, Oct 9 2009. */ case NSIG_DTB_VEL: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else ray_data = (float)((ray_p->range[k]-128.0)/127.0)*max_vel; break; case NSIG_DTB_WID: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else ray_data =(float)((ray_p->range[k])/256.0)*max_vel; break; case NSIG_DTB_ZDR: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else ray_data = (float)((ray_p->range[k]-128.0)/16.0); break; case NSIG_DTB_KDP: if (ray_p->range[k] == 0 || ray_p->range[k] == 255 || rsl_kdp_wavelen == 0.0) { ray_data = NSIG_NO_ECHO; break; } if (ray_p->range[k] < 128) ray_data = (-0.25 * pow((double)600.0,(double)((127-ray_p->range[k])/126.0))) / rsl_kdp_wavelen; else if (ray_p->range[k] > 128) ray_data = (0.25 * pow((double)600.0,(double)((ray_p->range[k]-129)/126.0))) / rsl_kdp_wavelen; else ray_data = 0.0; break; case NSIG_DTB_PHIDP: if (ray_p->range[k] == 0 || ray_p->range[k] == 255) ray_data = NSIG_NO_ECHO; else ray_data = 180.0*((ray_p->range[k]-1.0)/254.0); break; case NSIG_DTB_RHOHV: if (ray_p->range[k] == 0 || ray_p->range[k] == 255) ray_data = NSIG_NO_ECHO; else ray_data = sqrt((double)((ray_p->range[k]-1.0)/253.0)); break; case NSIG_DTB_HCLASS: if (ray_p->range[k] == 0 || ray_p->range[k] == 255) ray_data = NSIG_NO_ECHO; else ray_data = ray_p->range[k]; break; case NSIG_DTB_SQI: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else ray_data = (float)sqrt((ray_p->range[k]-1.0)/253.0); break; case NSIG_DTB_VELC: if (ray_p->range[k] == 0) ray_data = NSIG_NO_ECHO; else { incr=75./127.; /* (+|- 75m/s) / 254 values */ ray_data = (float)(ray_p->range[k]-128)*incr; } break; case NSIG_DTB_UCR2: case NSIG_DTB_CR2: case NSIG_DTB_VEL2: case NSIG_DTB_VELC2: case NSIG_DTB_ZDR2: case NSIG_DTB_KDP2: memmove(nsig_twob, &ray_p->range[2*k], 2); nsig_2byte = NSIG_I2(nsig_twob); if (nsig_2byte == 0 || nsig_2byte == 65535) ray_data = NSIG_NO_ECHO2; else ray_data = (float)(nsig_2byte-32768)/100.; break; case NSIG_DTB_WID2: memmove(nsig_twob, &ray_p->range[2*k], 2); nsig_2byte = NSIG_I2(nsig_twob); if (nsig_2byte == 0 || nsig_2byte == 65535) ray_data = NSIG_NO_ECHO2; else ray_data = (float)nsig_2byte/100.; break; case NSIG_DTB_PHIDP2: memmove(nsig_twob, &ray_p->range[2*k], 2); nsig_2byte = NSIG_I2(nsig_twob); if (nsig_2byte == 0 || nsig_2byte == 65535) ray_data = NSIG_NO_ECHO; else ray_data = 360.*(nsig_2byte-1)/65534.; break; case NSIG_DTB_SQI2: case NSIG_DTB_RHOHV2: memmove(nsig_twob, &ray_p->range[2*k], 2); nsig_2byte = NSIG_I2(nsig_twob); if (nsig_2byte == 0 || nsig_2byte == 65535) ray_data = NSIG_NO_ECHO2; else ray_data = (float)(nsig_2byte-1)/65533.; break; case NSIG_DTB_HCLASS2: memmove(nsig_twob, &ray_p->range[2*k], 2); nsig_2byte = NSIG_I2(nsig_twob); if (nsig_2byte == 0 || nsig_2byte == 65535) ray_data = NSIG_NO_ECHO2; else ray_data = nsig_2byte; } if (ray_data == NSIG_NO_ECHO || ray_data == NSIG_NO_ECHO2) ray->range[k] = ray->h.invf(BADVAL); else ray->range[k] = ray->h.invf(ray_data); /* if (data_type == NSIG_DTB_KDP) printf("v[%d]->sweep[%d]->ray[%d]->range[%d] = %f, %d, %f\n", ifield, i, j, k, ray->h.f(ray->range[k]), (int)ray_p->range[k], ray_data); */ } } } nsig_free_sweep(nsig_sweep); } /* Do not reset radar->h.nvolumes. It is already set properly. */ if (radar_verbose_flag) fprintf(stderr, "Max index of radar->v[0..%d]\n", radar->h.nvolumes); /** close nsig file **/ nsig_close(fp); radar = RSL_prune_radar(radar); /** return radar pointer **/ return radar; } rsl-v1.43/rainbow_to_radar.c0000644000102200007640000002316711565520526013044 00000000000000/* NASA/TRMM, Code 912 This is the TRMM Office Radar Software Library. Copyright (C) 2004 Bart Kelley George Mason University Fairfax, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "rsl.h" #include "rainbow.h" struct dms { int deg; int minute; int sec; }; struct dms deg_to_dms(float deg) { /* Convert value in degrees to degrees-minutes-seconds. */ int sign, ideg, iminute, sec; float fminute; /* minute with fractional part */ struct dms dms; sign = (deg < 0.) ? -1 : 1; deg = sign * deg; /* absolute value */ ideg = deg; /* truncated degree */ iminute = fminute = (deg - ideg) * 60.; sec = (fminute - iminute) * 60. + .5; dms.deg = sign * ideg; dms.minute = sign * iminute; dms.sec = sign * sec; return dms; } static float (*f)(Range x); static Range (*invf)(float x); /**********************************************************/ /* */ /* RSL_rainbow_to_radar */ /* */ /**********************************************************/ Radar *RSL_rainbow_to_radar(char *infile) { /* This function reads the Rainbow format scan data file and returns a * radar structure. */ Radar *radar; FILE *fp; int c; int nvolumes; Rainbow_hdr rainbow_hdr; struct dms latdms, londms; /* These next lines allow program to read from a regular file, a * compressed file, or standard input. I lifted them from RSL_uf_to_radar * by John Merritt. */ if (infile == NULL) { int save_fd; save_fd = dup(0); fp = fdopen(save_fd, "r"); } else if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return NULL; } fp = uncompress_pipe(fp); /* Transparently gunzip. */ /* Read first character and verify file format. */ if ((c = fgetc(fp)) != SOH) { fprintf(stderr,"%s is not a valid Rainbow format file.\n",infile); return NULL; } /* Read Rainbow file header and check for correct product. */ read_rainbow_header(&rainbow_hdr, fp); if (rainbow_hdr.filetype != SCAN_DATA ) { fprintf(stderr,"ERROR: File is not a scan data file.\n"); fprintf(stderr,"File type number (header label H3) is %d\n", rainbow_hdr.filetype); fprintf(stderr,"See Rainbow File Format Document for details on " "header labels.\n"); return NULL; } if (rainbow_hdr.product != VOLUME_SCAN) { fprintf(stderr,"WARNING: Product is not volume scan as expected.\n"); fprintf(stderr,"Header label N is %d, expected %d\n", rainbow_hdr.product, VOLUME_SCAN); fprintf(stderr,"See Rainbow File Format Document for details on " "header labels.\n"); } if (rainbow_hdr.compressed) { fprintf(stderr,"RSL_rainbow_to_radar: Label F3 indicates data " "compression.\n"); fprintf(stderr,"This routine can not handle compressed data.\n"); fprintf(stderr,"See Rainbow File Format Document for details on " "header labels.\n"); return NULL; } /* Make radar structure and assign header information. */ nvolumes = 1; /* There is only one raw data type in a volume scan file. */ radar = RSL_new_radar(MAX_RADAR_VOLUMES); if (radar == NULL) { perror("RSL_new_radar returned NUL to RSL_rainbow_to_radar"); return NULL; } radar->h.nvolumes = nvolumes; strcpy(radar->h.radar_name, rainbow_hdr.radarname); strcpy(radar->h.radar_type, "rainbow"); radar->h.month = rainbow_hdr.month; radar->h.day = rainbow_hdr.day; radar->h.year = rainbow_hdr.year; radar->h.hour = rainbow_hdr.hour; radar->h.minute = rainbow_hdr.minute; radar->h.sec = (float) rainbow_hdr.sec; latdms = deg_to_dms(rainbow_hdr.lat); londms = deg_to_dms(rainbow_hdr.lon); radar->h.latd = latdms.deg; radar->h.latm = latdms.minute; radar->h.lats = latdms.sec; radar->h.lond = londms.deg; radar->h.lonm = londms.minute; radar->h.lons = londms.sec; /* Read the data portion of the file into the radar structure. */ if (rainbow_data_to_radar(radar, rainbow_hdr, fp) < 1) radar = NULL; return radar; } /**********************************************************/ /* */ /* rainbow_data_to_radar */ /* */ /**********************************************************/ int rainbow_data_to_radar(Radar *radar, Rainbow_hdr rainbow_hdr, FILE *fp) { /* Read Rainbow data into the radar structure. Data in the file is stored * as bytes, where each byte contains the value for one range bin. The * data is ordered as follows: The first byte corresponds to the first bin * of the first ray, followed by the remaining bins of that ray, followed * by the remaining rays of the first sweep. This sequence of bins, rays, * and sweeps continues for the remainder of sweeps in the volume scan. */ int iray, isweep, nread, nsweeps, nrays, nbins, vol_index; unsigned char *rainbow_ray; Volume *v; Sweep *sweep; Ray *ray; int i; float azim_rate, beam_width, dz, elev_angle, prf, unam_rng; beam_width = 1.0; /* for now */ switch (rainbow_hdr.datatype) { /* TODO: Add f and invf for each field */ case 0: vol_index = VR_INDEX; f = VR_F; invf = VR_INVF; break; case 1: vol_index = DZ_INDEX; f = DZ_F; invf = DZ_INVF; break; case 2: vol_index = SW_INDEX; break; case 3: vol_index = ZT_INDEX; break; case 5: vol_index = DR_INDEX; break; } /* TODO: remove the following if-statement once the code for other data * types has been implemented. Currently only handles reflectivity (DZ). */ if (vol_index != DZ_INDEX) { fprintf(stderr, "RSL_rainbow_to_radar: currently only handles " "field type DZ\n"); fprintf(stderr,"Rainbow data type value (label F9) is %d\n", rainbow_hdr.datatype); fprintf(stderr,"Corresponding vol_INDEX number is %d\n", vol_index); return 0; } nsweeps = rainbow_hdr.nsweeps; nrays = (rainbow_hdr.az_stop - rainbow_hdr.az_start + 1) / rainbow_hdr.az_step + .5; nbins = rainbow_hdr.nbins; if (nrays != 360) { fprintf(stderr,"WARNING: number of rays computed is not the number " "expected.\n"); fprintf(stderr,"Computed = nrays: azstart = %d, az_stop = %d, " "az_step = %f\n"); fprintf(stderr,"Expected 360\n"); } radar->v[vol_index] = RSL_new_volume(nsweeps); v = radar->v[vol_index]; v->h.nsweeps = nsweeps; v->h.f = f; v->h.invf = invf; if (vol_index == DZ_INDEX) v->h.type_str = strdup("Reflectivity"); rainbow_ray = (unsigned char *) malloc(nbins); /* Load sweeps. */ for (isweep = 0; isweep < nsweeps; isweep++) { sweep = RSL_new_sweep(nrays); prf = rainbow_hdr.elev_params[isweep]->prf_high; unam_rng = RSL_SPEED_OF_LIGHT / (2. * prf * 1000.); azim_rate = rainbow_hdr.elev_params[isweep]->az_rate; elev_angle = rainbow_hdr.elev_params[isweep]->elev_angle; /* Load rays. */ for (iray = 0; iray < nrays; iray++) { nread = fread(rainbow_ray, 1, nbins, fp); if (nread != nbins) { fprintf(stderr, "ERROR: Could not read enough bytes to fill " "ray.\n"); fprintf(stderr, "Sweep = %d, ray = %d, number read = %d\n", isweep, iray, nread); return 0; } ray = RSL_new_ray(nbins); /* TODO: Add code for other fields. */ if (vol_index == DZ_INDEX) { for (i=0; i < ray->h.nbins; i++) { dz = -31.5 + (rainbow_ray[i] - 1) * 0.5; if (dz < -31.5) ray->range[i] = invf(BADVAL); else ray->range[i] = invf(dz); } } /* Load ray header. Note: the rainbow data file has only one time * stamp, which is the data acquisition time at the start of the * volume scan. For now, that is the time assigned to all rays. */ ray->h.month = rainbow_hdr.month; ray->h.day = rainbow_hdr.day; ray->h.year = rainbow_hdr.year; ray->h.hour = rainbow_hdr.hour; ray->h.minute = rainbow_hdr.minute; ray->h.sec = rainbow_hdr.sec; ray->h.f = f; ray->h.invf = invf; ray->h.unam_rng = unam_rng; ray->h.prf = prf; ray->h.azim_rate = azim_rate; ray->h.elev = elev_angle; ray->h.elev_num = isweep + 1; ray->h.fix_angle = elev_angle; ray->h.azimuth = rainbow_hdr.az_start + iray * rainbow_hdr.az_step; ray->h.ray_num = iray + 1; ray->h.range_bin1 = rainbow_hdr.range_start; ray->h.gate_size = rainbow_hdr.range_step * 1000.; ray->h.beam_width = beam_width; sweep->ray[iray] = ray; } /* iray */ sweep->h.sweep_num = isweep + 1; sweep->h.beam_width = beam_width; sweep->h.vert_half_bw = sweep->h.beam_width * 0.5; sweep->h.horz_half_bw = sweep->h.beam_width * 0.5; sweep->h.nrays = nrays; sweep->h.f = f; sweep->h.invf = invf; v->sweep[isweep] = sweep; } /* isweep */ return 1; } rsl-v1.43/wsr88d.h0000644000102200007640000002061611746614317010673 00000000000000#ifndef _wsr88d #define _wsr88d #include /* Modify the following to point to the file that contains the * nexrad (wsr88d) location information for each radar site. * The directory should be the same as the LIBDIR in the makefile. */ #ifndef WSR88D_SITE_INFO_FILE #define WSR88D_SITE_INFO_FILE "/usr/local/trmm/lib/wsr88d_locations.dat" #endif /*===============================================================*/ typedef struct { char archive2[8]; /* Always ARCHIVE2 */ char site_id[4]; /* 4-leter site ID. e.g. KLMB */ char tape_num[6]; /* NCDC tape number. e.g. N00001 */ char b1; /* Blank. */ char date[9]; /* Date tape written. dd-MMM-yy e.g. 19-FEB-93 */ char b2; /* Blank. */ char time[8]; /* Time tape written. hh:mm:ss. e.g. 10:22:59 */ char b3; /* Blank. */ char data_center[5]; /* Data Center writing tape: RDASC or NCDC. */ char wban_num[5]; /* WBAN number of this NEXRAD site. This is a unique 5-digit number assigned at NCDC. Numbers are contained in the NCDC NEXRAD Station History file. The file also contains the four letter site ID, Latitude, Longitude, Elevation, and common location name. */ char tape_mode[5]; /* Tape output mode. Current values are 8200, 8500, 8500c. */ char volume_num[5]; /* A volume number to be used for copies and extractions of data from tapes. The form would be VOL01, VOL02, VOL03 ... VOLnn. */ char b4[6]; /* Blank. Available for future use. */ char b5[31552]; /* May be used for internal controls or other information at each archive center. Information of value to users will be documented at the time of tape shipment. */ } Wsr88d_tape_header; /* Title record structure for nexrad archive2 data file. The first record of each nexrad data file is a title record */ typedef struct { char filename[9]; char ext[3]; int file_date; /* modified Julian date */ int file_time; /* milliseconds of day since midnight */ char unused1[4]; } nr_archive2_title; /* message packet structure for nexrad radar data */ typedef struct { short ctm[6]; /* not used */ /* halfword 7 : message header information */ short msg_size; /* # halfwords from here to end of record? */ short msg_type; /* Digital Radar Data. This message may contain * a combination of either reflectivity, * aliased velocity, or spectrum width. */ short id_seq; /* I.d. Seq = 0 to 7FFF, then roll over to 0 */ short msg_date; /* modified Julian date from 1/1/70 */ int msg_time; /* packet generation time in ms past midnite */ short num_seg; short seg_num; /* halfword 15 : data header information */ int ray_time; /* collection time for this ray in ms */ short ray_date; /* modified Julian date for this ray */ short unam_rng; /* unambiguous range */ short azm; /* coded azimuth angle */ short ray_num; /* ray no. within elevation scan */ short ray_status;/* ray status flag */ short elev; /* coded elevation angle */ short elev_num; /* elevation no. within volume scan */ /* halfword 24 : gate/bin information*/ short refl_rng; /* range to first gate of refl data */ short dop_rng; /* range to first gate of doppler data */ short refl_size; /* refl data gate size */ short dop_size; /* doppler data gate size */ short num_refl; /* no. of reflectivity gates */ short num_dop; /* no. of doppler gates */ /* halfword 30 */ short sec_num; /* sector no. within cut */ float sys_cal; /* gain calibration constant */ /* halfword 33 : data parameters */ short refl_ptr; /* reflectivity data ptr */ short vel_ptr; /* velocity data ptr */ short spc_ptr; /* spectrum width ptr */ short vel_res; /* Doppler velocity resolution */ short vol_cpat; /* volume coverage pattern */ short unused1[4]; /* halfword 42 : data pointers for Archive II playback */ short ref_ptrp; short vel_ptrp; short spc_ptrp; /* halfword 45 */ short nyq_vel; /* Nyquist velocity */ short atm_att; /* atmospheric attenuation factor */ short min_dif; /* halfwords 48 to 64 */ short unused2[17]; /* halfwords 65 to 1214 */ unsigned char data[2300]; /* last 4 bytes : frame check sequence */ unsigned char fts[4]; } Wsr88d_packet; /* structure for the radar site parameters */ typedef struct radar_site { int number; /* arbitrary number of this radar site */ char name[4]; /* Nexrad site name */ char city[15]; /* nearest city to radaar site */ char state[2]; /* state of radar site */ int latd; /* degrees of latitude of site */ int latm; /* minutes of latitude of site */ int lats; /* seconds of latitude of site */ int lond; /* degrees of longitude of site */ int lonm; /* minutes of longitude of site */ int lons; /* seconds of longitude of site */ int height; /* height of site in meters above sea level*/ int bwidth; /* bandwidth of site (mhz) */ int spulse; /* length of short pulse (ns)*/ int lpulse; /* length of long pulse (ns) */ } Wsr88d_site_info; typedef struct { FILE *fptr; /* this usually points to the gzip pipe */ FILE *orig; /* save the original file pointer for cleanup */ } Wsr88d_file; #define PACKET_SIZE 2432 typedef Wsr88d_packet Wsr88d_ray; /* Same thing, different name. */ #define MAX_RAYS_IN_SWEEP 400 typedef struct { Wsr88d_ray *ray[MAX_RAYS_IN_SWEEP]; /* Expected maximum is around 366. */ } Wsr88d_sweep; typedef union { nr_archive2_title title; Wsr88d_packet p; } Wsr88d_file_header; typedef struct { int dummy; /* Structure not used yet. */ } Wsr88d_header; typedef struct { int dummy; /* Structure not used yet. */ } Wsr88d_ray_header; /* Selected so we can boolean or use them for a data mask. */ #define WSR88D_DZ 0x1 #define WSR88D_VR 0x2 #define WSR88D_SW 0x4 #define WSR88D_BADVAL 0500 /* non-meaningful value (500 octal) */ #define WSR88D_RFVAL (WSR88D_BADVAL-1) /* ival = 0 means below SNR, = 1 means range folded. */ /***********************************************************************/ /* */ /* Function specification. */ /* */ /***********************************************************************/ Wsr88d_file *wsr88d_open(char *filename); int wsr88d_perror(char *message); int wsr88d_close(Wsr88d_file *wf); int wsr88d_read_file_header(Wsr88d_file *wf, Wsr88d_file_header *wsr88d_file_header); int wsr88d_read_tape_header(char *first_file, Wsr88d_tape_header *wsr88d_tape_header); int wsr88d_read_sweep(Wsr88d_file *wf, Wsr88d_sweep *wsr88d_sweep); int wsr88d_read_ray(Wsr88d_file *wf, Wsr88d_ray *wsr88d_ray); int wsr88d_read_ray_header(Wsr88d_file *wf, Wsr88d_ray_header *wsr88d_ray_header); int wsr88d_ray_to_float(Wsr88d_ray *ray, int THE_DATA_WANTED, float v[], int *n); float wsr88d_get_nyquist(Wsr88d_ray *ray); float wsr88d_get_atmos_atten_factor(Wsr88d_ray *ray); float wsr88d_get_velocity_resolution(Wsr88d_ray *ray); int wsr88d_get_volume_coverage(Wsr88d_ray *ray); float wsr88d_get_elevation_angle(Wsr88d_ray *ray); float wsr88d_get_azimuth(Wsr88d_ray *ray); float wsr88d_get_range(Wsr88d_ray *ray); void wsr88d_get_date(Wsr88d_ray *ray, int *mm, int *dd, int *yy); void wsr88d_get_time(Wsr88d_ray *ray, int *hh, int *mm, int *ss, float *fsec); Wsr88d_site_info *wsr88d_get_site(char *in_sitenm); /* Courtesy of Dan Austin. */ int *wsr88d_get_vcp_info(int vcp_num,int el_num); /* Courtesy of Dan Austin. */ float wsr88d_get_fix_angle(Wsr88d_ray *ray); int wsr88d_get_pulse_count(Wsr88d_ray *ray); float wsr88d_get_azimuth_rate(Wsr88d_ray *ray); float wsr88d_get_pulse_width(Wsr88d_ray *ray); float wsr88d_get_prf(Wsr88d_ray *ray); float wsr88d_get_prt(Wsr88d_ray *ray); float wsr88d_get_wavelength(Wsr88d_ray *ray); float wsr88d_get_frequency(Wsr88d_ray *ray); void wsr88d_keep_hi_prf_dz(); void wsr88d_no_hi_prf_dz(); int no_command (char *cmd); FILE *uncompress_pipe (FILE *fp); FILE *compress_pipe (FILE *fp); int rsl_pclose(FILE *fp); #endif rsl-v1.43/Copyright0000644000102200007640000000165606701166364011260 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996-1999 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ rsl-v1.43/reverse.c0000644000102200007640000000335706600002402011160 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "rsl.h" /*********************************************************************/ /* */ /* RSL_reverse_sweep_order */ /* */ /*********************************************************************/ Volume *RSL_reverse_sweep_order(Volume *v) { /* * Reverse the order of the sweeps within the volume. * This routine modifies the argument and does not allocate memory. */ int i, j; Sweep *s_tmp; if (v == NULL) return v; /* Yes, the follwing is integer divide by 2. */ for (i=0, j=v->h.nsweeps-1; ih.nsweeps/2; i++, j--) { s_tmp = v->sweep[i]; v->sweep[i] = v->sweep[j]; v->sweep[j] = s_tmp; } return v; } rsl-v1.43/aclocal.m40000644000102200007640000100072211747610601011211 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. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 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., 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # 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` ]) # 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])]) # Copyright (C) 1998, 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 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # 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 rsl-v1.43/GPL0000644000102200007640000004307606600002377007723 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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 Appendix: 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) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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. rsl-v1.43/lassen.h0000644000102200007640000002576206600002400011001 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996 John H. Merritt of Applied Research Corporation, Landover, Maryland, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _lassen_h_ #define _lassen_h_ typedef struct { short degree; /* Geographic position: lat or lon */ short minute; /* + above equator, - below, */ short second; /* - Western hemi, + Eastern hemi. */ short spare; } Lassen_radar_position; typedef struct { char radar_name[8]; /* Radar name. */ char site_name[8]; /* Site name. */ unsigned short antenna_height;/* In meters above sea level. */ unsigned short spare; Lassen_radar_position latitude; /* Latitude or radar */ Lassen_radar_position longitude; /* Longitude of radar.*/ } Lassen_radar_info; /* This is for Lassen files version 1.3 (coded as 13) and * files version 1.4 (coded 14) */ /* The maximum number of offsets is 10. The LASSEN file will * have written data (space) for all 10 fields even when there is no field. */ #define NUMOFFSETS 10 #define OFF_UZ 0 #define OFF_CZ 1 #define OFF_VEL 2 #define OFF_WID 3 #define OFF_ZDR 4 #define OFF_PHI 5 #define OFF_RHO 6 #define OFF_LDR 7 #define OFF_KDP 8 #define OFF_TIME 9 /* This is absolute and cannot be changed. The LASSEN file is * written with this number specified. It is used during the * XDR decode process. */ #define LASSEN_MAX_SWEEPS 30 /* Sweep types (modes) are: * POINT = 0 * PPI = 1 * RHI = 2 * SECTOR= 3 * * STOP = 7 - Flag the end of the scan mode. */ /* * The Lassen_ray: * * The Lassen_sweep contains 360 pointers to Lassen_rays. * Each Lassen_ray is dynamically allocated and the pointer inserted * into the Lassen_sweep. The 'offsets' array contains indexes to * the field type. When an index value is 0, then there is no data * available for that field type. The order hard-coded and matches * the order given by OFF_* variables in the #define above. Checking * for a non-zero index value seems to be the most reliable method * to determine the existance of a field type. Using 'flags' is * problematic when there is no field of that type (ie. you get a * false positive). * * Use the 'offset' array to jump to the field type. * */ typedef struct { unsigned short vangle; /* Azimuth angle. */ unsigned short fanglet; /* Target fixed angle. */ unsigned short fanglea; /* Actual fixed angle. */ unsigned short a_start; /* Azimuth angle start. */ unsigned short a_stop; /* Azimuth angle stop. */ unsigned short status; /* Hardware status word. */ unsigned char max_height;/* Maximum height, km. */ unsigned char volume; /* Volume serial number. */ unsigned char sweep; /* Sweep number 1..LASSEN_MAX_SWEEPS */ unsigned char sweep_type;/* Sweep type. */ unsigned short gatewid; /* Gate width, meters. */ unsigned short rangeg1; /* Range to gate 1, meters. */ unsigned short numgates; /* Number of gates. */ unsigned short prf; /* Primary prf, hz. */ unsigned short prflow; /* Secondary prf, hz. */ unsigned short n_pulses; /* Sample size in pulses. */ unsigned char p_width; /* Pulse width, .05 us units.*/ unsigned char cfilter; /* Clutter filter code. */ unsigned char spare[2]; /* * Like I said before, don't trust these values. Trust * the 'offset' instead -- offset in the ray. */ /* flags is 'short' -- I hope it never becomes 'long' */ struct { unsigned int packed : 1; /* Is the data packed? */ unsigned int good_data : 1; /* Is the data good? */ unsigned int uz : 1; /* UZ present. */ unsigned int cz : 1; /* CZ present. */ unsigned int vel : 1; /* VEL present. */ unsigned int wid : 1; /* WID present. */ unsigned int zdr : 1; /* ZDR present. */ unsigned int phi : 1; /* PHI present. */ unsigned int rho : 1; /* RHO present. */ unsigned int ldr : 1; /* LDR present. */ unsigned int kdp : 1; /* KDP present. */ unsigned int time : 1; /* TIME series present. */ unsigned int spares : 4; } flags; /* * Here is where you get to the data for a field type. * If offset[OFF_CZ] is non-zero, for instance, then * CZ exists and is located that many bytes into * the data array. The data array is in the ray pointer * which is in the Lassen_sweep. */ unsigned short offset[NUMOFFSETS]; unsigned char year; /* year-1900 */ unsigned char month; /* month 1-12 */ unsigned char day; /* day 1-31 */ unsigned char hour; /* hour 0-23 */ unsigned char minute; /* minute 0-59 */ unsigned char second; /* second 0-59 */ unsigned char spare2[2]; } Lassen_ray; /* * The Lassen_sweep: * * This structure contains information for an entire sweep for a possible * 360 rays. These will be pointers to Lassen_ray. * The Lassen_volume may have up to 30 pointers to Lassen_sweep. * The '30' is mandatory and not adjustable because of how the LASSEN * file is written. The LASSEN file writes 30 angles, gates, and * 300 offset values (30*NUMOFFSETS). LASSEN_MAX_SWEEPS = 30. * The number of rays in a Lassen_sweep is 'numrays'. * * The 'offset' is copied from the one in Lassen_ray. */ typedef struct { unsigned short volume; /* Volume serial number. */ unsigned short sweep; /* Sweep index. */ unsigned short sweep_type; /* Sweep type code. */ unsigned short max_height; /* Maximum height, km. */ unsigned short fangle; /* Fixed, azimuth angle. */ unsigned short min_var; /* 'leftmost' variable angle. */ unsigned short max_var; /* 'rightmost' variable angle. */ unsigned short a_start; /* Azimuth angle start. */ unsigned short a_stop; /* Azimuth angle stop. */ unsigned short gatewid; /* Gate width, meters. */ unsigned short rangeg1; /* Range to gate 1, meters. */ unsigned short numgates; /* Number of gates. */ unsigned short numrays; /* Number of rays this sweep. */ unsigned short prf; /* Primary prf, hz. */ unsigned short prflow; /* Secondary prf, hz. */ unsigned short n_pulses;/* Sample size in pulses. */ unsigned short p_width; /* Pulse width, .05 us units. */ unsigned short cfilter; /* Clutter filter code. */ unsigned short offset[NUMOFFSETS]; unsigned char year; /* Year - 1900. */ unsigned char month; /* Month 1-12 */ unsigned char day; /* Day 1-31 */ unsigned char shour; /* Start hour 0-23 */ unsigned char sminute; /* Start minute 0-59 */ unsigned char ssecond; /* Start second 0-59 */ unsigned char ehour; /* End hour 0-23 */ unsigned char eminute; /* End minute 0-59 */ unsigned char esecond; /* End second 0-59 */ unsigned char spare1[3]; unsigned short status; /* Status word. */ unsigned short spare2; Lassen_ray *ray[360]; /* The Lassen_ray pointers. */ } Lassen_sweep; /* * Lassen_volume: * * A volume can contain a maximum of LASSEN_MAX_SWEEPS sweeps. * The value for LASSEN_MAX_SWEEPS *MUST* be 30. This cannot change, * otherwise, you'll not be able to read the file. * The number of sweeps is in the member 'numsweeps'. * */ typedef struct { unsigned short version; /* Raw version number. */ short filled; /* <0=empty 0=filling >0=full. */ unsigned int volume; /* Volume serial number. */ unsigned short sweep; /* Sweep index 1 -> max. */ unsigned short sweep_type; /* Sweep type code. */ unsigned short max_height; /* Maximum height, km. */ unsigned short status; /* Status word. */ unsigned short min_fangle; /* Minimum fixed angle. */ unsigned short max_fangle; /* Maximum fixed angle. */ unsigned short min_var; /* Minimum variable angle. */ unsigned short max_var; /* Maximum variable angle. */ unsigned short a_start; /* Variable angle start. */ unsigned short a_stop; /* Variable angle stop. */ unsigned short numsweeps; /* Number of sweeps in volume. */ unsigned short fangles[LASSEN_MAX_SWEEPS]; /* Fixed angles for each sweep. */ unsigned short gatewid; /* Gate width, meters. */ unsigned short rangeg1; /* Range to gate 1, meters. */ unsigned short numgates[LASSEN_MAX_SWEEPS]; /* Gates for each sweep. */ unsigned short maxgates; /* Max # of gates in volume. */ unsigned short prf; /* Primary prf, hz. */ unsigned short prflow; /* Secondary prf, hz. */ unsigned short n_pulses; /* Sample size in pulses. */ unsigned short p_width; /* Pulse width, .05 us units. */ unsigned short cfilter; /* Clutter filter code. */ unsigned short local; /* Used as volume lock: nonzero. */ unsigned int freq; /* Mhz * 10 */ unsigned short offset[LASSEN_MAX_SWEEPS][NUMOFFSETS]; unsigned char year; /* Year - 1900 */ unsigned char month; /* Month 1-12 */ unsigned char day; /* Day 1-31 */ unsigned char shour; /* Start hour 0-23 */ unsigned char sminute; /* Start minute 0-59 */ unsigned char ssecond; /* Start second 0-59 */ unsigned char ehour; /* End hour 0-23 */ unsigned char eminute; /* End minute 0-59 */ unsigned char esecond; /* End second 0-59 */ unsigned char spare[3]; struct { /* Software status flags. Length of volflags is 'short' */ unsigned int compress : 1; unsigned int spares : 15; } volflags; Lassen_radar_info radinfo; /* Radar information. */ Lassen_sweep *index[LASSEN_MAX_SWEEPS]; /* The Lassen_sweep pointers. */ } Lassen_volume; typedef struct { unsigned char year; /* year - 1900 */ unsigned char month; /* 1-12 */ unsigned char day; /* 1-31 */ unsigned char hour; /* 0-23 */ unsigned char minute; /* 0-59 */ unsigned char second; /* 0-59 */ unsigned char dummy[2]; } Lassen_time; typedef struct { char magic[8]; /* Magic number. This must be 'SUNRISE'. */ Lassen_time mdate; /* Last modification. */ Lassen_time cdate; /* Creation date. */ int type; /* See #defines above.*/ char mwho[16]; /* Last person to modify. */ char cwho[16]; /* Person who created file. */ int protection; /* Is file protected? */ int checksum; /* Data bcc. */ char description[40]; /* File description. */ int id; int spare[12]; } Lassen_head; #define ANGLE_CONVERT(X) ((unsigned short) ((((unsigned int)X+22)*360) >> 14)) #endif rsl-v1.43/gzip.c0000644000102200007640000000544611576174725010511 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #define _USE_BSD #include #include #include #include /* Prototype definitions within this file. */ int no_command (char *cmd); FILE *uncompress_pipe (FILE *fp); FILE *compress_pipe (FILE *fp); /* Avoids the 'Broken pipe' message by reading the rest of the stream. */ void rsl_readflush(FILE *fp) { if (fork() == 0) { /* Child */ char buf[1024]; while(fread(buf, sizeof(char), sizeof(buf), fp)) continue; exit(0); } } int rsl_pclose(FILE *fp) { int rc; if ((rc=pclose(fp)) == EOF) { perror ("pclose"); /* This or fclose do the job. */ if ((rc=fclose(fp)) == EOF) perror ("fclose"); /* This or fclose do the job. */ } return rc; } int no_command (char *cmd) { int rc; /* Return 0 if there is the command 'cmd' on the system. */ /* Return !0 otherwise. */ rc = system(cmd); if (rc == 0) return rc; else return !0; } FILE *uncompress_pipe (FILE *fp) { /* Pass the file pointed to by 'fp' through the gzip pipe. */ FILE *fpipe; int save_fd; if (no_command("gzip --version > /dev/null 2>&1")) return fp; save_fd = dup(0); close(0); /* Redirect stdin for gzip. */ dup(fileno(fp)); fpipe = popen("gzip -q -d -f --stdout", "r"); if (fpipe == NULL) perror("uncompress_pipe"); close(0); dup(save_fd); close(save_fd); return fpipe; } FILE *compress_pipe (FILE *fp) { /* Pass the file pointed to by 'fp' through the gzip pipe. */ FILE *fpipe; int save_fd; if (no_command("gzip --version > /dev/null 2>&1")) return fp; fflush(NULL); /* Flush all buffered output before opening this pipe. */ save_fd = dup(1); close(1); /* Redirect stdout for gzip. */ dup(fileno(fp)); fpipe = popen("gzip -q -1 -c", "w"); if (fpipe == NULL) perror("compress_pipe"); close(1); dup(save_fd); return fpipe; } rsl-v1.43/get_win.c0000644000102200007640000001245307634131155011156 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996 Thuy Nguyen of International Database Systems a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "rsl.h" extern int radar_verbose_flag; /*************************************************************************** * RSL_get_window_from_radar * RSL_get_window_from_volume * RSL_get_window_from_sweep * RSL_get_window_from_ray * * These routines get window (area) defined by minimum range, maximum range, * low azimuth, and hi azimuth. * * By: Thuy Nguyen * International Database Systems * y***************************************************************************/ Radar *RSL_get_window_from_radar(Radar *r, float min_range, float max_range, float low_azim, float hi_azim) { int i; Radar *new_radar; if (min_range > max_range || min_range < 0 || max_range < 0){ if (radar_verbose_flag) fprintf(stderr,"Get win from radar: given invalid min range (%f) or max range (%f)\n", min_range, max_range); return NULL; } if (!r) return NULL; if ((new_radar = RSL_new_radar(r->h.nvolumes)) == NULL) return NULL; new_radar->h = r->h; for (i = 0; i < r->h.nvolumes; i++) { if (radar_verbose_flag) fprintf(stderr,"Getting window from volume for v[%d] out of %d volumes\n", i,r->h.nvolumes ); new_radar->v[i] = RSL_get_window_from_volume(r->v[i], min_range, max_range, low_azim, hi_azim); } return new_radar; } Volume *RSL_get_window_from_volume(Volume *v, float min_range, float max_range, float low_azim, float hi_azim) { int i; Volume *new_volume; Sweep *new_sweep; if (min_range > max_range || min_range < 0 || max_range < 0){ if (radar_verbose_flag) fprintf(stderr,"Get win from volume: given invalid min range (%f) or max range (%f)\n", min_range, max_range); return NULL; } if (!v) return NULL; if ((new_volume = RSL_new_volume(v->h.nsweeps)) == NULL) return NULL; new_volume->h = v->h; for (i = 0; i < v->h.nsweeps; i++) { if (radar_verbose_flag) fprintf(stderr,"Getting window from sweep for s[%d] out of %d sweeps\n", i,v->h.nsweeps); new_sweep = RSL_get_window_from_sweep(v->sweep[i], min_range, max_range, low_azim, hi_azim); new_volume->sweep[i] = new_sweep; } if (radar_verbose_flag) fprintf(stderr,"Got win from volume: orig volume has %d sweeps, new " "volume has %d sweeps\n",v->h.nsweeps,new_volume->h.nsweeps); return new_volume; } Sweep *RSL_get_window_from_sweep(Sweep *s, float min_range, float max_range, float low_azim, float hi_azim) { int i; Sweep *new_sweep; Ray *new_ray; if (min_range > max_range || min_range < 0 || max_range < 0){ if (radar_verbose_flag) fprintf(stderr,"Get win from sweep: given invalid min range (%f) or max range (%f)\n", min_range, max_range); return NULL; } if (s == NULL) return NULL; if ((new_sweep = RSL_new_sweep(s->h.nrays)) == NULL) return NULL; new_sweep->h = s->h; for (i = 0; i < s->h.nrays; i++) { new_ray = RSL_get_window_from_ray(s->ray[i], min_range, max_range, low_azim, hi_azim); new_sweep->ray[i] = new_ray; } if (radar_verbose_flag) fprintf(stderr,"Got win from sweep: orig sweep has %d rays, new sweep " "has %d rays.\n",s->h.nrays,new_sweep->h.nrays); return new_sweep; } Ray *RSL_get_window_from_ray(Ray *r, float min_range, float max_range, float low_azim, float hi_azim) { float start_km, binsize; int start_index, end_index; Ray *new_ray; int i; if (min_range > max_range || min_range < 0 || max_range < 0){ if (radar_verbose_flag) fprintf(stderr,"Get win from ray: given invalid min range (%f) or max range (%f)\n", min_range, max_range); return NULL; } if (r == NULL || r->h.azimuth < low_azim || r->h.azimuth >= hi_azim) return NULL; /* convert from meter to km */ start_km = r->h.range_bin1/1000.0; binsize = r->h.gate_size/1000.0; end_index = (int) ( (max_range - start_km) / binsize) + 1; if (end_index > r->h.nbins) end_index = r->h.nbins; if (min_range == 0.0) start_index = 0; else start_index = (int) ( (min_range - start_km) / binsize); if ((new_ray = RSL_copy_ray(r)) == NULL) return NULL; if ((new_ray = RSL_clear_ray(new_ray)) == NULL) return NULL; for (i = start_index; i < end_index; i++) { new_ray->range[i] = r->range[i]; } return new_ray; } rsl-v1.43/toolkit_1BC-51_appl.h0000644000102200007640000000665607634130402013102 00000000000000/* Parameter definitions for 1B-51 and 1C-51 HDF file handling applications using the TSDIS toolkit. Mike Kolander */ #define SCALE_FACTOR 100.0 /* Most data values placed into HDF file are scaled by this factor. */ #define X 200.0 /* Used to create 1C-51 reflectivity values: 1C-51_val = dBz_val - X * MaskValue, where MaskValue = 0 or 1 . */ /* For missing HDF header values. From TSDIS specs. */ #define NOVAL_INT16 -9999 #define NOVAL_INT32 -9999 #define NOVAL_FLOAT -9999.9 /* HDF cell value flags. */ #define NO_VALUE -32767 /* No value recorded in bin by radar site. */ #define RNG_AMBIG_VALUE -32766 /* Range-ambiguous flag */ #define NOECHO_VALUE -32765 /* Value too low for SNR */ #define AP_VALUE -32764 /* Anomalous propagation flag */ #define MAX_RANGE_1B51 230.0 /* Max range (km) for 1B-51. */ #define MAX_RANGE_1C51 200.0 /* Max range (km) for 1C-51. */ #define TK_MAX_FILENAME 256 /* 256 bytes for filename storage. */ /* ----------- Function return codes -------------- See RSL files: radar_to_hdf_1.c, radar_to_hdf_2.c, hdf_to_radar.c See application files: level_1.c, hdf_to_uf.c */ #define OK 0 /* Nominal termination with product produced. */ #define ABORT -1 /* PANIC exit -> No product produced. */ #define INTER -2 /* Abort execution. Received signal INT, KILL, or STOP */ #define QUIT -3 /* Anomalous_condition exit -> No product produced. */ #define SHUTDOWN -4 /* Shut down all processing, including scripts. */ /* TSDIS toolkit parameter definitions. */ #include "IO_GV.h" /* VOS dimensions w.r.t toolkit. The toolkit L1 structure is logically organized as a sequence of physical sweeps. */ typedef struct { int nparm; /* No. of toolkit parameters (ie, volumes) for this VOS. */ int nsweep; int nray[MAX_SWEEP]; int ncell[MAX_SWEEP][MAX_PARM]; /* ncell[tk_sindex][pindex] */ } tkVosSize; /* VOS dimensions w.r.t RSL. RSL is logically organized as a sequence of "volumes".*/ typedef struct { int maxNsweep; int maxNray; /* Max(nray[sweep0] ... nray[nsweep-1]) */ int nsweep[MAX_PARM]; int nray[MAX_PARM][MAX_SWEEP]; int ncell[MAX_PARM][MAX_SWEEP]; /* Arrays of pointers mapping toolkit objects back to the corresponding rsl objects. */ Volume *v[MAX_PARM]; /* Maps each tk volume to a rsl volume. */ Sweep *sweep[MAX_SWEEP]; /* Maps each tk sweep to a rsl sweep. */ } rslVosSize; typedef struct { int vos_num; /* 0...MAX_VOS-1 : Position no. of this VOS in HDF file. */ rslVosSize rsl; /* Dimensions of rsl radar structure. */ tkVosSize tk; /* Dimensions of toolkit structure. */ } VosSize; #define NUMBER_QC_PARAMS 10 enum QC_parameters { HTHRESH1, HTHRESH2, HTHRESH3, ZTHRESH0, ZTHRESH1, ZTHRESH2, ZTHRESH3, HFREEZE, DBZNOISE, ZCAL }; /*************************************************************/ /* */ /* Function Prototypes */ /* */ /*************************************************************/ /* Toolkit memory management functions in file: toolkit_memory_mgt.c */ void TKfreeGVL1(L1B_1C_GV *gvl1); int8 ***TKnewParmData1byte(int nsweep, int nray, int ncell); int16 ***TKnewParmData2byte(int nsweep, int nray, int ncell); PARAMETER *TKnewGVL1parm(void); L1B_1C_GV *TKnewGVL1(void); rsl-v1.43/ylwrap0000755000102200007640000000631207022643702010614 00000000000000#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. # Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # Usage: # ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]... # * PROGRAM is program to run. # * INPUT is the input file # * OUTPUT is file PROG generates # * DESIRED is file we actually want # * ARGS are passed to PROG # Any number of OUTPUT,DESIRED pairs may be used. # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in /* | [A-Za-z]:\\*) ;; */*) prog="`pwd`/$prog" ;; esac # The input. input="$1" shift case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. Why? Because otherwise any # debugging info in the generated file will point to the wrong # place. This is really gross. input="`pwd`/$input" ;; esac # We don't want to use the absolute path if the input in the current # directory like when making a tar ball. input_base=`echo $input | sed -e 's|.*/||'` if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then input=$input_base fi pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Make a symbolic link, hard link or hardcopy. ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" . ;; esac $prog ${1+"$@"} "$input" status=$? if test $status -eq 0; then set X $pairlist shift first=yes while test "$#" -ne 0; do if test -f "$1"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in /* | [A-Za-z]:\\*) target="$2";; *) target="../$2";; esac mv "$1" "$target" || status=$? else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then status=1 fi fi shift shift first=no done else status=$? fi # Remove the directory. cd .. rm -rf $dirname exit $status rsl-v1.43/rapic_routines.h0000644000102200007640000000666507025112116012553 00000000000000#include "rsl.h" typedef struct { char *s; int len; } Charlen; typedef struct { int country; /* 000 */ char namestr[20]; /* Berrima */ int station_id_no; /* 63 */ float lat; /* 12.457 */ float lon; /* 130.925 */ float height; /* 40 (meters) */ int datno; /* 02798 (jjjyy) */ float hhmm; /* 05.00 */ char yyyymoddhhmmss[20]; /* 1998012705001 */ float versionNumber; /* 10.01 */ int freq; /* 5645 */ int prf; /* 740 */ float pulselen; /* 0.9 */ int range_resolution; /* 500 (meters) */ float anglerate; /* 15.0 */ char clearair[4]; /* "ON" or "OFF" */ float angle_resolution; /* 1.0 (degrees) */ int video_resolution; /* 256 */ int start_range; /* 1000 (meters) */ int end_range; /* 256000 (meters) */ char product_type[10]; /* VOLUMETRIC */ int scannum; /* Scan n of m */ int ofscans; /* m */ char imgfmt[20]; /* PPI, RHI, etc. */ float elev; /* 0.5 (degrees) */ char video[20]; /* Vel, Wid, ... */ float vellvl; /* 9.8 */ float nyquist; /* 9.8 */ float ratio1, ratio2; /* x:y, None */ int nbins; /* Number of values in Rapic_range vector. */ } Rapic_sweep_header; typedef struct { float x; /* Dummy. */ } Rapic_range; typedef struct { Rapic_sweep_header h; Rapic_range *r; } Rapic_sweep; void binprint(char *s, int n); void rapic_decode(unsigned char *inbuf, int inbytes, unsigned char *outbuf, int *outbytes, float *azim, float *elev, int *delta_time); void rapic_fix_time (Ray *ray); void rapic_load_ray_header(Rapic_sweep_header rh, int iray, int isweep, float elev, float azim, Ray_header *h); void rapic_load_ray_data(unsigned char *buf, int bufsize, int ifield, Ray *ray); Radar *fill_header(Radar *radar); /* I want to have the rapic prefix in the yacc parser. * This hack is required. * I got this list from automake.html. */ /* #define yymaxdepth rapicmaxdepth #define yyparse rapicparse #define yylex rapiclex #define yyerror rapicerror #define yylval rapiclval #define yychar rapicchar #define yydebug rapicdebug #define yypact rapicpact #define yyr1 rapicr1 #define yyr2 rapicr2 #define yydef rapicdef #define yychk rapicchk #define yypgo rapicpgo #define yyact rapicact #define yyexca rapicexca #define yyerrflag rapicerrflag #define yynerrs rapicnerrs #define yyps rapicps #define yypv rapicpv #define yys rapics #define yy_yys rapicyys #define yystate rapicstate #define yytmp rapictmp #define yyv rapicv #define yy_yyv rapicyyv #define yyval rapicval #define yylloc rapiclloc #define yyreds rapicreds #define yytoks rapictoks #define yylhs rapiclhs #define yylen rapiclen #define yydefred rapicdefred #define yydgoto rapicdgoto #define yysindex rapicsindex #define yyrindex rapicrindex #define yygindex rapicgindex #define yytable rapictable #define yycheck rapiccheck #define yyin rapicin #define yyout rapicout #define yy_create_buffer rapic_create_buffer #define yy_load_buffer_state rapic_load_buffer_state #define yyrestart rapicrestart #define yy_init_buffer rapic_init_buffer #define yy_switch_to_buffer rapic_switch_to_buffer #define yy_delete_buffer rapic_delete_buffer #define yy_flush_buffer rapic_flush_buffer #define yy_scan_buffer rapic_scan_buffer #define yy_scan_string rapic_scan_string #define yy_scan_bytes rapic_scan_bytes */ rsl-v1.43/africa.h0000644000102200007640000000475706600002377010757 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ typedef struct { unsigned short yearjday, /* Year * 512 + Julian day. */ hour, /* Hour. */ minute_sec, /* Minute * 60 + seconds. */ bcd_start_azim, /* BCD code for start of azimuth. */ bcd_end_azim, /* BCD code for end of azimuth. */ raycount, /* Raycount + elstep * 512. Set to 0 for last ray of ppi */ bcd_azimuth, /* BCD code for azimuth. */ bcd_elevation, /* BCD code for elevation. */ mds, /* Minumum detectable signal (MDS). */ mus, /* Minumum usable signal (MUS). */ rvpc_high, rvpc_low, /* High and low level, in RVPC units. */ phi, /* PHI - RVPC high level in dbm * 32. */ plo, /* PLO - RVPC high level in dbm * 32. */ xmit_power_site, /* Transimitter Power * 32 + Site number. */ skip_width_azim_avg, /* Skip + Bin width * 256 + * Azimuth Averaging Factor * 4096. */ bin[224], /* RVPC COUNT for range bin[1..224] */ notused[256-241+1]; /* Not used. */ } Africa_buffer; typedef Africa_buffer Africa_ray; typedef struct { int nrays; Africa_ray **ray; /* 0..nrays-1 of Africa_rays */ } Africa_sweep; typedef struct { int nsweeps; Africa_sweep **sweep; /*0..nsweeps-1 of Africa_sweeps */ } Africa_volume; /* Prototype routine definitions */ int africa_read_buffer(FILE *fp, Africa_buffer *buffer); float africa_bcd_convert(unsigned short bcd); Africa_sweep * africa_new_sweep(int nray); Africa_ray *africa_new_ray(void); void africa_free_ray(Africa_ray *r); void africa_free_sweep(Africa_sweep *s); Africa_sweep *africa_read_sweep(FILE *fp); rsl-v1.43/rainbow.h0000644000102200007640000000276110010542527011160 00000000000000/* Control characters used in Rainbow data header */ #define SOH 0x01 /* Start of header: first character in Rainbow file. */ #define ETX 0x03 /* End of text: end of header. */ #define CR 0x0d /* Carriage return: end of line, same as '\r'. */ #define ETB 0x17 /* End of transmission block: marks header sections. */ /* Other constants */ #define SCAN_DATA 2 #define VOLUME_SCAN 100 /* Declarations */ struct elev_params { float elev_angle; float az_rate; int prf_high; int prf_low; float maxrange; }; typedef struct { int filetype; int product; int datatype; int compressed; char radarname[9]; int month; int day; int year; int hour; int minute; int sec; float lat; /* radar latitude, degrees */ float lon; /* radar longitude, degrees */ int nsweeps; int az_start; /* degrees */ int az_stop; /* degrees */ float az_step; /* degrees */ float range_start; /* km */ float range_stop; /* km */ float range_step; /* km */ int nbins; float bin_resolution; /* km */ int nvalues; int pulse_width_code; int zdata; int vdata; int wdata; int unfolding; int cdata; int ddata; int uzdata; struct elev_params *elev_params[20]; } Rainbow_hdr; /* Function prototypes */ Radar *RSL_rainbow_to_radar(char *infile); int rainbow_data_to_radar(Radar *radar, Rainbow_hdr rainbow_hdr, FILE *fp); rsl-v1.43/rainbow.c0000644000102200007640000002026411565520526011164 00000000000000/* NASA/TRMM, Code 912 This is the TRMM Office Radar Software Library. Copyright (C) 2004 Bart Kelley George Mason University Fairfax, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "rsl.h" #include "rainbow.h" static int get_param_int(char *buf) { /* Returns an integer parameter from a header line. */ int value; char *substr; substr = index(buf, ':'); sscanf(substr, ": %d", &value); return value; } static float get_param_float(char *buf) { /* Returns a floating point parameter from a header line. */ float value; char *substr; substr = index(buf, ':'); sscanf(substr, ": %f", &value); return value; } static char *get_param_string(char *buf) { /* Returns a string parameter from a header line. */ static char string[20]; char *substr; substr = index(buf, ':'); sscanf(substr, ": %s", string); return string; } void A_label(Rainbow_hdr *rainbow_header, char* buf) { int labelnum; char label; sscanf(buf, "%c%d", &label, &labelnum); if (labelnum == 3) rainbow_header->az_step = get_param_float(buf); else if (labelnum == 9) rainbow_header->nsweeps = get_param_int(buf); } void F_label(Rainbow_hdr *rainbow_header, char* buf) { int labelnum, day, month, year, sec, minute, hour; float lat, lon; sscanf(buf, "%*c%d", &labelnum); switch (labelnum) { case 3: rainbow_header->compressed = get_param_int(buf); break; case 4: sscanf(buf, "%*c%*d : %f %f", &lon, &lat); rainbow_header->lon = lon; rainbow_header->lat = lat; break; case 5: sscanf(buf, "%*c%*d : %d %d %d", &day, &month, &year); rainbow_header->month = month; rainbow_header->day = day; rainbow_header->year = year; break; case 6: sscanf(buf, "%*c%*d : %d %d %d", &sec, &minute, &hour); rainbow_header->hour = hour; rainbow_header->minute = minute; rainbow_header->sec = sec; break; case 9: rainbow_header->datatype = get_param_int(buf); break; } } void H_label(Rainbow_hdr *rainbow_header, char* buf) { int labelnum; char label; sscanf(buf, "%c%d", &label, &labelnum); if (labelnum == 3) rainbow_header->filetype = get_param_int(buf); else if (labelnum == 8) strcpy(rainbow_header->radarname, get_param_string(buf)); } void P_label(Rainbow_hdr *rainbow_header, char* buf) { int labelnum; char label; sscanf(buf, "%c%d", &label, &labelnum); if (labelnum == 3) rainbow_header->range_start= get_param_float(buf); else if (labelnum == 4) rainbow_header->range_stop = get_param_float(buf); else if (labelnum == 5) rainbow_header->range_step = get_param_float(buf); } void R_label(Rainbow_hdr *rainbow_header, char* buf) { int labelnum; sscanf(buf, "%*c%d", &labelnum); if (labelnum == 1) rainbow_header->nbins = get_param_int(buf); else if (labelnum == 2) rainbow_header->bin_resolution = get_param_float(buf); else if (labelnum == 8) rainbow_header->nvalues = get_param_int(buf); } void W_label(Rainbow_hdr *rainbow_hdr, char* buf) { int labelnum, az_start, az_stop, pw_code, prf_high, prf_low, zdata; int vdata, wdata, unfolding, cdata, ddata, uzdata; float elev, az_step, az_rate, range_stop; char label; sscanf(buf, "%*c%d : %f %d %d %f %f %d %d %d %d %d %d %d %f %d %d %d", &labelnum, &elev, &az_start, &az_stop, &az_step, &az_rate, &pw_code, &prf_high, &prf_low, &zdata, &vdata, &wdata, &unfolding, &range_stop, &cdata, &ddata, &uzdata); /* Note: Only need to collect parameters 1, 5, 7, 8, and 13 for each * elevation. Parameters 2, 3, and 4 are fixed at 0, 359, and 1 for volume * scan. The remaining parameters can be taken once from label number 1 * (first elevation). Also, don't need az_step; got it from A3. */ if (labelnum == 1) { rainbow_hdr->az_start = az_start; rainbow_hdr->az_stop = az_stop; rainbow_hdr->pulse_width_code = pw_code; rainbow_hdr->zdata = zdata; rainbow_hdr->vdata = vdata; rainbow_hdr->wdata = wdata; rainbow_hdr->unfolding = unfolding; rainbow_hdr->cdata = cdata; rainbow_hdr->ddata = ddata; rainbow_hdr->uzdata = uzdata; } rainbow_hdr->elev_params[labelnum-1] = (struct elev_params *) malloc(sizeof(struct elev_params)); rainbow_hdr->elev_params[labelnum-1]->elev_angle = elev; rainbow_hdr->elev_params[labelnum-1]->az_rate = az_rate; rainbow_hdr->elev_params[labelnum-1]->prf_high = prf_high; rainbow_hdr->elev_params[labelnum-1]->prf_low = prf_low; rainbow_hdr->elev_params[labelnum-1]->maxrange = range_stop; } /**********************************************************/ /* */ /* read_hdr_line */ /* */ /**********************************************************/ static int read_hdr_line(char *buf, int maxchars, FILE *fp) { /* Read a line from the Rainbow file header into character buffer. * Function returns the first character in buffer (the "label") if * the line was successfully read, -1 otherwise. * * Note: the following control characters (defined in rainbow.h) are used * in the Rainbow header: * CR - Carriage Return: end of a line. * ETB - End of Transmission Block: divides header into sections (we can * ignore this one.) * ETX - End of Text: end of header. */ int c = 0; int badline = 0, i; i = 0; while ((c = getc(fp)) != CR && c != ETX) { if (c == ETB) { c = getc(fp); /* Read past both and the */ if (c == CR) c = getc(fp); /* combination . */ } buf[i++] = c; if (i == maxchars) { badline = 1; break; } } if (badline) { fprintf(stderr,"A header line exceeded buffer size %d.\n",maxchars); fprintf(stderr,"Did not find end-of-line character 0x%02x.\n",CR); buf[maxchars - 1] = '\0'; /* Make it a legal string anyway. */ return -1; } buf[i] = '\0'; if (c != ETX) c = (int) buf[0]; return c; } /**********************************************************/ /* */ /* read_rainbow_header */ /* */ /**********************************************************/ #define BUFSIZE 128 void read_rainbow_header(Rainbow_hdr *rainbow_header, FILE *fp) { /* Reads parameters from Rainbow file header into a rainbow header structure. */ char buf[BUFSIZE]; int label; /* Read each line of the header and extract parameters according to the * label. The label is a single alphabetic character at the beginning * of the line which indicates a category of parameters. */ while ((label = read_hdr_line(buf, BUFSIZE, fp)) != ETX && label > 0) { switch (label) { case 'H': H_label(rainbow_header, buf); break; case 'P': P_label(rainbow_header, buf); break; case 'W': W_label(rainbow_header, buf); break; case 'F': F_label(rainbow_header, buf); break; case 'R': R_label(rainbow_header, buf); break; case 'A': A_label(rainbow_header, buf); break; case 'N': rainbow_header->product = get_param_int(buf); break; case 'X': /* X_label(rainbow_header, buf); */ break; } } } rsl-v1.43/toga.c0000644000102200007640000006102011030267553010443 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1992 Dennis F. Flanigan Jr. of Applied Research Corporation, Landover, Maryland, a NASA/GSFC on-site contractor. This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* toga/old sigmet/Darwin access routines * V1.0 12/15/93 by John Merritt. * * 1. Use CFLAGS = -DUSE_PLOG if you want to use the PLOG library. *---------------------------------------------------------------------- * * Dennis Flanigan, Jr. * Applied Research Corp. * NASA GSFC Code 910.1 * * * 15 Jul 93 * Added tg_prt_head function * * 28 Jun 93 * tg_file_str added * * 09 Jun 93 * Added tg_open function ...Mike * * 5/10/93 * Modified tg_read_ray and created tg_decode_ray_data . * tg_read_ray now returns decoded real-valued ray data in a * tg_ray_data structure instead of toga-format-encoded ray data * in a rp_ray structure. Mike * * 8/13/92 * Made changes so that code can be generated in library routines. * Library will be called libtg.a * * 7/10/92 * Routines to access toga data from Darwin. These routines work * with the old sigmet data format that was used in Darwin from 87 * to 91. * */ #include #include #include #include #include #include #include #include #include #include "toga.h" #ifdef USE_PLOG #include "plog.h" #endif #if defined(__linux) void swab(const void *from, void *to, size_t n); #endif int tg_open(char *,tg_file_str *); int tg_read_map_head(tg_file_str *); float tg_make_ang(unsigned short); int tg_read_map_bytes(tg_file_str *,void *,int); int tg_read_rec_bytes(tg_file_str *,char *,int); int tg_read_map_rec(tg_file_str *); void tg_decode_ray_data(tg_file_str *,short *); int tg_read_ray(tg_file_str *); void tg_prt_head(tg_map_head_str *,int); FILE *uncompress_pipe (FILE *fp); int tg_open(char *filename,tg_file_str *tg_file) { /* open the toga data file */ if (filename == NULL) tg_file->fd = STDIN_FILENO; /* Stdin */ else if ((tg_file->fd=open(filename,O_RDONLY)) == -1) { #ifdef USE_PLOG plog("tg_open: Error opening toga data file\n",PLOG_P); #endif return(TG_SYS_ERR); } /* Unfortunately, there is no tg_close to modularize the following * pipe close. Shouldn't be any problems anyway. */ (void) uncompress_pipe(fdopen(tg_file->fd, "r")); /* Redirect through gunzip. */ /* initialize buffer pointers, flags */ tg_file->buf_ind = 32769; tg_file->buf_end = 32769; tg_file->first_rec = TRUE; tg_file->data_ind = 2044; /* read the map header from the toga file into the tg_file map_head str */ if (tg_read_map_head(tg_file) < 0) { return(-1); /* Can't read toga map header */ } return(TG_OK); } int tg_read_map_head(tg_file_str *tg_file) { int n; tg_map_head_str buf; if((n = read(tg_file->fd,&buf,TG_HDSIZE)) != TG_HDSIZE) { if (n < 0) { fprintf(stderr,"tg_read_map_head: (%d)%s \n",errno,strerror(errno)); } else { fprintf(stderr,"tg_read_map_head: Didn't read entire file header.\n\007"); fprintf(stderr,"tg_read_map_head: Bytes read: %d \n",n); } return (-1); } /* Do we need to swap bytes ? * Test for byte swapping is done by checking the storm year. * If less then 2050 then bytes are in correct order, otherwise * swap bytes. */ if((buf.strm_year < 2050) && (buf.strm_year > 1960)) { memcpy(&(tg_file->map_head),&buf,sizeof(tg_map_head_str)); tg_file->swap_bytes = FALSE; } else { swab(&buf,&(tg_file->map_head),sizeof(tg_map_head_str)); tg_file->swap_bytes = TRUE; } /* The file header has now been written into tg_file->map_head . Check for reasonable strm_year and strm_mon. If not reasonable, we assume the file is garbled beyond legibility, or perhaps this is not a TOGA format data file. */ if ((tg_file->map_head.strm_year < 2050) && (tg_file->map_head.strm_year > 1960)) { if ((tg_file->map_head.strm_mon > 0) && (tg_file->map_head.strm_mon < 13)) { /* file header OK, reset pointers into buffer */ tg_file->buf_ind = 32769; tg_file->buf_end = 32769; return(0); } } /* If we've reached this point, we can't read the file header. */ #ifdef USE_PLOG plog("tg_read_map_head: Can't read TOGA file header\n",PLOG_P); #endif return(-1); } float tg_make_ang(unsigned short binang) { float maxval = 65536.0; return(360.0 * ((float)binang/maxval)); } int tg_read_map_bytes(tg_file_str *tg_file,void *buf,int size) { int m,n,wsize; short dec_key; int ret_val = 0; char *wbuf; /* Copy the pointer to buf to wbuf. wbuf stands for working buf */ wbuf = buf; /* size is size in bytes. wsize is size in words. */ wsize = size / 2; while(wsize > 0) { /* Do we need to decompress more data? */ if((tg_file->buf_ind + wsize - 1) > tg_file->buf_end) { /* Yes we do, but first make sure that we don't need any data * already in buffer. */ if((tg_file->buf_end - tg_file->buf_ind) > 0) { /* There is data in buffer that we need, before we decompress * next string of data. */ memcpy(wbuf,&(tg_file->dec_buf[tg_file->buf_ind]), (tg_file->buf_end - tg_file->buf_ind + 1) * 2); wsize = wsize - (tg_file->buf_end - tg_file->buf_ind + 1); wbuf = (wbuf + ((tg_file->buf_end - tg_file->buf_ind + 1) * 2)); ret_val = ret_val + ((tg_file->buf_end - tg_file->buf_ind + 1)*2); } /* Is this data or is this length of zeros */ if((n = tg_read_rec_bytes(tg_file,(char *)&dec_key,2)) <= 0) { tg_file->buf_ind = tg_file->buf_end; return(n); } n = (0x1 & (dec_key >> 15)); if (n == 1) { /* No, it is not length of zeros. */ n = dec_key & 0x7FFF; if((m = tg_read_rec_bytes(tg_file,(char *)&(tg_file->dec_buf), n*2)) <= 0) { return(m); } tg_file->buf_ind = 0; tg_file->buf_end = n - 1; } else { /* Is this end of data ? */ if(dec_key == 0) { /* End of Data */ tg_file->buf_ind = 32769; tg_file->buf_end = 32769; return(TG_END_DATA); } /* Is this end of ray? */ else if(dec_key == 1) { /* plog("End of ray\n",LOG); */ tg_file->buf_ind = tg_file->buf_end; return(TG_END_RAY); } /* Fill decompress buffer with 0's */ else { memset(&(tg_file->dec_buf),(char)0,dec_key * 2); tg_file->buf_ind = 0; tg_file->buf_end = dec_key - 1; } } } /* Is decompressed data enough to fill request ? */ if((tg_file->buf_end - tg_file->buf_ind + 1) < wsize) { /* Will need to decompress more data */ memcpy(wbuf,&(tg_file->dec_buf[tg_file->buf_ind]), (tg_file->buf_end - tg_file->buf_ind + 1) * 2); wsize = wsize - (tg_file->buf_end - tg_file->buf_ind + 1); wbuf = (wbuf + ((tg_file->buf_end - tg_file->buf_ind + 1) * 2)); ret_val = ret_val + ((tg_file->buf_end - tg_file->buf_ind + 1) * 2); tg_file->buf_ind = tg_file->buf_end; } else { /* There is enough decompressed data for request */ memcpy(wbuf,&(tg_file->dec_buf[tg_file->buf_ind]),wsize * 2); tg_file->buf_ind = tg_file->buf_ind + wsize; ret_val = ret_val + (wsize * 2); wsize = 0; } } return(ret_val); } int tg_read_rec_bytes(tg_file_str *tg_file,char *buf,int size) { /* Return size number of bytes in buf. Read in new record * if needed. Check to make sure missing records with * record number variable found in record header. */ int wsize,n; char *wbuf; wsize = size/2; wbuf = buf; /* Is there enough data in recbuf for request */ if((tg_file->data_ind + wsize - 1) > 2043) { /* No there is not enough data for this request, but before * we read the next buffer, we should copy what we have into * the buffer pointed to by buf. */ if(tg_file->data_ind < 2044) { memcpy(wbuf,&(tg_file->recbuf.data[tg_file->data_ind]), (2043 - tg_file->data_ind + 1) * 2); wsize = wsize - (2043 - tg_file->data_ind + 1); wbuf = (wbuf + ((2043 - tg_file->data_ind + 1) * 2)); } /* New record has to be read in */ tg_file->data_ind = 0; if((n = tg_read_map_rec(tg_file)) < TG_RECSIZE) { if(n == 0) { return(n); } else { fprintf(stderr,"tg_read_map_rec: %d \n",n); return(-1); } } if(tg_file->first_rec) { tg_file->recnum = tg_file->recbuf.rec_num; tg_file->first_rec = FALSE; } else { if((tg_file->recnum + 1) != tg_file->recbuf.rec_num) { tg_file->recnum = tg_file->recbuf.rec_num; /* Set index to next ray */ tg_file->data_ind = tg_file->recbuf.first_ray - 5; return(TG_REC_NOSEQ); } else { tg_file->recnum = tg_file->recbuf.rec_num; } } tg_file->data_ind = 0; } memcpy(wbuf,&(tg_file->recbuf.data[tg_file->data_ind]),wsize*2); tg_file->data_ind = tg_file->data_ind + wsize; return(size); } int tg_read_map_rec(tg_file_str *tg_file) { int n; static char buf[TG_RECSIZE]; if((n = read(tg_file->fd,buf,TG_RECSIZE)) < 0) { fprintf(stderr,"tg_read_map_rec: Error while reading data record.\n"); fprintf(stderr,"tg_read_map_rec: (%d)%s\n",errno,strerror(errno)); } else if(n == 0) { /* assume end of file */ } else if(n != TG_RECSIZE) { fprintf(stderr,"tg_read_map_rec: Did not read all of data record.\n\007"); fprintf(stderr,"tg_read_map_rec: Bytes read: %d \n",n); } else { if(tg_file->swap_bytes) { /* record read in correctly */ swab(buf,&(tg_file->recbuf),TG_RECSIZE); } else { memcpy(&(tg_file->recbuf),buf,TG_RECSIZE); } } return(n); } void tg_decode_ray_data(tg_file_str *tg_file,short ray_buf[]) { int j,k; short dbval,vel,temp1,temp2; float nyq_vel; k = 0; /* intialize ray->data index */ switch (tg_file->ray_head.type) { case 1: /* TOGA record type 1 contains uncorrected & corrected reflectivity data, velocity, and spectrum width values. */ tg_file->ray.da_inv[TG_DM_IND] = TRUE; tg_file->ray.da_inv[TG_DZ_IND] = TRUE; tg_file->ray.da_inv[TG_VR_IND] = TRUE; tg_file->ray.da_inv[TG_SW_IND] = TRUE; tg_file->ray.num_bins[TG_DM_IND] = tg_file->ray_head.srngkill - 1; tg_file->ray.num_bins[TG_DZ_IND] = tg_file->ray_head.srngkill - 1; tg_file->ray.num_bins[TG_VR_IND] = tg_file->ray_head.srngkill - 1; tg_file->ray.num_bins[TG_SW_IND] = tg_file->ray_head.srngkill - 1; tg_file->ray.start_km[TG_DM_IND] = tg_file->ray_head.strt_rng/40.0; tg_file->ray.start_km[TG_DZ_IND] = tg_file->ray_head.strt_rng/40.0; tg_file->ray.start_km[TG_VR_IND] = tg_file->ray_head.strt_rng/40.0; tg_file->ray.start_km[TG_SW_IND] = tg_file->ray_head.strt_rng/40.0; tg_file->ray.interval_km[TG_DM_IND] = tg_file->map_head.rnginc/1000.0; tg_file->ray.interval_km[TG_DZ_IND] = tg_file->map_head.rnginc/1000.0; tg_file->ray.interval_km[TG_VR_IND] = tg_file->map_head.rnginc/1000.0; tg_file->ray.interval_km[TG_SW_IND] = tg_file->map_head.rnginc/1000.0; for (j=0; jray.num_bins[TG_DM_IND]; j++) { /* check OK flag bit to see if this is valid data */ if ((ray_buf[j*3] & 0x8000) == 0) { /* bad data, store no_data flag into each field */ tg_file->ray.data[TG_DM_IND][k] = TG_NO_DATA; tg_file->ray.data[TG_DZ_IND][k] = TG_NO_DATA; tg_file->ray.data[TG_VR_IND][k] = TG_NO_DATA; tg_file->ray.data[TG_SW_IND][k] = TG_NO_DATA; } else /* good data, uncode and store into tg_ray_data struct */ { /******* do corrected dbz value *********/ dbval = ray_buf[j*3 + 1] & 0x0FFF; /* The dbz data are signed 12 bit values. Check sign bit of dbz value */ if ((dbval & 0x0800) == 0) { /* store unscaled positive dbz value */ tg_file->ray.data[TG_DZ_IND][k] = dbval/16.0; } else /* 12 bit negative value */ { /* make 12 bit value a 16 bit word by extending sign bit */ dbval = (dbval | ~0x0FFF); if (dbval == -2048) /* -2048 indicates bad data */ { tg_file->ray.data[TG_DZ_IND][k] = TG_NO_DATA; /* bad data */ } else { /* store unscaled negative dbz value */ tg_file->ray.data[TG_DZ_IND][k] = dbval/16.0; } } /******* do uncorrected dbz value *********/ dbval = ray_buf[j*3 + 2] & 0x0FFF; /* The dbz data are signed 12 bit values. Check sign bit of dbz value */ if ((dbval & 0x0800) == 0) { /* store unscaled positive dbz value */ tg_file->ray.data[TG_DM_IND][k] = dbval/16.0; } else /* 12 bit negative value */ { /* make 12 bit value a 16 bit word by extending sign bit */ dbval = (dbval | ~0x0FFF); if (dbval == -2048) /* -2048 indicates bad data */ { tg_file->ray.data[TG_DM_IND][k] = TG_NO_DATA; /* bad data */ } else { /* store unscaled negative dbz value */ tg_file->ray.data[TG_DM_IND][k] = dbval/16.0; } } /* compute the nyquist velocity for subsequent scaling of velocity and spectrum width values. */ /* nyquist velocity = wavelength/(4*pulse repetition period) */ nyq_vel = (tg_file->map_head.wavelen/10000.0) / (4.0*(1.0/tg_file->map_head.prf)); /*m/s*/ /******** do velocity value **********/ /* toga velocity values are 10 bits long and range from -512 to 511 */ vel = ray_buf[j*3] & 0x03FF; /* strip off leading 6 bits */ /* This is a signed 10 bit value. Check sign bit */ if ((vel & 0x0200) == 0) /* sign bit set? */ { /* no, store positive velocity value */ tg_file->ray.data[TG_VR_IND][k] = vel/511.0*nyq_vel; } else /* 10 bit negative value */ { /* make 10 bit value a 16 bit word by extending sign bit */ vel = vel | ~0x03FF; /* store negative velocity value */ tg_file->ray.data[TG_VR_IND][k] = vel/512.0*nyq_vel; } /******** do spectrum width ***********/ /* toga spectrum width values are 8 bits and range from zero to 1/2 . see toga documentation */ /* get the low order 4 bits into their correct positions */ temp1 = (ray_buf[j*3 + 1] >> 12) & 0x000F; /* get the high order 4 bits into correct positions */ temp2 = (ray_buf[j*3 + 2] >> 8) & 0x00F0; /* store the spectrum width value into tg_ray_data struct */ tg_file->ray.data[TG_SW_IND][k] = ((temp1 | temp2)/512.0)*nyq_vel; } k += 1; } /* end for */ break; /* case 1: */ case 19: /* uncorrected reflectivity data */ /* TOGA record type 19 contains only uncorrected reflectivity values */ tg_file->ray.da_inv[TG_DM_IND] = TRUE; tg_file->ray.da_inv[TG_DZ_IND] = FALSE; tg_file->ray.da_inv[TG_VR_IND] = FALSE; tg_file->ray.da_inv[TG_SW_IND] = FALSE; tg_file->ray.num_bins[TG_DM_IND] = tg_file->ray_head.srngkill - 1; tg_file->ray.start_km[TG_DM_IND] = tg_file->ray_head.strt_rng/40.0; tg_file->ray.interval_km[TG_DM_IND] = tg_file->map_head.rnginc/1000.0; for (j=0; jray.num_bins[TG_DM_IND]; j++) { /* check OK flag bit to see if this is valid data */ if ((ray_buf[j] & 0x8000) == 0) { tg_file->ray.data[TG_DM_IND][k] = TG_NO_DATA; /* bad data, store flag */ } else /* good data, uncode it and store into ray->data */ { dbval = ray_buf[j] & 0x7FFF; /* strip off OK flag */ /* This is a signed 15 bit dbz value. Check sign bit */ if ((dbval & 0x4000) == 0) /* sign bit set? */ { /* no, positive db value. Unscale by factor of 16 and store */ tg_file->ray.data[TG_DM_IND][k] = dbval/16.0; } else /* 15 bit negative value */ { /* make 15 bit value a 16 bit word by extending sign bit, unscale by factor of 16 and store. */ tg_file->ray.data[TG_DM_IND][k] = (dbval | ~0x7FFF)/16.0; } } k += 1; } /* end for */ break; /* case 19: */ default: fprintf(stderr,"tg_decode_ray_data: found unknown toga data type\n"); fprintf(stderr,"tg_decode_ray_data: ignore this ray\n"); /* return TG_RAY_NOTYPE; */ break; } /* end switch */ } int tg_read_ray(tg_file_str *tg_file) { int n,a,o; int bin_size; short ray_buf[1800]; /* bin_size is size in bytes of data from one bin */ n = tg_read_map_bytes(tg_file,&(tg_file->ray_head),sizeof(tg_ray_head_str)); switch(n) { case TG_END_DATA: /* plog("tg_read_ray: TG_END_DATA for ray_head\n",LOG); */ break; case TG_REC_NOSEQ: /* plog("tg_read_ray: TG_REC_NOSEQ for ray_head\n",LOG); */ break; case 0: n = TG_RAY_READ_ERR; /* plog("tg_read_ray: zero bytes for ray_head\n",LOG); */ break; case -1: /* plog("tg_read_ray: error for ray_head\n",LOG); */ break; default: tg_file->ray.azm = tg_make_ang(tg_file->ray_head.azm); tg_file->ray.elev = tg_make_ang(tg_file->ray_head.elev); switch(tg_file->ray_head.type) { case 1: /* plog("tg_read_ray:doppler data\n",LOG); */ bin_size = 6 * (tg_file->map_head.numbin); break; case 19: /* plog("tg_read_ray:reflectivity data\n",LOG); */ bin_size = 2 * (tg_file->map_head.numbin); break; default: /* plog("tg_read_ray:undefined data type\n",PRINT); */ return TG_RAY_NOTYPE; break; } /* read ray contents from disk file into ray_buf */ if((o = tg_read_map_bytes(tg_file,ray_buf,bin_size)) == bin_size) { /* decode the raw ray data in ray_buf[] and place into the tg_file ray structure */ tg_decode_ray_data(tg_file,ray_buf); } else { fprintf(stderr,"*** wrong number of bytes read from ray ***\n"); fprintf(stderr,"\n,number_bytes read:%d\n",o); return TG_RAY_READ_ERR; } /* read end_of_ray flag from disk file */ o = 0; a = 0; while((o != TG_END_RAY) && (a < 100)) { o=tg_read_map_bytes(tg_file,ray_buf,2); a++; } if(a >= 100) { fprintf(stderr,"tg_read_ray: Could not find TG_END_RAY\n"); return TG_RAY_READ_ERR; } } return n; } void tg_prt_head(tg_map_head_str *head,int verbose) { /* print out the contents of a file map header */ #ifdef USE_PLOG plog("strm_year: %d\n",PLOG_L,head->strm_year); plog("strm_mon: %d\n",PLOG_L,head->strm_mon); plog("strm_day: %d\n",PLOG_L,head->strm_day); plog("strm_num: %d\n",PLOG_L,head->strm_num); plog("map_num: %d\n",PLOG_L,head->map_num); plog("\n",PLOG_L); plog("scan_year: %d\n",PLOG_L,head->scan_year); plog("scan_mon: %d\n",PLOG_L,head->scan_mon); plog("scan_day: %d\n",PLOG_L,head->scan_day); plog("scan_hour: %d\n",PLOG_L,head->scan_hour); plog("scan_min: %d\n",PLOG_L,head->scan_min); plog("scan_sec: %d\n",PLOG_L,head->scan_sec); plog("data_set: %d\n",PLOG_L,head->data_set); plog("\n",PLOG_L); if(verbose) { plog("tp1_ar: %d\n",PLOG_L,head->tp1_ar); plog("tp1_occw: %d\n",PLOG_L,head->tp1_occw); plog("tp1_dibit: %d\n",PLOG_L,head->tp1_dibit); plog("tp1_debit: %d\n",PLOG_L,head->tp1_debit); plog("\n",PLOG_L); plog("tp2_ar: %d\n",PLOG_L,head->tp2_ar); plog("tp2_occw: %d\n",PLOG_L,head->tp2_occw); plog("tp2_dibit: %d\n",PLOG_L,head->tp2_dibit); plog("tp2_debit: %d\n",PLOG_L,head->tp2_debit); plog("\n",PLOG_L); plog("status: %d\n",PLOG_L,head->status); plog("strng: %d\n",PLOG_L,head->strng); plog("numbin: %d\n",PLOG_L,head->numbin); plog("rnginc: %d\n",PLOG_L,head->rnginc); plog("rngjit: %d\n",PLOG_L,head->rngjit); plog("numcbin: %d\n",PLOG_L,head->numcbin); plog("\n",PLOG_L); plog("strtcal1: %d\n",PLOG_L,head->strtcal1); plog("strtcal2: %d\n",PLOG_L,head->strtcal2); plog("stepcal: %d\n",PLOG_L,head->stepcal); } plog("azmleft: %d\n",PLOG_L,head->azmleft); plog("azmrght: %d\n",PLOG_L,head->azmrght); plog("elev_low: %d\n",PLOG_L,head->elev_low); plog("elev_hgh: %d\n",PLOG_L,head->elev_hgh); plog("\n",PLOG_L); plog("at_angres: %d\n",PLOG_L,head->at_angres); plog("numfix_ang: %d\n",PLOG_L,head->numfix_ang); if(verbose) { for(a=0;a<20;a++) { plog("angfix[%2d]: %d\n",PLOG_L,a,head->angfix[a]); } plog("\n",PLOG_L); plog("rlparm: %d\n",PLOG_L,head->rlparm); plog("signois: %d\n",PLOG_L,head->signois); plog("sigcltr: %d\n",PLOG_L,head->sigcltr); plog("thrsh_flg: %d\n",PLOG_L,head->thrsh_flg); plog("\n",PLOG_L); plog("numdsp: %d\n",PLOG_L,head->numdsp); plog("numwrd: %d\n",PLOG_L,head->numwrd); plog("\n",PLOG_L); plog("scanmod: %d\n",PLOG_L,head->scanmod); plog("filename: %s\n",PLOG_L,head->filename); plog("\n",PLOG_L); plog("prf: %d\n",PLOG_L,head->prf); plog("transiz: %d\n",PLOG_L,head->transiz); plog("spconf: %d\n",PLOG_L,head->spconf); plog("sufchar: %d\n",PLOG_L,head->sufchar); plog("recsat1: %d\n",PLOG_L,head->recsat1); plog("recsat2: %d\n",PLOG_L,head->recsat2); plog("\n",PLOG_L); plog("dsp1cor_log: %d\n",PLOG_L,head->dsp1cor_log); plog("dsp1cor_iad: %d\n",PLOG_L,head->dsp1cor_iad); plog("dsp1cor_qad: %d\n",PLOG_L,head->dsp1cor_qad); plog("dsp1crr_log: %d\n",PLOG_L,head->dsp1crr_log); plog("dsp1crr_iad: %d\n",PLOG_L,head->dsp1crr_iad); plog("dsp1crr_qad: %d\n",PLOG_L,head->dsp1crr_qad); plog("\n",PLOG_L); plog("dsp2cor_log: %d\n",PLOG_L,head->dsp2cor_log); plog("dsp2cor_iad: %d\n",PLOG_L,head->dsp2cor_iad); plog("dsp2cor_qad: %d\n",PLOG_L,head->dsp2cor_qad); plog("dsp2crr_log: %d\n",PLOG_L,head->dsp2crr_log); plog("dsp2crr_iad: %d\n",PLOG_L,head->dsp2crr_iad); plog("dsp2crr_qad: %d\n",PLOG_L,head->dsp2crr_qad); plog("\n",PLOG_L); } plog("wavelen: %d\n",PLOG_L,head->wavelen); plog("pulsewd: %d\n",PLOG_L,head->pulsewd); plog("hortran_pow: %d\n",PLOG_L,head->hortran_pow); plog("vertran_pow: %d\n",PLOG_L,head->vertran_pow); plog("\n",PLOG_L); if(verbose) { plog("high_zero: %d\n",PLOG_L,head->high_zero); } plog("sitelat: %d\n",PLOG_L,head->sitelat); plog("sitelong: %d\n",PLOG_L,head->sitelong); plog("time_zone: %d\n",PLOG_L,head->time_zone); plog("\n",PLOG_L); if(verbose) { plog("zm_dsp1_mas: %d\n",PLOG_L,head->zm_dsp1_mas); plog("zm_dsp1_slv: %d\n",PLOG_L,head->zm_dsp1_slv); plog("zm_dsp2_mas: %d\n",PLOG_L,head->zm_dsp2_mas); plog("zm_dsp2_slv: %d\n",PLOG_L,head->zm_dsp2_slv); plog("\n",PLOG_L); plog("minz_dsp1_mas: %d\n",PLOG_L,head->minz_dsp1_mas); plog("minz_dsp1_slv: %d\n",PLOG_L,head->minz_dsp1_slv); plog("minz_dsp2_mas: %d\n",PLOG_L,head->minz_dsp2_mas); plog("minz_dsp2_slv: %d\n",PLOG_L,head->minz_dsp2_slv); plog("\n",PLOG_L); plog("num_pol: %d\n",PLOG_L,head->num_pol); plog("exinfo_rayhd: %d\n",PLOG_L,head->exinfo_rayhd); plog("len_exhd: %d\n",PLOG_L,head->len_exhd); plog("\n",PLOG_L); } plog("lat_deg: %d\n",PLOG_L,head->lat_deg); plog("lat_hun_min: %d\n",PLOG_L,head->lat_hun_min); plog("lon_deg: %d\n",PLOG_L,head->lon_deg); plog("lon_hun_min: %d\n",PLOG_L,head->lon_hun_min); plog("\n",PLOG_L); if(verbose) { plog("alt_atn: %d\n",PLOG_L,head->alt_atn); plog("alt_grn: %d\n",PLOG_L,head->alt_grn); plog("\n",PLOG_L); plog("vel_plat: %d\n",PLOG_L,head->vel_plat); plog("vel_cor: %d\n",PLOG_L,head->vel_cor); plog("head_plat: %d\n",PLOG_L,head->head_plat); plog("head_dsp: %d\n",PLOG_L,head->head_dsp); plog("\n",PLOG_L); plog("set_plat: %d\n",PLOG_L,head->set_plat); plog("drift_plat: %d\n",PLOG_L,head->drift_plat); plog("ok_plat: %d\n",PLOG_L,head->ok_plat); plog("\n",PLOG_L); plog("comments: %s\n",PLOG_L,head->comments); } #else fprintf(stderr, "You must link with -lplog and compile the toga library with -DUSE_PLOG to get a printout of the header.\n"); #endif } rsl-v1.43/config.guess0000755000102200007640000012206511312033143011661 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-17' # 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 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 ## for Red Hat Linux if test -f /etc/redhat-release ; then VENDOR=redhat ; else VENDOR= ; fi # 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 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-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 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms 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 ;; 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*) 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 ;; 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 nv1-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 ;; 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:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 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 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 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 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-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-${VENDOR:-unknown}-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR:-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}-${VENDOR:-ibm}-linux-gnu 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-${VENDOR:-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 EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-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: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[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*: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) 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 ;; *: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:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) 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 ;; NSR-[DGKLNPTVW]: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 ;; 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: rsl-v1.43/radar.c0000644000102200007640000001377011444231430010605 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Radar routines coded in this file: * * RSL_radar_verbose_on(); * RSL_radar_verbose_off(); * Radar *RSL_new_radar(int nvolumes); * void RSL_free_radar(Radar *r); * Radar *RSL_clear_radar(Radar *r); * Volume *RSL_get_volume(Radar *r, int type_wanted); * Radar *RSL_wsr88d_to_radar(char *infile, unsigned int data_mask); * * Internal routines: * print_vect(float v[], int istart, int istop); * void radar_load_date_time(Radar *radar); * int wsr88d_load_sweep_into_volume(Wsr88d_sweep ws, * Volume *v, int nsweep, unsigned int vmask); * * Radar routines not coded in this file: * * Radar *RSL_read_radar(char *infile); * int RSL_write_radar(Radar *radar, char *outfile); * Radar *RSL_clear_radar(Radar *r); * void RSL_radar_to_uf(Radar *r, char *outfile); * Radar *RSL_uf_to_radar(char *infile); * * See the file radar.ez and version.notes for more detailed documentation. * * All routines herein coded, unless otherwise stated, by: * John Merritt * Space Applications Corporation * */ #include #include #include #include "rsl.h" void RSL_print_version() { printf("RSL version %s.\n", RSL_VERSION_STR); } /* Debug printing global variable: radar_verbose_flag */ int radar_verbose_flag = 0; void RSL_radar_verbose_on() { radar_verbose_flag = 1; } void RSL_radar_verbose_off() { radar_verbose_flag = 0; } void print_vect(float v[], int istart, int istop) { int i; for (i=istart; i<=istop; i++) fprintf(stderr,"v[%d] = %f\n", i, v[i]); } /**********************************************************************/ /* */ /* RSL_get_nyquist_from_radar */ /* */ /**********************************************************************/ float RSL_get_nyquist_from_radar(Radar *radar) { /* Find a velocity volume. * Find first sweep in that volume. * Find first ray in that sweep. * Return the nyquist velocity. * * This code required for loading nyquist value in non-velocity * volumes; UF output is affected by this in a good way. */ Volume *vol; Ray *ray; if (radar == NULL) return 0.0; if (radar->h.nvolumes <= VR_INDEX) return 0.0; vol = radar->v[VR_INDEX]; ray = RSL_get_first_ray_of_volume(vol); if (ray == NULL) return 0.0; return ray->h.nyq_vel; } /**********************************************************************/ /* */ /* done 3/30 new_radar() */ /* done 3/30 free_radar() */ /* done 4/21 clear_radar() */ /* */ /**********************************************************************/ Radar *RSL_new_radar(int nvolumes) { Radar *r; r = (Radar *) calloc(1, sizeof(Radar)); r->v = (Volume **) calloc(nvolumes, sizeof(Volume *)); r->h.nvolumes = nvolumes; r->h.scan_mode = PPI; /* default PPI is enum constant defined in rsl.h */ return r; } void RSL_free_radar(Radar *r) { int i; /* Chase down all the pointers and free everything in sight. */ if (r) { for (i=0; ih.nvolumes; i++) RSL_free_volume(r->v[i]); if (r->v) free(r->v); free(r); } } Radar *RSL_clear_radar(Radar *r) { int i; if (r == NULL) return r; for (i=0; ih.nvolumes; i++) RSL_clear_volume(r->v[i]); return r; } /**********************************************************************/ /* */ /* done 8/26 radar_load_date_time */ /* */ /**********************************************************************/ void radar_load_date_time(Radar *radar) { /* Search for the first existing ray of the first sweep of the first * volume; steal that information. */ int i; Ray *first_ray; radar->h.month = 0; radar->h.day = 0; radar->h.year = 0; radar->h.hour = 0; radar->h.minute= 0; radar->h.sec= 0.0; first_ray = NULL; for (i=0; iv[i] != NULL) { first_ray = RSL_get_first_ray_of_volume(radar->v[i]); if (first_ray) { radar->h.month = first_ray->h.month; radar->h.day = first_ray->h.day; radar->h.year = first_ray->h.year; radar->h.hour = first_ray->h.hour; radar->h.minute= first_ray->h.minute; radar->h.sec = first_ray->h.sec; return; } } } } /**********************************************************************/ /* */ /* done 3/30 Volume *RSL_get_volume */ /* */ /**********************************************************************/ Volume *RSL_get_volume(Radar *r, int type_wanted) { return r->v[type_wanted]; } rsl-v1.43/radar_to_uf.c0000644000102200007640000004731411627001735012010 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #define USE_RSL_VARS #include "rsl.h" extern int radar_verbose_flag; /* Missing data flag : -32768 when a signed short. */ #define UF_NO_DATA 0X8000 /* Field names. Any convensions may be observed. */ /* Typically: * DZ = Reflectivity (dBZ). * VR = Radial Velocity. * SW = Spectrum Width. * CZ = Corrected Reflectivity. (Quality controlled: AP removed, etc.) * ZT = Total Reflectivity (dB(mW)). Becomes UZ in UF files. * DR = Differential Reflectivity. * LR = Another DR (LDR). * ZD = Tina Johnson use this one. * DM = Received power. * RH = Rho coefficient. * PH = Phi (MCTEX parameter). * XZ = X-band reflectivity. * CD = Corrected ZD. * MZ = DZ mask for 1C-51 HDF. * MD = ZD mask for 1C-51 HDF. * ZE = Edited reflectivity. * VE = Edited velocity. * KD = KDP wavelength*deg/km * TI = TIME (units unknown). * These fields may appear in any order in the UF file. * There are more fields than appear here. See rsl.h. */ /* Changed old buffer size (16384) for larger dualpol files. BLK 5/20/2011 */ typedef short UF_buffer[20000]; /* Bigger than documented 4096. */ void swap_uf_buffer(UF_buffer uf); void swap2(short *buf, int n); /**********************************************************************/ /* */ /* RSL_radar_to_uf_fp */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* May 20, 1994 */ /**********************************************************************/ void RSL_radar_to_uf_fp(Radar *r, FILE *fp) { /* * 1. Fill the UF buffers with data from the Radar structure. * 2. Write to a stream. Assume open and leave it so. */ UF_buffer uf; /* These are pointers to various locations within the UF buffer 'uf'. * They are used to index the different components of the UF structure in * a manor consistant with the UF documentation. For instance, uf_ma[1] * will be equivalenced to the second word (2 bytes/each) of the UF * buffer. */ short *uf_ma; /* Mandatory header block. */ short *uf_op; /* Optional header block. */ short *uf_lu; /* Local Use header block. */ short *uf_dh; /* Data header. */ short *uf_fh; /* Field header. */ short *uf_data; /* Data. */ /* The length of each header. */ int len_ma, len_op, len_lu, len_dh, len_fh, len_data; /* Booleans to flag inclusion of headers. */ int q_op, q_lu, q_dh, q_fh; int current_fh_index; int scale_factor; int rec_len, save_rec_len; int nfield; float vr_az; int max_field_names; struct tm *tm; time_t the_time; int i,j,k,m; int degree, minute; float second; int uf_sweep_mode = 1; /* default PPI */ /* Here are the arrays for each field type. Each dimension is the number * of fields in the radar structure. I do this because the radar organization * is by volumes (field types) and the UF demands that each ray contain * all the field types. */ Volume **volume; Sweep **sweep; Ray *ray; int *nsweeps; int nvolumes, maxsweeps, nrays; int true_nvolumes; int sweep_num, ray_num, rec_num; float x; if (r == NULL) { fprintf(stderr, "radar_to_uf_fp: radar pointer NULL\n"); return; } /* Do all the headers first time around. Then, prune OP and LU. */ q_op = q_lu = q_dh = q_fh = 1; memset(&uf, 0, sizeof(uf)); /* Init to 0 or NULL for pointers. */ sweep_num = ray_num = rec_num = 0; true_nvolumes = nvolumes = maxsweeps = nrays = 0; /* PPI and RHI are enum constants defined in rsl.h */ if (r->h.scan_mode == PPI) uf_sweep_mode = 1; else if (r->h.scan_mode == RHI) uf_sweep_mode = 3; /* * The organization of the Radar structure is by volumes, then sweeps, then * rays, then gates. This is different from the UF file organization. * The UF format wants sweeps, rays, then gates for all field types (volumes). * So, we have to do a back flip, here. This is achieved by maintaining * an array of volume pointers and sweep pointers, each dimensioned by * 'nvolumes', which contains the data for the different field types; this * is our innermost loop. The variables are 'volume[i]' and 'sweep[i]' where * 'i' is the volume index. * * In other words, we are getting all the field types together, when we * are looping on the number of rays in a sweep, so we can load the UF_buffer * appropriately. */ nvolumes = r->h.nvolumes; volume = (Volume **) calloc(nvolumes, sizeof(Volume *)); sweep = (Sweep **) calloc(nvolumes, sizeof(Sweep *)); nsweeps = (int *) calloc(nvolumes, sizeof(int)); /* Get the the number of sweeps in the radar structure. This will be * the main controlling loop variable. */ for (i=0; iv[i]; if(volume[i]) { nsweeps[i] = volume[i]->h.nsweeps; if (nsweeps[i] > maxsweeps) maxsweeps = nsweeps[i]; true_nvolumes++; } } if (radar_verbose_flag) { fprintf(stderr,"True number of volumes for UF is %d\n", true_nvolumes); fprintf(stderr,"Maximum # of volumes for UF is %d\n", nvolumes); } max_field_names = sizeof(RSL_ftype) / 4; /*-------- * LOOP for all sweeps (typically 11 or 16 for wsr88d data. * */ for (i=0; isweep[i]; /* Check if we really can access this sweep. Paul discovered that * if the actual number of sweeps is less than the maximum that we * could be chasing a bad pointer (a NON-NULL garbage pointer). */ if (i >= nsweeps[k]) sweep[k] = NULL; if (sweep[k]) if (sweep[k]->h.nrays > nrays) nrays = sweep[k]->h.nrays; } sweep_num++; /* I guess it will be ok to count NULL sweeps. */ ray_num = 0; if (radar_verbose_flag) fprintf(stderr,"Processing sweep %d for %d rays.", i, nrays); if (radar_verbose_flag) if (little_endian()) fprintf(stderr," ... On Little endian.\n"); else fprintf(stderr,"\n"); /* Now LOOP for all rays within this particular sweep (i). * Get all the field types together for the ray, see ray[k], and * fill the UF data buffer appropriately. */ for (j=0; jh.nrays) if (sweep[k]->ray) if ((ray = sweep[k]->ray[j])) break; } /* If there is no such ray, then continue on to the next ray. */ if (ray) { /* fprintf(stderr,"Ray: %.4d, Time: %2.2d:%2.2d:%f %.2d/%.2d/%.4d\n", ray_num, ray->h.hour, ray->h.minute, ray->h.sec, ray->h.month, ray->h.day, ray->h.year); */ /* * ---- Begining of MANDITORY HEADER BLOCK. */ uf_ma = uf; memcpy(&uf_ma[0], "UF", 2); if (little_endian()) memcpy(&uf_ma[0], "FU", 2); uf_ma[1] = 0; /* Not known yet. */ uf_ma[2] = 0; /* Not known yet. Really, I do. */ uf_ma[3] = 0; /* Not known yet. */ uf_ma[4] = 0; /* Not known yet. */ uf_ma[6] = 1; uf_ma[7] = ray_num; uf_ma[8 ] = 1; uf_ma[9 ] = sweep_num; memcpy(&uf_ma[10], r->h.radar_name, 8); if (little_endian()) swap2(&uf_ma[10], 8/2); memcpy(&uf_ma[14], r->h.name, 8); if (little_endian()) swap2(&uf_ma[14], 8/2); /* Convert decimal lat/lon to d:m:s */ if (ray->h.lat != 0.0) { degree = (int)ray->h.lat; minute = (int)((ray->h.lat - degree) * 60); second = (ray->h.lat - degree - minute/60.0) * 3600.0; } else { degree = r->h.latd; minute = r->h.latm; second = r->h.lats; } uf_ma[18] = degree; uf_ma[19] = minute; if (second > 0.0) uf_ma[20] = second*64 + 0.5; else uf_ma[20] = second*64 - 0.5; if (ray->h.lon != 0.0) { degree = (int)ray->h.lon; minute = (int)((ray->h.lon - degree) * 60); second = (ray->h.lon - degree - minute/60.0) * 3600.0; } else { degree = r->h.lond; minute = r->h.lonm; second = r->h.lons; } uf_ma[21] = degree; uf_ma[22] = minute; if (second > 0.0) uf_ma[23] = second*64 + 0.5; else uf_ma[23] = second*64 - 0.5; if (ray->h.alt != 0) uf_ma[24] = ray->h.alt; else uf_ma[24] = r->h.height; uf_ma[25] = ray->h.year % 100; /* By definition: not year 2000 compliant. */ uf_ma[26] = ray->h.month; uf_ma[27] = ray->h.day; uf_ma[28] = ray->h.hour; uf_ma[29] = ray->h.minute; uf_ma[30] = ray->h.sec; memcpy(&uf_ma[31], "UT", 2); if (little_endian()) memcpy(&uf_ma[31], "TU", 2); if (ray->h.azimuth > 0) uf_ma[32] = ray->h.azimuth*64 + 0.5; else uf_ma[32] = ray->h.azimuth*64 - 0.5; uf_ma[33] = ray->h.elev*64 + 0.5; uf_ma[34] = uf_sweep_mode; if (ray->h.fix_angle != 0.) uf_ma[35] = ray->h.fix_angle*64.0 + 0.5; else uf_ma[35] = sweep[k]->h.elev*64.0 + 0.5; uf_ma[36] = ray->h.sweep_rate*(360.0/60.0)*64.0 + 0.5; the_time = time(NULL); tm = gmtime(&the_time); uf_ma[37] = tm->tm_year % 100; /* Same format as data year */ uf_ma[38] = tm->tm_mon+1; uf_ma[39] = tm->tm_mday; memcpy(&uf_ma[40], "RSL" RSL_VERSION_STR, 8); if (little_endian()) swap2(&uf_ma[40], 8/2); uf_ma[44] = (signed short)UF_NO_DATA; len_ma = 45; uf_ma[2] = len_ma+1; /* * ---- End of MANDITORY HEADER BLOCK. */ /* ---- Begining of OPTIONAL HEADER BLOCK. */ len_op = 0; if (q_op) { q_op = 0; /* Only once. */ uf_op = uf+len_ma; memcpy(&uf_op[0], "TRMMGVUF", 8); if (little_endian()) swap2(&uf_op[0], 8/2); uf_op[4] = (signed short)UF_NO_DATA; uf_op[5] = (signed short)UF_NO_DATA; uf_op[6] = ray->h.hour; uf_op[7] = ray->h.minute; uf_op[8] = ray->h.sec; memcpy(&uf_op[9], "RADAR_UF", 8); if (little_endian()) swap2(&uf_op[9], 8/2); uf_op[13] = 2; len_op = 14; } /* ---- End of OPTIONAL HEADER BLOCK. */ /* ---- Begining of LOCAL USE HEADER BLOCK. */ q_lu = 0; /* TODO: Code within "#ifdef LUHDR_VR_AZ" below should be removed * once testing of merge_split_cuts is completed. */ /* 7/25/2011 There's really no need to remove this code after merge_split_cuts. * We can continue using it for exact VR azimuth in RSL. Non-RSL programs can * use the mandatory header azimuth, which is exact for DZ and a close * approximation for VR when merge-split-cuts is applied. */ /* Preprocessor directives are for testing. */ #define LUHDR_VR_AZ #ifdef LUHDR_VR_AZ /* If DZ and VR azimuths are different, store VR azimuth in Local Use * Header. This is done for WSR-88D split cuts. */ if (sweep[DZ_INDEX] && sweep[VR_INDEX]) { if (sweep[DZ_INDEX]->ray[j] && sweep[VR_INDEX]->ray[j]) { vr_az = sweep[VR_INDEX]->ray[j]->h.azimuth; if (sweep[DZ_INDEX]->ray[j]->h.azimuth != vr_az) q_lu = 1; /* Set to use Local Use Header block. */ } } #endif len_lu = 0; if (q_lu) { /* Store azimuth for WSR-88D VR ray in Local Use Header. */ uf_lu = uf+len_ma+len_op; memcpy(&uf_lu[0], "AZ", 2); if (little_endian()) memcpy(&uf_lu[0], "ZA", 2); if (vr_az > 0) uf_lu[1] = vr_az*64 + 0.5; else uf_lu[1] = vr_az*64 - 0.5; len_lu = 2; } /* ---- End of LOCAL USE HEADER BLOCK. */ /* Here is where we loop on each field type. We need to keep * track of how many FIELD HEADER and FIELD DATA sections, one * for each field type, we fill. The variable that tracks this * index into 'uf' is 'current_fh_index'. It is bumped by * the length of the FIELD HEADER and FIELD DATA for each field * type encountered. Field types expected are: Reflectivity, * Velocity, and Spectrum width; this is a typicial list but it * is not restricted to it. */ for (k=0; kh.nrays && sweep[k]->ray[j]) ray = sweep[k]->ray[j]; else ray = NULL; else ray = NULL; if (ray) { /* ---- Begining of DATA HEADER. */ nfield++; if (q_dh) { len_dh = 2*true_nvolumes + 3; uf_dh = uf+len_ma+len_op+len_lu; uf_dh[0] = nfield; uf_dh[1] = 1; uf_dh[2] = nfield; /* 'nfield' indexes the field number. * 'k' indexes the particular field from the volume. * RSL_ftype contains field names and is defined in rsl.h. */ if (k > max_field_names-1) { fprintf(stderr, "RSL_uf_to_radar: No field name for volume index %d\n", k); fprintf(stderr,"RSL_ftype must be updated in rsl.h for new field.\n"); fprintf(stderr,"Quitting now.\n"); return; } memcpy(&uf_dh[3+2*(nfield-1)], RSL_ftype[k], 2); if (little_endian()) swap2(&uf_dh[3+2*(nfield-1)], 2/2); if (current_fh_index == 0) current_fh_index = len_ma+len_op+len_lu+len_dh; uf_dh[4+2*(nfield-1)] = current_fh_index + 1; } /* ---- End of DATA HEADER. */ /* ---- Begining of FIELD HEADER. */ if (q_fh) { uf_fh = uf+current_fh_index; if (k != PH_INDEX) scale_factor = 100; else scale_factor = 10; uf_fh[1] = scale_factor; uf_fh[2] = ray->h.range_bin1/1000.0; uf_fh[3] = ray->h.range_bin1 - (1000*uf_fh[2]); uf_fh[4] = ray->h.gate_size; uf_fh[5] = ray->h.nbins; uf_fh[6] = ray->h.pulse_width*(RSL_SPEED_OF_LIGHT/1.0e6); uf_fh[7] = sweep[k]->h.beam_width*64.0 + 0.5; uf_fh[8] = sweep[k]->h.beam_width*64.0 + 0.5; uf_fh[9] = ray->h.frequency*64.0 + 0.5; /* Bandwidth (mHz). */ uf_fh[10] = 0; /* Horizontal polarization. */ uf_fh[11] = ray->h.wavelength*64.0*100.0; /* m to cm. */ uf_fh[12] = ray->h.pulse_count; memcpy(&uf_fh[13], " ", 2); uf_fh[14] = (signed short)UF_NO_DATA; uf_fh[15] = (signed short)UF_NO_DATA; if (k == DZ_INDEX || k == ZT_INDEX) { uf_fh[16] = volume[k]->h.calibr_const*100.0 + 0.5; } else { memcpy(&uf_fh[16], " ", 2); } if (ray->h.prf != 0) uf_fh[17] = 1.0/ray->h.prf*1000000.0; /* Pulse repetition time(msec) = 1/prf */ else uf_fh[17] = (signed short)UF_NO_DATA; /* Pulse repetition time = 1/prf */ uf_fh[18] = 16; if (VR_INDEX == k || VE_INDEX == k) { uf_fh[19] = scale_factor*ray->h.nyq_vel; uf_fh[20] = 1; len_fh = 21; } else { len_fh = 19; } uf_fh[0] = current_fh_index + len_fh + 1; /* ---- End of FIELD HEADER. */ /* ---- Begining of FIELD DATA. */ uf_data = uf+len_fh+current_fh_index; len_data = ray->h.nbins; for (m=0; mh.f(ray->range[m]); if (x == BADVAL || x == RFVAL || x == APFLAG || x == NOECHO) uf_data[m] = (signed short)UF_NO_DATA; else uf_data[m] = scale_factor * x; } current_fh_index += (len_fh+len_data); } } /* ---- End of FIELD DATA. */ } /* Fill in some infomation we didn't know. Like, buffer length, * record number, etc. */ rec_num++; uf_ma[1] = current_fh_index; uf_ma[3] = len_ma + len_op + 1; uf_ma[4] = len_ma + len_op + len_lu + 1; uf_ma[5] = rec_num; /* WRITE the UF buffer. */ rec_len =(int)uf_ma[1]*2; save_rec_len = rec_len; /* We destroy 'rec_len' when making it big endian on a little endian machine. */ if (little_endian()) swap_4_bytes(&rec_len); (void)fwrite(&rec_len, sizeof(int), 1, fp); if (little_endian()) swap_uf_buffer(uf); (void)fwrite(uf, sizeof(char), save_rec_len, fp); (void)fwrite(&rec_len, sizeof(int), 1, fp); } /* if (ray) */ } } } /**********************************************************************/ /* */ /* RSL_radar_to_uf */ /* */ /**********************************************************************/ void RSL_radar_to_uf(Radar *r, char *outfile) { FILE *fp; if (r == NULL) { fprintf(stderr, "radar_to_uf: radar pointer NULL\n"); return; } if ((fp = fopen(outfile, "w")) == NULL) { perror(outfile); return; } RSL_radar_to_uf_fp(r, fp); fclose(fp); } /**********************************************************************/ /* */ /* RSL_radar_to_uf_gzip */ /* */ /**********************************************************************/ void RSL_radar_to_uf_gzip(Radar *r, char *outfile) { FILE *fp; if (r == NULL) { fprintf(stderr, "radar_to_uf_gzip: radar pointer NULL\n"); return; } if ((fp = fopen(outfile, "w")) == NULL) { perror(outfile); return; } fp = compress_pipe(fp); RSL_radar_to_uf_fp(r, fp); rsl_pclose(fp); } rsl-v1.43/wsr88d_m31.c0000644000102200007640000004724611740626163011352 00000000000000/* NASA/TRMM, Code 613 This is the TRMM Office Radar Software Library. Copyright (C) 2008 Bart Kelley SSAI Lanham, Maryland This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * This file contains routines for processing Message Type 31, the digital * radar message type introduced in WSR-88D Level II Build 10. For more * information, see the "Interface Control Document for the RDA/RPG" at the * WSR-88D Radar Operations Center web site. */ #include "rsl.h" #include "wsr88d.h" #include /* Data descriptions in the following data structures are from the "Interface * Control Document for the RDA/RPG", Build 10.0 Draft, WSR-88D Radar * Operations Center. */ typedef struct { short rpg[6]; /* 12 bytes inserted by RPG Communications Mgr. Ignored. */ unsigned short msg_size; /* Message size for this segment, in halfwords */ unsigned char channel; /* RDA Redundant Channel */ unsigned char msg_type; /* Message type. For example, 31 */ unsigned short id_seq; /* Msg seq num = 0 to 7FFF, then roll over to 0 */ unsigned short msg_date; /* Modified Julian date from 1/1/70 */ unsigned int msg_time; /* Packet generation time in ms past midnight */ unsigned short num_segs; /* Number of segments for this message */ unsigned short seg_num; /* Number of this segment */ } Wsr88d_msg_hdr; typedef struct { char radar_id[4]; unsigned int ray_time; /* Data collection time in milliseconds past midnight GMT */ unsigned short ray_date; /* Julian date - 2440586.5 (1/01/1970) */ unsigned short azm_num ; /* Radial number within elevation scan */ float azm; /* Azimuth angle in degrees (0 to 359.956055) */ unsigned char compression_code; /* 0 = uncompressed, 1 = BZIP2, 2 = zlib */ unsigned char spare; /* for word alignment */ unsigned short radial_len; /* radial length in bytes, including data header block */ unsigned char azm_res; unsigned char radial_status; unsigned char elev_num; unsigned char sector_cut_num; float elev; /* Elevation angle in degrees (-7.0 to 70.0) */ unsigned char radial_spot_blanking; unsigned char azm_indexing_mode; unsigned short data_block_count; /* Data Block Indexes */ unsigned int vol_const; unsigned int elev_const; unsigned int radial_const; unsigned int field1; unsigned int field2; unsigned int field3; unsigned int field4; unsigned int field5; unsigned int field6; } Ray_header_m31; /* Called Data Header Block in RDA/RPG document. */ typedef struct { char dataname[4]; unsigned int reserved; unsigned short ngates; short range_first_gate; short range_samp_interval; short thresh_not_overlayed; short snr_thresh; unsigned char controlflag; unsigned char datasize_bits; float scale; float offset; } Data_moment_hdr; #define MAX_RADIAL_LENGTH 14288 typedef struct { Ray_header_m31 ray_hdr; float unamb_rng; float nyq_vel; unsigned char data[MAX_RADIAL_LENGTH]; } Wsr88d_ray_m31; void wsr88d_swap_m31_hdr(Wsr88d_msg_hdr *msghdr) { swap_2_bytes(&msghdr->msg_size); swap_2_bytes(&msghdr->id_seq); swap_2_bytes(&msghdr->msg_date); swap_4_bytes(&msghdr->msg_time); swap_2_bytes(&msghdr->num_segs); swap_2_bytes(&msghdr->seg_num); } void wsr88d_swap_m31_ray_hdr(Ray_header_m31 *ray_hdr) { int *data_ptr; swap_4_bytes(&ray_hdr->ray_time); swap_2_bytes(&ray_hdr->ray_date); swap_2_bytes(&ray_hdr->azm_num); swap_4_bytes(&ray_hdr->azm); swap_2_bytes(&ray_hdr->radial_len); swap_4_bytes(&ray_hdr->elev); swap_2_bytes(&ray_hdr->data_block_count); data_ptr = (int *) &ray_hdr->vol_const; for (; data_ptr <= (int *) &ray_hdr->field6; data_ptr++) swap_4_bytes(data_ptr); } void wsr88d_swap_data_hdr(Data_moment_hdr *this_field) { short *halfword; halfword = (short *) &this_field->ngates; for (; halfword < (short *) &this_field->controlflag; halfword++) swap_2_bytes(halfword); swap_4_bytes(&this_field->scale); swap_4_bytes(&this_field->offset); } float wsr88d_get_angle(short bitfield) { short mask = 1; int i; float angle = 0.; float value[13] = {0.043945, 0.08789, 0.17578, 0.35156, .70313, 1.40625, 2.8125, 5.625, 11.25, 22.5, 45., 90., 180.}; /* Find which bits are set and sum corresponding values to get angle. */ bitfield = bitfield >> 3; /* 3 least significant bits aren't used. */ for (i = 0; i < 13; i++) { if (bitfield & mask) angle += value[i]; bitfield = bitfield >> 1; } return angle; } float wsr88d_get_azim_rate(short bitfield) { short mask = 1; int i; float rate = 0.; float value[12] = {0.0109863, 0.021972656, 0.043945, 0.08789, 0.17578, 0.35156, .70313, 1.40625, 2.8125, 5.625, 11.25, 22.5}; /* Find which bits are set and sum corresponding values to get rate. */ bitfield = bitfield >> 3; /* 3 least significant bits aren't used. */ for (i = 0; i < 12; i++) { if (bitfield & mask) rate += value[i]; bitfield = bitfield >> 1; } if (bitfield >> 15) rate = -rate; return rate; } #define WSR88D_MAX_SWEEPS 20 typedef struct { int vcp; int num_cuts; float vel_res; float fixed_angle[WSR88D_MAX_SWEEPS]; float azim_rate[WSR88D_MAX_SWEEPS]; int waveform[WSR88D_MAX_SWEEPS]; int super_res_ctrl[WSR88D_MAX_SWEEPS]; int surveil_prf_num[WSR88D_MAX_SWEEPS]; int doppler_prf_num[WSR88D_MAX_SWEEPS]; } VCP_data; static VCP_data vcp_data; void wsr88d_get_vcp_data(short *msgtype5) { short azim_rate, fixed_angle, vel_res; short sres_and_survprf; /* super res ctrl and surveil prf, one byte each */ short chconf_and_waveform; int i; vcp_data.vcp = (unsigned short) msgtype5[2]; vcp_data.num_cuts = msgtype5[3]; if (little_endian()) { swap_2_bytes(&vcp_data.vcp); swap_2_bytes(&vcp_data.num_cuts); } vel_res = msgtype5[5]; if (little_endian()) swap_2_bytes(&vel_res); vel_res = vel_res >> 8; if (vel_res == 2) vcp_data.vel_res = 0.5; else if (vel_res == 4) vcp_data.vel_res = 1.0; else vcp_data.vel_res = 0.0; /* Get elevation related information for each sweep. */ for (i=0; i < vcp_data.num_cuts; i++) { fixed_angle = msgtype5[11 + i*23]; azim_rate = msgtype5[15 + i*23]; chconf_and_waveform = msgtype5[12 + i*23]; sres_and_survprf = msgtype5[13 + i*23]; vcp_data.doppler_prf_num[i] = msgtype5[23 + i*23]; if (little_endian()) { swap_2_bytes(&fixed_angle); swap_2_bytes(&azim_rate); swap_2_bytes(&chconf_and_waveform); swap_2_bytes(&sres_and_survprf); swap_2_bytes(&vcp_data.doppler_prf_num[i]); } vcp_data.fixed_angle[i] = wsr88d_get_angle(fixed_angle); vcp_data.azim_rate[i] = wsr88d_get_azim_rate(azim_rate); vcp_data.waveform[i] = chconf_and_waveform & 0xff; vcp_data.super_res_ctrl[i] = sres_and_survprf >> 8; vcp_data.surveil_prf_num[i] = sres_and_survprf & 0xff; } } void get_wsr88d_unamb_and_nyq_vel(Wsr88d_ray_m31 *wsr88d_ray, float *unamb_rng, float *nyq_vel) { int dindex, found; short nyq_vel_sh, unamb_rng_sh; found = 0; dindex = wsr88d_ray->ray_hdr.radial_const; if (strncmp((char *) &wsr88d_ray->data[dindex], "RRAD", 4) == 0) found = 1; else { dindex = wsr88d_ray->ray_hdr.elev_const; if (strncmp((char *) &wsr88d_ray->data[dindex], "RRAD", 4) == 0) found = 1; else { dindex = wsr88d_ray->ray_hdr.vol_const; if (strncmp((char *) &wsr88d_ray->data[dindex], "RRAD", 4) == 0) found = 1; } } if (found) { memcpy(&unamb_rng_sh, &wsr88d_ray->data[dindex+6], 2); memcpy(&nyq_vel_sh, &wsr88d_ray->data[dindex+16], 2); if (little_endian()) { swap_2_bytes(&unamb_rng_sh); swap_2_bytes(&nyq_vel_sh); } *unamb_rng = unamb_rng_sh / 10.; *nyq_vel = nyq_vel_sh / 100.; } else { *unamb_rng = 0.; *nyq_vel = 0.; } } int read_wsr88d_ray_m31(Wsr88d_file *wf, int msg_size, Wsr88d_ray_m31 *wsr88d_ray) { int n; float nyq_vel, unamb_rng; /* Read wsr88d ray. */ n = fread(wsr88d_ray->data, msg_size, 1, wf->fptr); if (n < 1) { fprintf(stderr,"read_wsr88d_ray_m31: Read failed.\n"); return 0; } /* Copy data header block to ray header structure. */ memcpy(&wsr88d_ray->ray_hdr, &wsr88d_ray->data, sizeof(Ray_header_m31)); if (little_endian()) wsr88d_swap_m31_ray_hdr(&wsr88d_ray->ray_hdr); /* Retrieve unambiguous range and Nyquist velocity here so that we don't * have to do it for each data moment later. */ get_wsr88d_unamb_and_nyq_vel(wsr88d_ray, &unamb_rng, &nyq_vel); wsr88d_ray->unamb_rng = unamb_rng; wsr88d_ray->nyq_vel = nyq_vel; return 1; } void wsr88d_load_ray_hdr(Wsr88d_ray_m31 *wsr88d_ray, Ray *ray) { int month, day, year, hour, minute, sec; float fsec; Wsr88d_ray m1_ray; Ray_header_m31 ray_hdr; ray_hdr = wsr88d_ray->ray_hdr; m1_ray.ray_date = ray_hdr.ray_date; m1_ray.ray_time = ray_hdr.ray_time; wsr88d_get_date(&m1_ray, &month, &day, &year); wsr88d_get_time(&m1_ray, &hour, &minute, &sec, &fsec); ray->h.year = year + 1900; ray->h.month = month; ray->h.day = day; ray->h.hour = hour; ray->h.minute = minute; ray->h.sec = sec + fsec; ray->h.azimuth = ray_hdr.azm; ray->h.ray_num = ray_hdr.azm_num; ray->h.elev = ray_hdr.elev; ray->h.elev_num = ray_hdr.elev_num; ray->h.unam_rng = wsr88d_ray->unamb_rng; ray->h.nyq_vel = wsr88d_ray->nyq_vel; int elev_index; elev_index = ray_hdr.elev_num - 1; ray->h.azim_rate = vcp_data.azim_rate[elev_index]; ray->h.fix_angle = vcp_data.fixed_angle[elev_index]; ray->h.vel_res = vcp_data.vel_res; if (ray_hdr.azm_res != 1) ray->h.beam_width = 1.0; else ray->h.beam_width = 0.5; /* For convenience, use message type 1 routines to get some values. * First load VCP and elevation numbers into a msg 1 ray. */ m1_ray.vol_cpat = vcp_data.vcp; m1_ray.elev_num = ray_hdr.elev_num; m1_ray.unam_rng = (short) (wsr88d_ray->unamb_rng * 10.); /* Get values from message type 1 routines. */ ray->h.frequency = wsr88d_get_frequency(&m1_ray); ray->h.pulse_width = wsr88d_get_pulse_width(&m1_ray); ray->h.pulse_count = wsr88d_get_pulse_count(&m1_ray); ray->h.prf = (int) wsr88d_get_prf(&m1_ray); ray->h.wavelength = 0.1071; } int wsr88d_get_vol_index(char* dataname) { if (strncmp(dataname, "DREF", 4) == 0) return DZ_INDEX; if (strncmp(dataname, "DVEL", 4) == 0) return VR_INDEX; if (strncmp(dataname, "DSW", 3) == 0) return SW_INDEX; if (strncmp(dataname, "DZDR", 4) == 0) return DR_INDEX; if (strncmp(dataname, "DPHI", 4) == 0) return PH_INDEX; if (strncmp(dataname, "DRHO", 4) == 0) return RH_INDEX; return -1; } #define MAXRAYS_M31 800 #define MAXSWEEPS 20 void wsr88d_load_ray_into_radar(Wsr88d_ray_m31 *wsr88d_ray, int isweep, Radar *radar) { /* Load data into ray structure for each data field. */ int data_index; int *field_offset; int ifield, nfields; int iray; const nconstblocks = 3; Data_moment_hdr data_hdr; int ngates, do_swap; int i, hdr_size; unsigned short item; float value, scale, offset; unsigned char *data; Range (*invf)(float x); float (*f)(Range x); Ray *ray; int vol_index, waveform; char *type_str; int keep_hi_prf_dz = 0; /* TODO: implement an interface for this. */ enum waveforms {surveillance=1, doppler_w_amb_res, doppler_no_amb_res, batch}; nfields = wsr88d_ray->ray_hdr.data_block_count - nconstblocks; field_offset = (int *) &wsr88d_ray->ray_hdr.radial_const; do_swap = little_endian(); iray = wsr88d_ray->ray_hdr.azm_num - 1; for (ifield=0; ifield < nfields; ifield++) { field_offset++; data_index = *field_offset; /* Get data moment header. */ hdr_size = sizeof(data_hdr); memcpy(&data_hdr, &wsr88d_ray->data[data_index], hdr_size); if (do_swap) wsr88d_swap_data_hdr(&data_hdr); data_index += hdr_size; vol_index = wsr88d_get_vol_index(data_hdr.dataname); if (vol_index < 0) { fprintf(stderr,"wsr88d_load_ray_into_radar: Unknown dataname %s. " "isweep = %d, iray = %d.\n", data_hdr.dataname, isweep, iray); return; } switch (vol_index) { case DZ_INDEX: f = DZ_F; invf = DZ_INVF; type_str = "Reflectivity"; break; case VR_INDEX: f = VR_F; invf = VR_INVF; type_str = "Velocity"; break; case SW_INDEX: f = SW_F; invf = SW_INVF; type_str = "Spectrum width"; break; case DR_INDEX: f = DR_F; invf = DR_INVF; type_str = "Diff. Reflectivity"; break; case PH_INDEX: f = PH_F; invf = PH_INVF; type_str = "Diff. Phase"; break; case RH_INDEX: f = RH_F; invf = RH_INVF; type_str = "Correlation Coef (Rho)"; break; } waveform = vcp_data.waveform[isweep]; /* Ignore short-range reflectivity from velocity split cuts unless * keep_hi_prf_dz is set. The indicators for this type of * reflectivity are surveillance mode of 0 and elevation angle * below 6 degrees. */ if (vol_index == DZ_INDEX && (vcp_data.surveil_prf_num[isweep] == 0 && vcp_data.fixed_angle[isweep] < 6.0 && !keep_hi_prf_dz)) continue; /* Load the data for this field. */ if (radar->v[vol_index] == NULL) { radar->v[vol_index] = RSL_new_volume(MAXSWEEPS); radar->v[vol_index]->h.f = f; radar->v[vol_index]->h.invf = invf; radar->v[vol_index]->h.type_str = type_str; } if (radar->v[vol_index]->sweep[isweep] == NULL) { radar->v[vol_index]->sweep[isweep] = RSL_new_sweep(MAXRAYS_M31); radar->v[vol_index]->sweep[isweep]->h.f = f; radar->v[vol_index]->sweep[isweep]->h.invf = invf; } ngates = data_hdr.ngates; ray = RSL_new_ray(ngates); /* Convert data to float, then use range function to store in ray. * Note: data range is 2-255. 0 means signal is below threshold, and 1 * means range folded. */ offset = data_hdr.offset; scale = data_hdr.scale; if (data_hdr.scale == 0) scale = 1.0; data = &wsr88d_ray->data[data_index]; for (i = 0; i < ngates; i++) { if (data_hdr.datasize_bits != 16) { item = *data; data++; } else { item = *(unsigned short *)data; if (do_swap) swap_2_bytes(&item); data += 2; } if (item > 1) value = (item - offset) / scale; else value = (item == 0) ? BADVAL : RFVAL; ray->range[i] = invf(value); ray->h.f = f; ray->h.invf = invf; } wsr88d_load_ray_hdr(wsr88d_ray, ray); ray->h.range_bin1 = data_hdr.range_first_gate; ray->h.gate_size = data_hdr.range_samp_interval; ray->h.nbins = ngates; radar->v[vol_index]->sweep[isweep]->ray[iray] = ray; radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1; } /* for each data field */ } void wsr88d_load_sweep_header(Radar *radar, int isweep) { int ivolume, nrays; Sweep *sweep; Ray *last_ray; for (ivolume=0; ivolume < MAX_RADAR_VOLUMES; ivolume++) { if (radar->v[ivolume] != NULL && radar->v[ivolume]->sweep[isweep] != NULL) { sweep = radar->v[ivolume]->sweep[isweep]; nrays = sweep->h.nrays; if (nrays == 0) continue; last_ray = sweep->ray[nrays-1]; sweep->h.sweep_num = last_ray->h.elev_num; sweep->h.elev = vcp_data.fixed_angle[isweep]; sweep->h.beam_width = last_ray->h.beam_width; sweep->h.vert_half_bw = sweep->h.beam_width / 2.; sweep->h.horz_half_bw = sweep->h.beam_width / 2.; } } } Radar *wsr88d_load_m31_into_radar(Wsr88d_file *wf) { Wsr88d_msg_hdr msghdr; Wsr88d_ray_m31 wsr88d_ray; short non31_seg_remainder[1202]; /* Remainder after message header */ int end_of_vos = 0, isweep = 0; int msg_hdr_size, msg_size, n; int prev_elev_num = 1, prev_raynum = 0, raynum = 0; Radar *radar = NULL; enum radial_status {START_OF_ELEV, INTERMED_RADIAL, END_OF_ELEV, BEGIN_VOS, END_VOS}; /* Message type 31 is a variable length message. All other types consist of * 1 or more segments of length 2432 bytes. To handle all types, we read * the message header and check the type. If not 31, then simply read * the remainder of the 2432-byte segment. If it is 31, use the size given * in message header to determine how many bytes to read. */ n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr); /* printf("msgtype = %d\n", msghdr.msg_type); */ msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg); radar = RSL_new_radar(MAX_RADAR_VOLUMES); while (! end_of_vos) { if (msghdr.msg_type == 31) { if (little_endian()) wsr88d_swap_m31_hdr(&msghdr); /* Get size of the remainder of message. The given size is in * halfwords; convert it to bytes. */ msg_size = (int) msghdr.msg_size * 2 - msg_hdr_size; n = read_wsr88d_ray_m31(wf, msg_size, &wsr88d_ray); if (n <= 0) return NULL; raynum = wsr88d_ray.ray_hdr.azm_num; if (raynum > MAXRAYS_M31) { fprintf(stderr,"Error: raynum = %d, exceeds MAXRAYS_M31" " (%d)\n", raynum, MAXRAYS_M31); fprintf(stderr,"isweep = %d\n", isweep); RSL_free_radar(radar); return NULL; } /* Check for an unexpected start of new elevation, and issue a * warning if this has occurred. This condition usually means * less rays then expected in the sweep that just ended. */ if (wsr88d_ray.ray_hdr.radial_status == START_OF_ELEV && wsr88d_ray.ray_hdr.elev_num-1 > isweep) { fprintf(stderr,"Warning: Radial status is Start-of-Elevation, " "but End-of-Elevation was not\n" "issued for elevation number %d. Number of rays = %d" "\n", prev_elev_num, prev_raynum); wsr88d_load_sweep_header(radar, isweep); isweep++; prev_elev_num = wsr88d_ray.ray_hdr.elev_num - 1; } /* Load ray into radar structure. */ wsr88d_load_ray_into_radar(&wsr88d_ray, isweep, radar); prev_raynum = raynum; /* Check for end of sweep */ if (wsr88d_ray.ray_hdr.radial_status == END_OF_ELEV) { wsr88d_load_sweep_header(radar, isweep); isweep++; prev_elev_num = wsr88d_ray.ray_hdr.elev_num; } } else { /* msg_type not 31 */ n = fread(&non31_seg_remainder, sizeof(non31_seg_remainder), 1, wf->fptr); if (n < 1) { fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: "); if (feof(wf->fptr) != 0) fprintf(stderr, "Unexpected end of file.\n"); else fprintf(stderr,"Read failed.\n"); fprintf(stderr,"Current sweep index: %d\n" "Last ray read: %d\n", isweep, prev_raynum); wsr88d_load_sweep_header(radar, isweep); return radar; } if (msghdr.msg_type == 5) { wsr88d_get_vcp_data(non31_seg_remainder); radar->h.vcp = vcp_data.vcp; } } /* If not at end of volume scan, read next message header. */ if (wsr88d_ray.ray_hdr.radial_status != END_VOS) { n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr); if (n < 1) { fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: "); if (feof(wf->fptr) != 0) fprintf(stderr,"Unexpected end of file.\n"); else fprintf(stderr,"Failed reading msghdr.\n"); fprintf(stderr,"Current sweep index: %d\n" "Last ray read: %d\n", isweep, prev_raynum); wsr88d_load_sweep_header(radar, isweep); end_of_vos = 1; } } else { end_of_vos = 1; wsr88d_load_sweep_header(radar, isweep); } } /* while not end of vos */ return radar; } rsl-v1.43/toga.h0000644000102200007640000002435506600002402010445 00000000000000 /* Darwin data structures and parameters * * Dennis Flanigan, Jr. * Applied Research Corp. * NASA GSFC Code 910.1 * * * added tg_file_str structure 09 Jun 93 ...Mike * * updated with new tg_ray_data structure 5/6/93 ...Mike * This structure is intended to supercede rp_ray * * updated for use with libtg 8/13/92 * * updated 7/13/92 * * 12/31/91 * * */ #define TG_OK 0 #define TG_SYS_ERR -1 #define TG_END_RAY -2 #define TG_END_DATA -3 #define TG_REC_NOSEQ -4 #define TG_RAY_NOTYPE -5 #define TG_RAY_READ_ERR -6 #define TG_HDSIZE 1280 #define TG_RECSIZE 4096 #define TG_ANT_PPI 1 #define TG_ANT_RHI 2 #define TG_ANT_MAN 3 #define TG_ANT_FIL 4 /* field indices for tg_ray_data.da_inv */ #define TG_DM_IND 0 /* uncorrected reflectivity */ #define TG_DZ_IND 1 /* corrected reflectivity */ #define TG_VR_IND 2 /* radial velocity */ #define TG_SW_IND 3 /* spectral width */ /* missing data flag */ #define TG_NO_DATA 0x1000 #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif /****** rp_ray is the old, outdated structure in which to store (toga format-encoded) ray data. I have removed references to it in the toga library libtg.a . Use instead the tg_ray_data structure below, in which decoded ray data is stored....Mike */ typedef struct { float elev; float azm; short bin[1800]; /* raw (encoded) ray data in toga format */ } rp_ray; typedef struct { float azm; /* azimuth angle */ float elev; /* elevation angle */ /* time */ /* time of some sort (not done yet) */ int da_inv[4]; /* data inventory */ short num_bins[4]; /* number of bins */ float start_km[4]; /* start range of data in km*/ float interval_km[4]; /* interval of range bins in km */ float data[4][1024]; /* real value data */ } tg_ray_data; typedef struct { short axrat; /* axial ratio in signed hundredths */ short ort_hor; /* orientation ccw of horizontal in degrees */ short pw_div_bits; /* power divider bits (A) in low 7 bits */ short delay_bits; /* delay bits (P) in low 7 bits */ } tg_tran_pol_str; typedef struct { /* storm id : word 1*/ short strm_year; short strm_mon; short strm_day; short strm_num; short map_num; /* time of start of scan : word 6*/ short scan_year; short scan_mon; short scan_day; short scan_hour; short scan_min; short scan_sec; /* word 12 */ short data_set; /* transmit polarization 1.1 : word 13*/ short tp1_ar; short tp1_occw; short tp1_dibit; short tp1_debit; /* transmit polarization 1.2 : word 17*/ short tp2_ar; short tp2_occw; short tp2_dibit; short tp2_debit; /* status bits : word 21*/ short status; /* word 22 */ short strng; /* start range */ short numbin; /* number of data bins */ short rnginc; /* range increment between bins */ short rngjit; /* range jitter boollean */ short numcbin; /* number of range cal bins */ short strtcal1; /* start range of cal bins #1 */ short strtcal2; /* start range if cak bubs #2 */ short stepcal; /* step between cal bins 1 & 3 and 2 & 4 */ short azmleft; /* azimuth left, min azimuth */ short azmrght; /* azimuth right, max azimuth */ short elev_low; /* elevation low */ short elev_hgh; /* elevation high */ /* word 34 */ short at_angres; /* attempted angular res */ short numfix_ang; /* num fixed angles used */ short angfix[20]; /* angles used for fixed coordinate */ /* word 56 */ short rlparm; /* real time display parameters */ short signois; /* signal to noise threshold */ short sigcltr; /* signal to clutter threshold */ short thrsh_flg; /* threshold flags */ /* word 60 */ short numdsp; /* number of doppler signal processors working */ short numwrd; /* number of words which are difined in ray header */ /* word 62 */ short scanmod; /* scan mode */ char filename[16]; /* file name if scan mode is file (value 4)*/ /* word 71 */ short prf; /* prf */ short transiz; /* number of samp per proc interval (transform size) */ short spconf; /* signal processor configuration */ /* word 74 */ short sufchar; /* suffix character of data base directory */ /* word 75 */ short recsat1; /* receiver saturation or */ short recsat2; /* 0 if standard rang-dependent STC was used */ /*words 77 to 88 : bias levels set to zeor if not applicable */ /* word 77 */ short dsp1cor_log; /* co rec dsp 1, log rec noise level */ short dsp1cor_iad; /* co rec dsp 1, "I" a/d offset */ short dsp1cor_qad; /* co rec dsp 1, "Q" a/d offset */ /* word 80 */ short dsp1crr_log; /* cross rec dsp 1, log rec noise level */ short dsp1crr_iad; /* cross rec dsp 1, "I" a/d offset */ short dsp1crr_qad; /* cross rec dsp 1, "Q" a/d offset */ /* word 83 */ short dsp2cor_log; /* co rec dsp 2, log rec noise level */ short dsp2cor_iad; /* co rec dsp 2, "I" a/d offset */ short dsp2cor_qad; /* co rec dsp 2, "Q" a/d offset */ /* word 86 */ short dsp2crr_log; /* cross rec dsp 2, log rec noise level */ short dsp2crr_iad; /* cross rec dsp 2, "I" a/d offset */ short dsp2crr_qad; /* cross rec dsp 2, "Q" a/d offset */ /* word 89 */ short wavelen; /* wavelength in hundredths of cm */ short pulsewd; /* pulse width in hundredths of microsec. */ short hortran_pow; /* horizontal transmit power */ short vertran_pow; /* vertical transmit power */ /* word 93 */ short high_zero; /* height of zeroing in kilomiters */ short sitelat; /* latitude in .01 deg (if zero see words 108-111)*/ short sitelong; /* longitude in .01 deg (if zero see words 108-111)*/ short time_zone; /* time zone of rec time, minutes ahead of GMT */ /* word 97 */ short zm_dsp1_mas; /* Z slope, dsp 1, master board */ short zm_dsp1_slv; /* Z slope, dsp 1, slave board */ short zm_dsp2_mas; /* Z slope, dsp 2, master board */ short zm_dsp2_slv; /* Z slope, dsp 2, slave board */ /* word 101 */ short minz_dsp1_mas; /* minimum detectable Z, dsp 1, master */ short minz_dsp1_slv; /* minimum detectable Z, dsp 1, slave */ short minz_dsp2_mas; /* minimum detectable Z, dsp 2, master */ short minz_dsp2_slv; /* minimum detectable Z, dsp 2, slave */ /* word 105 */ short num_pol; /* number of polarization pairs used above 1 */ /* word 106 */ short exinfo_rayhd; /* extra information in ray header */ /* bit 0 : IFF data available */ /* bit 1 : roll available */ /* bit 2 : pitch available */ /* bit 3 : heading available */ /* word 107 */ short len_exhd; /* length of extended ray header ( 0 means 20 words) */ /* word 108 */ short lat_deg; /* latitude degrees */ short lat_hun_min; /* latitude in .01 minutes */ short lon_deg; /* longitude degrees */ short lon_hun_min; /* longitude in .01 minutes */ /* word 112 */ short alt_atn; /* altitude of antenna in meters above sea level*/ short alt_grn; /* altitude of ground at radar site in meters */ /* word 114 */ short vel_plat; /* speed of platform from senser in .01 meters/sec */ short vel_cor; /* velocity value loaded into dsp for vel correction */ short head_plat; /* heading of platform from sensor in .1 degrees */ short head_dsp; /* heading loaded into dsp */ /* word 118 */ short set_plat; /* set of platform (signed 1/10 degrees) */ short drift_plat; /* drift of platform (1/100 meters per sec */ short ok_plat; /* ok flags for words 108 to 120 */ /* bit 0: navigator input ok */ /* bit 1: navigator used for lat, long */ /* bit 2: navigator used for altitude */ /* bit 3: navigator used for speed and heading */ /* bit 4: mavigator used for set and drift */ /* word 121 */ short spare121[79]; /* word 200 */ tg_tran_pol_str tp21; /* transmit polarization 2.1 */ tg_tran_pol_str tp22; /* transmit polarization 2.2 */ /* word 208 */ tg_tran_pol_str tp31; /* transmit polarization 3.1 */ tg_tran_pol_str tp32; /* transmit polarization 3.2 */ /* word 216 */ tg_tran_pol_str tp41; /* transmit polarization 4.1 */ tg_tran_pol_str tp42; /* transmit polarization 4.2 */ /* word 224 */ tg_tran_pol_str tp51; /* transmit polarization 5.1 */ tg_tran_pol_str tp52; /* transmit polarization 5.2 */ /* word 232 */ tg_tran_pol_str tp61; /* transmit polarization 6.1 */ tg_tran_pol_str tp62; /* transmit polarization 6.2 */ /* word 240 */ tg_tran_pol_str tp71; /* transmit polarization 7.1 */ tg_tran_pol_str tp72; /* transmit polarization 7.2 */ /* word 248 */ tg_tran_pol_str tp81; /* transmit polarization 8.1 */ tg_tran_pol_str tp82; /* transmit polarization 8.2 */ /* word 255 */ short spare255[55]; /* word 301 */ char comments[680]; } tg_map_head_str; typedef struct { short first_ray; short rec_num; short rec_bol; short res1; short data[2044]; } tg_data_rec_str; typedef struct { short azm; short elev; short year; short mon; short day; short hour; short min; short hunsec; short tilt; short step; short type; short strt_rng; short srngkill; short erngkill; short spare[6]; } tg_ray_head_str; /* tg_file_str contains all info relevant to one open toga data file */ typedef struct { int fd; int ray_num; int swap_bytes; short dec_buf[32768]; /*** Buffer and pointers for tg_read_map_bytes. */ int buf_ind; int buf_end; /****************/ tg_data_rec_str recbuf; /*** buffer and indices for tg_read_rec_bytes. */ int first_rec; int data_ind; int recnum; /*************/ tg_map_head_str map_head; tg_ray_head_str ray_head; tg_ray_data ray; } tg_file_str; rsl-v1.43/toolkit_memory_mgt.c0000644000102200007640000001516107634130443013444 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBTSDISTK /****************************************************************** Memory management functions used for the dynamic allocation/ deallocation of TSDIS Toolkit GV_Level_1 structures, created when reading/writing to an HDF file. Functions herein are called by RSL_radar_to_hdf() and RSL_hdf_to_radar(). *******************************************************************/ /* TSDIS toolkit function and structure definitions. */ #include "IO.h" #include "IO_GV.h" /* ------ Functions defined in this file. ------- */ /* void TKfreeGVL1(L1B_1C_GV *gvl1); int8 ***TKnewParmData1byte(int nsweep, int nray, int ncell); int16 ***TKnewParmData2byte(int nsweep, int nray, int ncell); PARAMETER *TKnewGVL1parm(void); L1B_1C_GV *TKnewGVL1(void); */ /*************************************************************/ /* */ /* TKfreeGVL1 */ /* */ /*************************************************************/ void TKfreeGVL1(L1B_1C_GV *gvl1) { /* Frees all memory which was (dynamically) allocated to the toolkit 'L1B_1C_GV' structure, and associated substructures. */ int pindex; for (pindex=0; pindexsensor.parm[pindex] != NULL) { if (gvl1->sensor.parm[pindex]->parmData1byte != NULL) { free(gvl1->sensor.parm[pindex]->parmData1byte[0][0]); free(gvl1->sensor.parm[pindex]->parmData1byte[0]); free(gvl1->sensor.parm[pindex]->parmData1byte); } /* end if (gvl1->sensor.parm[pindex]->parmData1byte != NULL) */ else if (gvl1->sensor.parm[pindex]->parmData2byte != NULL) { free(gvl1->sensor.parm[pindex]->parmData2byte[0][0]); free(gvl1->sensor.parm[pindex]->parmData2byte[0]); free(gvl1->sensor.parm[pindex]->parmData2byte); } /* end if (gvl1->sensor.parm[pindex]->parmData1byte != NULL) */ free(gvl1->sensor.parm[pindex]); } /* end if (gvl1->sensor.parm[pindex] != NULL)*/ } /* end for (pindex=0;*/ free(gvl1); } /*************************************************************/ /* */ /* TKnewParmData1byte */ /* */ /*************************************************************/ int8 ***TKnewParmData1byte(int nsweep, int nray, int ncell) { /* Allocates memory for indexed storage of a 3_dimensional array of 1_byte mask values associated with one parameter of the toolkit 'L1B_1C_GV' structure. */ int8 ***parmData1byte; int8 **ray; int8 *data; int sindex, rindex; /* Vector for 'nsweep' sweep pointers. */ parmData1byte = (int8 ***)calloc(nsweep, sizeof(int8 **)); /* 2D array for 'nsweep*nray' ray pointers. */ ray = (int8 **)calloc(nsweep*nray, sizeof(int8 *)); /* 3D array for data. */ data = (int8 *)calloc(nsweep*nray*ncell, sizeof(int8)); /* Fill all the sweep and ray pointer slots created above. */ for (sindex=0; sindexparmData1byte = (int8 ***)NULL; parm->parmData2byte = (int16 ***)NULL; return(parm); } /*************************************************************/ /* */ /* TKnewGVL1 */ /* */ /*************************************************************/ L1B_1C_GV *TKnewGVL1(void) { /* Allocates memory for a 'L1B_1C_GV' structure. */ L1B_1C_GV *gvl1; int pindex; gvl1 = (L1B_1C_GV *)calloc(1, sizeof(L1B_1C_GV)); for (pindex=0; pindexsensor.parm[pindex] = (PARAMETER *)NULL; return(gvl1); } #endif rsl-v1.43/missing0000644000102200007640000001421307022643702010743 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -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 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 lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. 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 missing on your system. You should only need it if you modified \`configure.in'. 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 missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. 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.in` 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 missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. 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 ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 missing on your system. 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 ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. 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 prerequirements 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 rsl-v1.43/cube.c0000644000102200007640000002067307634130063010440 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Mike Kolander * Space Applications Corporation * NASA/Goddard 910.1 */ #include #include #include "rsl.h" extern int radar_verbose_flag; /*************************************************************/ /* */ /* RSL_free_slice */ /* */ /*************************************************************/ void RSL_free_slice(Slice *slice) { /* Frees memory allocated to a slice structure, and associated pointer and data arrays. */ if (slice != NULL) { if (slice->data != NULL) { if (slice->data[0] != NULL) free(slice->data[0]); /* Free the 2D data array. */ free(slice->data); /* Free the vector of pointers. */ } free(slice); /* Free the slice structure. */ } } /*************************************************************/ /* */ /* RSL_new_slice */ /* */ /*************************************************************/ Slice *RSL_new_slice(int nrows, int ncols) { /* Allocates memory for a slice structure, and associated pointer and data arrays. */ Slice *s; Slice_value *data; int row; /* Allocate a slice. */ s = (Slice *)calloc(1, sizeof(Slice)); if (s == NULL) perror("RSL_new_slice"); /* Allocate a vector of 'nrows' pointers. */ s->data = (Slice_value **)calloc(nrows, sizeof(Slice_value *)); if (s->data == NULL) perror("RSL_new_slice"); /* Allocate a 2 dimensional array for the actual data values. */ data = (Slice_value *)calloc(nrows*ncols, sizeof(Slice_value)); if (data == NULL) perror("RSL_new_slice"); /* Fill all the 'nrows' pointer slots created above. */ for (row=0; rowdata[row] = data + row*ncols; return(s); } /*************************************************************/ /* */ /* RSL_new_cube */ /* */ /*************************************************************/ Cube *RSL_new_cube(int ncarpi) { /* Allocate memory for a cube structure, and an associated array of carpi pointers. */ Cube *cube; cube = (Cube *) calloc(1, sizeof(Cube)); if (cube == NULL) return(NULL); cube->carpi = (Carpi **) calloc(ncarpi, sizeof(Carpi *)); if (cube->carpi == NULL) return(NULL); return(cube); } /*************************************************************/ /* */ /* RSL_free_cube */ /* */ /*************************************************************/ void RSL_free_cube(Cube *cube) { /* Frees memory allocated to a cube structure and associated carpi structures. */ int j; if (cube != NULL) { if (cube->carpi != NULL) { for (j=0; jnz; j++) if (cube->carpi[j] != NULL) RSL_free_carpi(cube->carpi[j]); free(cube->carpi); } free(cube); } } /*************************************************************/ /* */ /* RSL_volume_to_cube */ /* */ /*************************************************************/ Cube *RSL_volume_to_cube(Volume *v, float dx, float dy, float dz, int nx, int ny, int nz, float grnd_r, int radar_x, int radar_y, int radar_z) /* radar_z = 0 is the only thing that makes sense. Why pass it? */ { float lat=0; float lon=0; int i; Cube *cube; if (v == NULL) return NULL; /* check validity of radar site coordinates in cube. */ if (radar_z != 0) return NULL; if ((radar_x < 0) || (radar_x > nx)) return NULL; if ((radar_y < 0) || (radar_y > ny)) return NULL; cube = (Cube *)RSL_new_cube(nz); if (cube == NULL) return NULL; cube->nx = nx; cube->ny = ny; cube->nz = nz; cube->dx = dx; cube->dy = dy; cube->dz = dz; if (v->h.type_str != (char *) NULL) cube->data_type = (char *)strdup(v->h.type_str); cube->lat = lat; cube->lon = lon; /* Create nz carpis */ for (i=0; icarpi[i] = (Carpi *)RSL_volume_to_carpi(v, (i+1)*dz, grnd_r, dx, dy, nx, ny, radar_x, radar_y, lat, lon); return cube; } /*************************************************************/ /* */ /* RSL_get_slice_from_cube */ /* */ /*************************************************************/ Slice *RSL_get_slice_from_cube(Cube *cube, int x, int y, int z) /* Check validity of parameters x,y,z , which define the plane of the required slice. Two of the three parameters must equal -1 and the third must be nonnegative; eg, the vertical plane y=100 is specified by the parameters x=-1, y=100, z=-1 Assumes valid ranges for x, y, z are: 0 <= x <= nx-1 , 0 <= y <= ny-1 , 1 <= z <= nz The range of z starts at 1 , since a cappi (or carpi) at height z=0 makes no sense. */ { int i, j; Slice *slice; if (cube == NULL) return(NULL); /* Slice defined by the plane y = const */ if ((x == -1) && (z == -1) && (y > -1) && (y < cube->ny)) { slice = (Slice *) RSL_new_slice(cube->nz, cube->nx); slice->data_type = (char *)strdup(cube->data_type); slice->dx = cube->dx; slice->dy = cube->dz; slice->nx = cube->nx; slice->ny = cube->nz; slice->f = cube->carpi[0]->f; slice->invf = cube->carpi[0]->invf; /* Retrieve the required data values from the cube and place into the slice structure. */ for (j=0; jnz; j++) for (i=0; inx; i++) slice->data[j][i] = (Slice_value) cube->carpi[j]->data[y][i]; } /* Slice defined by the plane x = const */ else if ((y == -1) && (z == -1) && (x > -1) && (x < cube->nx)) { slice = (Slice *) RSL_new_slice(cube->nz, cube->ny); slice->data_type = (char *)strdup(cube->data_type); slice->dx = cube->dy; slice->dy = cube->dz; slice->nx = cube->ny; slice->ny = cube->nz; slice->f = cube->carpi[0]->f; slice->invf = cube->carpi[0]->invf; /* Retrieve the required data values from the cube and place into the slice structure. */ for (j=0; jnz; j++) for (i=0; iny; i++) slice->data[j][i] = (Slice_value) cube->carpi[j]->data[i][x]; } /* Want slice defined by the plane z = const ; ie, a carpi */ else if ((x == -1) && (y == -1) && (z > 0) && (z <= cube->nz)) { slice = (Slice *) RSL_new_slice(cube->ny, cube->nx); slice->data_type = (char *)strdup(cube->data_type); slice->dx = cube->dx; slice->dy = cube->dy; slice->nx = cube->nx; slice->ny = cube->ny; slice->f = cube->carpi[z-1]->f; slice->invf = cube->carpi[z-1]->invf; /* Just copy carpi data values into slice structure. */ for (j=0; jny; j++) for (i=0; inx; i++) slice->data[j][i] = (Slice_value) cube->carpi[z-1]->data[j][i]; } else /* Invalid parameters. */ { if (radar_verbose_flag) { fprintf(stderr,"\nRSL_get_slice_from_cube(): passed invalid parameters\n"); fprintf(stderr,"nx:%d ny:%d nz:%d x:%d y:%d z:%d\n",cube->nx, cube->ny,cube->nz,x,y,z); } return(NULL); } return(slice); } rsl-v1.43/radar_to_hdf_2.c0000644000102200007640000007515407634130357012371 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBTSDISTK /****************************************************************** Subroutines to write one VOS from a RSL radar structure into one 1B-51/1C-51 HDF file. A 1B-51/1C-51 HDF file contains multiple VOS's recorded by a radar site during a 1-hour time period, and the HDF file is named using the date/hour of the constituent VOS's. All functions defined herein build the components of the TSDIS toolkit 'L1B_1C_GV' structure using the data from a RSL radar structure. These functions are executed via a call from the top-level RSL function 'RSL_radar_to_hdf()', defined in RSL file 'radar_to_hdf_1.c'. ----------------------------------------------------------------- Libraries required for execution of this code : -ltsdistk : TSDIS toolkit -lmfhdf -ldf -ljpeg -lz : HDF -lrsl : rsl -lm : C math ----------------------------------------------------------------- *******************************************************************/ #include #include #include #include #include #include #include #include /* TSDIS toolkit function and structure definitions. */ #include "IO.h" #include "IO_GV.h" /* RSL function and structure definitions. */ #include "rsl.h" /* Parameter definitions for 1B-51 and 1C-51 HDF file handling applications using the TSDIS toolkit. */ #include "toolkit_1BC-51_appl.h" /*************************************************************/ /* */ /* Function Prototypes */ /* */ /*************************************************************/ static int julian(int year, int mo, int day); int8 ***parmData1byteBuild(Volume *v, int pindex, VosSize *vs); int16 ***parmData2byteBuild(Radar *radar, PARAMETER_DESCRIPTOR *parmDesc, int vindex, int pindex, VosSize *vs); void cellRangeVectorFill(CELL_RANGE_VECTOR *cellRangeVector, int vindex, int pindex, VosSize *vs); void parmDescFill(PARAMETER_DESCRIPTOR *parmDesc, Radar *radar, int vindex); PARAMETER *parmBuild(Radar *radar, VosSize *vs, int vindex, int pindex); void rayInfoFill(int32 rayInfoInteger[MAX_SWEEP][MAX_RAY][7], float32 rayInfoFloat[MAX_SWEEP][MAX_RAY][4], Radar *radar, VosSize *vs); void sweepInfoFill(SWEEP_INFO sweepInfo[MAX_SWEEP], Radar *radar, VosSize *vs); void radarDescFill(RADAR_DESCRIPTOR *radarDesc, Radar *radar, int vindex, VosSize *vs); void sensorFill(SENSORS *sensor, Radar *radar, VosSize *vs, int productID); struct tm *timeUTC(void); void volDesFill(VOLUME_DESCRIPTORS *volDes, Radar_header *h, VosSize *vs); void commentsFill(char *comments, VosSize *vs, Radar *radar, float *qcParm, int productID); L1B_1C_GV *gvl1Build(Radar *radar, float *qcParm, VosSize *vs, int productID); extern int nextVolume(Radar *radar, int last_volume); extern int radar_verbose_flag; extern Ray *first_ray_in_volume[MAX_RADAR_VOLUMES]; /*************************************************************/ /* */ /* julian */ /* */ /*************************************************************/ static int daytab[2][13] = { {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} }; static int julian(int year, int mo, int day) { /* Converts a calendar date (month, day, year) to a Julian date. Returns: Julian day. */ int leap; leap = (year%4 == 0 && year%100 != 0) || year%400 == 0; return(day + daytab[leap][mo-1]); } /*************************************************************/ /* */ /* parmData1byteBuild */ /* */ /*************************************************************/ int8 ***parmData1byteBuild(Volume *v, int pindex, VosSize *vs) /* Move all data from one mask volume of the RSL structure into the array parmData1byte[][][] . */ { int sindex, rindex, bindex; /* Indices for rsl arrays. */ int tk_sindex, tk_rindex; /* Indices for toolkit arrays. */ int ncell; int8 ***data1byte; Ray *ray; ncell = vs->rsl.ncell[pindex][0]; data1byte = (int8 ***)TKnewParmData1byte(vs->tk.nsweep, vs->rsl.maxNray, ncell); /* Move data values from all non-NULL rsl sweeps into the 'parmData1byte' array. */ sindex = -1; for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { if (vs->tk.ncell[tk_sindex][pindex] == 0) { /* No data from this parm in this physical sweep. Fill bins of this 'parmData1byte' sweep with 0 */ for (rindex=0; rindexrsl.maxNray; rindex++) for (bindex=0; bindexsweep[sindex]->h.nrays; rindex++) { if (v->sweep[sindex]->ray[rindex] == NULL) continue; tk_rindex++; ray = v->sweep[sindex]->ray[rindex]; /* Move the rsl bin values which exist into the 'parmData1byte' ray.*/ for (bindex=0; bindextk.ncell[tk_sindex][pindex]; bindex++) { if (bindex >= ray->h.nbins) /* Short rsl ray? */ data1byte[tk_sindex][tk_rindex][bindex] = (int8) 0; else /* Valid bin */ data1byte[tk_sindex][tk_rindex][bindex] = (int8) ray->range[bindex]; } /* end for (bindex=0... */ /* Fill all remaining bins of 'parmData1byte' ray with 0. */ for (bindex=vs->tk.ncell[tk_sindex][pindex]; bindexrsl.maxNray; rindex++) for (bindex=0; bindexrsl.ncell[pindex][0]; data2byte = (int16 ***)TKnewParmData2byte(vs->tk.nsweep, vs->rsl.maxNray, ncell); v = radar->v[vindex]; /* Move data values from all non-NULL rsl sweeps into the 'parmData2byte' array. */ sindex = -1; for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { if (vs->tk.ncell[tk_sindex][pindex] == 0) { /* No data from this parm in this physical sweep. Fill bins of this 'parmData2byte' sweeps with NO_VALUE. */ for (rindex=0; rindexrsl.maxNray; rindex++) for (bindex=0; bindexsweep[sindex]->h.nrays; rindex++) { if (v->sweep[sindex]->ray[rindex] == NULL) continue; tk_rindex++; ray = v->sweep[sindex]->ray[rindex]; /* Move the rsl bin values which exist into the 'parmData2byte' ray.*/ for (bindex=0; bindextk.ncell[tk_sindex][pindex]; bindex++) { /* if short rsl ray, fill cell with NO_VALUE */ if (bindex >= ray->h.nbins) { data2byte[tk_sindex][tk_rindex][bindex] = (int16) NO_VALUE; continue; } value = v->h.f(ray->range[bindex]); if (value >= NOECHO) /* Handle anomalous condition flags */ { if (value == BADVAL) data2byte[tk_sindex][tk_rindex][bindex] = (int16) NO_VALUE; else if (value == RFVAL) data2byte[tk_sindex][tk_rindex][bindex] = (int16) RNG_AMBIG_VALUE; else if (value == APFLAG) data2byte[tk_sindex][tk_rindex][bindex] = (int16) AP_VALUE; else data2byte[tk_sindex][tk_rindex][bindex] = (int16) NOECHO_VALUE; } else /* Valid rsl data */ { if (vindex == CZ_INDEX) /* Corrected Z data */ { /* CZ = DZ + dzCal - mask_val * X ... From Ferrier memo. */ value = (value + v->h.calibr_const - radar->v[MZ_INDEX]->sweep[sindex]->ray[rindex]->range[bindex] * X); } else if (vindex == CD_INDEX) /* Corrected differential Z data */ { /* CD = ZD - mask_val * X */ value = value - radar->v[MD_INDEX]->sweep[sindex]->ray[rindex]->range[bindex] * X; } /* Apply scale and offset factors, then store value in parmData2byte structure. */ data2byte[tk_sindex][tk_rindex][bindex] = (int16) (value * parmDesc->scaleFactor + parmDesc->offsetFactor); } /* end else Valid rsl data */ } /* end for (bindex=0;... */ /* Fill all remaining bins of 'parmData2byte' ray with NO_VALUE. */ for (bindex=vs->tk.ncell[tk_sindex][pindex]; bindexrsl.maxNray; rindex++) for (bindex=0; bindexnumOfCells = (int32) vs->rsl.ncell[pindex][0]; ray_head = &first_ray_in_volume[vindex]->h; /* Do first cell (m) */ cellRangeVector->distanceToCell[0] = (float32) (ray_head->range_bin1 + 0.5 * ray_head->gate_size); /* Do remaining cells. Just add gate_size to previous cellRange value. */ for (j=1; jnumOfCells; j++) { cellRangeVector->distanceToCell[j] = (float32) (cellRangeVector->distanceToCell[j-1] + ray_head->gate_size); } } /*************************************************************/ /* */ /* parmDescFill */ /* */ /*************************************************************/ void parmDescFill(PARAMETER_DESCRIPTOR *parmDesc, Radar *radar, int vindex) { static char *parm_list[20][3] = { { "Z", "dBz", "Reflectivity" }, { "V", "m/s", "Radial Velocity" }, { "SW", "m2/s2", "Spectral Width" }, { "QCZ", "dBz", "QC'ed Reflectivity" }, { "ZT", "dBz", "Total Reflectivity" }, { "DR", "?", "Differential reflectivity" }, { "LR", "?", "Differential reflectivity" }, { "ZDR", "dB", "Differential Reflectivity" }, { "DM", "dBm", "Received power" }, { "RH", "-", "Correlation Coefficient" }, { "PH", "?", "Phi" }, { "XZ", "dBz", "X-band Reflectivity" }, { "QCZDR", "dB", "QC'ed Differential Reflectivity" }, { "QCMZ", "-", "Z Mask" }, { "QCMZDR", "-", "ZDR Mask" }, { "ZE", "-", "Edited Reflectivity" }, { "VE", "-", "Edited Velocity" }, { "--", "-", "*******" }, { "--", "-", "*******" }, { "--", "-", "*******" } }; strncpy(parmDesc->parmName, parm_list[vindex][0], 7); strncpy(parmDesc->parmDesc, parm_list[vindex][2], 39); strncpy(parmDesc->parmUnits, parm_list[vindex][1], 7); parmDesc->interPulsePeriod = (int16) 0; parmDesc->transFreq = (int16) 1; /* Receiver Bandwidth (MHz) */ parmDesc->receiverBandwidth = (float32) 0.0; /* Pulse width (m) */ parmDesc->pulseWidth = (int16) (300.0 * first_ray_in_volume[vindex]->h.pulse_width); parmDesc->polarTransWave = (int16) 0; parmDesc->numOfsamples = (int16) 0; /* No thresholding done in 1B-51, 1C-51 HDF files. */ strncpy(parmDesc->thresholdField, "NONE", 8); parmDesc->thresholdValue = (float32) 0.0; parmDesc->offsetFactor = (float32) 0.0; if ((vindex == MZ_INDEX) || (vindex == MD_INDEX)) { parmDesc->parmDataType = (int16) 1; /* 1_byte mask value. */ parmDesc->scaleFactor = (float32) 1.0; parmDesc->deletedOrMissDataFlag = (int32) 0; } else /* 2_byte data value. */ { parmDesc->parmDataType = (int16) 2; parmDesc->scaleFactor = (float32) SCALE_FACTOR; parmDesc->deletedOrMissDataFlag = (int32) NO_VALUE; } } /*************************************************************/ /* */ /* parmBuild */ /* */ /*************************************************************/ PARAMETER *parmBuild(Radar *radar, VosSize *vs, int vindex, int pindex) { PARAMETER *parm; /* Allocate memory for a new parameter structure. */ parm = (PARAMETER *)TKnewGVL1parm(); parmDescFill(&parm->parmDesc, radar, vindex); cellRangeVectorFill(&parm->cellRangeVector, vindex, pindex, vs); if ((vindex == MZ_INDEX) || (vindex == MD_INDEX)) /* Mask? */ parm->parmData1byte = (int8 ***)parmData1byteBuild(radar->v[vindex], pindex, vs); else parm->parmData2byte = (int16 ***)parmData2byteBuild(radar, &parm->parmDesc, vindex, pindex, vs); return(parm); } /*************************************************************/ /* */ /* rayInfoFill */ /* */ /*************************************************************/ void rayInfoFill(int32 rayInfoInteger[MAX_SWEEP][MAX_RAY][7], float32 rayInfoFloat[MAX_SWEEP][MAX_RAY][4], Radar *radar, VosSize *vs) /* For each ray in the rsl structure, move ray header info into the arrays rayInfoInteger[][][] and rayInfoFloat[][][]. */ { int tk_sindex, rindex, tk_rindex; double second; Ray_header *ray_head; Sweep *sweep; static int32 julday; static int day=-1; /* For each physical sweep...*/ for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { sweep = vs->rsl.sweep[tk_sindex]; tk_rindex = -1; for (rindex=0; rindexh.nrays; rindex++) { if (sweep->ray[rindex] == NULL) continue; tk_rindex++; /*********** Fill in ray info fields. ***************/ ray_head = &sweep->ray[rindex]->h; /* No. of sweep which contains this ray. */ rayInfoInteger[tk_sindex][tk_rindex][0] = (int32)(tk_sindex + 1); /* Compute Julian Day. Usually do only once per vos. */ if (day != ray_head->day) { day = ray_head->day; /* Note day & julday are static. */ julday = (int32) julian(ray_head->year, ray_head->month, ray_head->day); } rayInfoInteger[tk_sindex][tk_rindex][1] = (int32) julday; rayInfoInteger[tk_sindex][tk_rindex][2] = (int32) ray_head->hour; rayInfoInteger[tk_sindex][tk_rindex][3] = (int32) ray_head->minute; rayInfoInteger[tk_sindex][tk_rindex][5] = (int32) (1000.0 * modf(ray_head->sec, &second)); rayInfoInteger[tk_sindex][tk_rindex][4] = (int32) second; /* Ray status. 0:Normal , 1:Tansition , 2:Bad , 3:Questionable */ /* rayInfoInteger[tk_sindex][tk_rindex][6] = (int32) 0; */ rayInfoFloat[tk_sindex][tk_rindex][0] = (float32) ray_head->azimuth; rayInfoFloat[tk_sindex][tk_rindex][1] = (float32) ray_head->elev; /* Store num_of_samples here instead of power. */ rayInfoFloat[tk_sindex][tk_rindex][2] = (float32) ray_head->pulse_count; /* Store prf here instead of Sweep Rate */ rayInfoFloat[tk_sindex][tk_rindex][3] = (float32) ray_head->prf; } /* end (rindex=0;... */ } /* end for (tk_sindex=0;...*/ } /*************************************************************/ /* */ /* sweepInfoFill */ /* */ /*************************************************************/ void sweepInfoFill(SWEEP_INFO sweepInfo[MAX_SWEEP], Radar *radar, VosSize *vs) { int rindex, tk_sindex; Sweep *sweep; /* For each physical sweep...*/ for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { sweep = vs->rsl.sweep[tk_sindex]; /* Fill in sweep info from the 1st non-NULL rsl ray we find. */ for (rindex=0; rindexh.nrays; rindex++) { if (sweep->ray[rindex] == NULL) continue; strncpy(sweepInfo[tk_sindex].radarName, radar->h.radar_name, 8); /* 1st sweep number (for tsdis structures) is 1 */ sweepInfo[tk_sindex].sweepNum = (int32) (tk_sindex + 1); /* No. of rays in sweep */ sweepInfo[tk_sindex].numRays = (int32) vs->tk.nray[tk_sindex]; sweepInfo[tk_sindex].trueStartAngle = (float32) sweep->ray[rindex]->h.azimuth; if (sweep->ray[sweep->h.nrays-1] != NULL) sweepInfo[tk_sindex].trueStopAngle = (float32) sweep->ray[sweep->h.nrays-1]->h.azimuth; else sweepInfo[tk_sindex].trueStopAngle = (float32) sweepInfo[tk_sindex].trueStartAngle; /* degrees. Only for PPI scans. */ sweepInfo[tk_sindex].fixedAngle = (float32) sweep->h.elev; /* Filter Flag. 0: No filtering, 1: filtered (descr in comment block) */ /* sweepInfo[tk_sindex].filterFlag = (int32) 0; */ break; } } /* end for (tk_sindex=0;... */ } /*************************************************************/ /* */ /* radarDescFill */ /* */ /*************************************************************/ void radarDescFill(RADAR_DESCRIPTOR *radarDesc, Radar *radar, int vindex, VosSize *vs) { strncpy(radarDesc->radarName, radar->h.name, 8); /*radarDesc->radarConstant = (float32) 0.0; radarDesc->nomPeakPower = (float32) 0.0; radarDesc->nomNoisePower = (float32) 0.0; radarDesc->receiverGain = (float32) 0.0; radarDesc->antennaGain = (float32) 0.0; radarDesc->radarSystemGain = (float32) 0.0; */ radarDesc->horBeamWidth = (float32) first_ray_in_volume[vindex]->h.beam_width; radarDesc->verBeamWidth = (float32) first_ray_in_volume[vindex]->h.beam_width; radarDesc->radarType = (int16) 0; /* 0: Ground-based radar */ radarDesc->scanMode = (int16) 1; /* 1: PPI , 3: RHI */ /* radar sweep rate (deg/sec) */ radarDesc->nomScanRate = (float32) (first_ray_in_volume[vindex]->h.sweep_rate * 6.0); /* Following holds only for PPI scans. ??? */ radarDesc->nomStartAngle = (float32) first_ray_in_volume[vindex]->h.azimuth; radarDesc->nomStopAngle = (float32) radarDesc->nomStartAngle; radarDesc->numParmDesc = (int16) vs->tk.nparm; radarDesc->numDesc = (int16) vs->tk.nparm; /* Data compression. Always 0 . Data compression done by HDF.*/ radarDesc->dataComp = (int16) 0; /* Data reduction algorithm. */ radarDesc->dataReductAlg = (int16) 0; /* 0: No reduction */ radarDesc->dataReductParm1 = (float32) 4.0; /* TBD */ radarDesc->dataReductParm2 = (float32) 4.0; /* TBD */ radarDesc->radarLon = (float32) (radar->h.lond + radar->h.lonm/60.0 + radar->h.lons/3600.0); radarDesc->radarLat = (float32) (radar->h.latd + radar->h.latm/60.0 + radar->h.lats/3600.0); /* altitude above Mean Sea Level (km) */ radarDesc->radarAlt = (float32)((float)(radar->h.height) / 1000.0); /* Effective unambiguous velocity (m/s) Leave blank. See range comments below. */ /* if (radar->v[VR_INDEX] != NULL) radarDesc->velocity = (float32) first_ray_in_volume[VR_INDEX]->h.nyq_vel; else radarDesc->velocity = (float32)0.0; */ /* Effective unambiguous range (km). Leave blank. For wsr88d, unambig_range varies with sweep. See range_info_float block. */ /* radarDesc->range = (float32) first_ray_in_volume[vindex]->h.unam_rng; */ /* No. of transmitted freqs */ radarDesc->numTransfreqency = (int16) 1; /* radarDesc->numInterPulsePeriods = (int16) 0; */ /* Freq. GHz. */ radarDesc->frequency1 = (float32) first_ray_in_volume[vindex]->h.frequency; } /*************************************************************/ /* */ /* sensorFill */ /* */ /*************************************************************/ void sensorFill(SENSORS *sensor, Radar *radar, VosSize *vs, int productID) /* Fill the substructures of the sensor data structure using data from the radar structure. */ { int pindex, tk_sindex, vindex; vindex = nextVolume(radar, -1); /* Find 1st non-NULL rsl volume. */ radarDescFill(&sensor->radarDesc, radar, vindex, vs); sweepInfoFill(sensor->sweepInfo, radar, vs); rayInfoFill(sensor->rayInfoInteger, sensor->rayInfoFloat, radar, vs); /* Move data from each of the radar structure volumes into a corresponding L1GV parameter structure. */ if (productID == TK_L1B_GV) { for (pindex=0; pindextk.nparm; pindex++) { sensor->parm[pindex] = (PARAMETER *)parmBuild(radar, vs, vindex, pindex); /* Find the next non-NULL volume in radar structure. */ vindex = nextVolume(radar, vindex); } /* end for (pindex=0; ... */ } else /* 1C-51 */ { /* This is a hatchet job to conform with newest toolkit. The toolkit arbitrarily assumes that the mask volume precedes the corresponding data volume. */ for (pindex=0; pindextk.nparm/2; pindex++) { if (vindex == CZ_INDEX) sensor->parm[pindex] = (PARAMETER *)parmBuild(radar, vs, MZ_INDEX, pindex); else if (vindex == CD_INDEX) sensor->parm[pindex*2] = (PARAMETER *)parmBuild(radar, vs, MD_INDEX, pindex); else continue; sensor->parm[pindex*2+1] = (PARAMETER *)parmBuild(radar, vs, vindex, pindex); /* Find the next non-NULL volume in radar structure. */ vindex = nextVolume(radar, vindex); } /* end for (pindex=0... */ } /* end else 1C-51 */ if (radar_verbose_flag) { for (pindex=0; pindextk.nparm; pindex++) { fprintf(stderr, "Toolkit parameter type : %s '%s'\n", sensor->parm[pindex]->parmDesc.parmDesc, sensor->parm[pindex]->parmDesc.parmName); for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) if (vs->tk.ncell[tk_sindex][pindex] == 0) fprintf(stderr, " tk_sweep[%.2d] elev=%4.1f nrays=%3d cells/ray=%d\n", tk_sindex, sensor->sweepInfo[tk_sindex].fixedAngle, (int)0, vs->tk.ncell[tk_sindex][pindex]); else fprintf(stderr, " tk_sweep[%.2d] elev=%4.1f nrays=%3d cells/ray=%d\n", tk_sindex, sensor->sweepInfo[tk_sindex].fixedAngle, (int)sensor->sweepInfo[tk_sindex].numRays, vs->tk.ncell[tk_sindex][pindex]); } /* end for (pindex=0;... */ } /* end if (radar_verbose_flag) */ } /*************************************************************/ /* */ /* timeUTC */ /* */ /*************************************************************/ struct tm *timeUTC(void) { /* Find the current time (UTC). If success: return pointer to filled time_t structure. If failure: return NULL. */ time_t time_current; /* Get the current system clock time */ time_current = (time_t) time(NULL); if (time_current != -1) /* valid time? */ return(gmtime(&time_current)); /* Convert to UTC and return. */ else return(NULL); /* Couldn't get the current time. */ } /*************************************************************/ /* */ /* volDesFill */ /* */ /*************************************************************/ void volDesFill(VOLUME_DESCRIPTORS *volDes, Radar_header *h, VosSize *vs) { struct tm *time_utc; int32 max_ncell; int pindex; /* Version no. of DORADE specifications used. Currently 1 */ volDes->verNum = (int16) 1; /* No. of this volume scan in granule */ volDes->volNum = (int16) (vs->vos_num + 1); /* Max size of DORADE data record in this VOS. 2bytes x max(ncell) */ max_ncell = 0; for (pindex=0; pindextk.nparm; pindex++) if (vs->tk.ncell[0][pindex] > max_ncell) max_ncell = vs->tk.ncell[0][pindex]; volDes->sizeDataRec = (int32) (2 * max_ncell); strncpy(volDes->projectName, "TRMM GV", 20); volDes->year = (int16) h->year; /* Year of volume scan */ volDes->month = (int16) h->month; /* Month of volume scan */ volDes->day = (int16) h->day; /* Day ... */ volDes->hour = (int16) h->hour; /* Hour ... */ volDes->minute = (int16) h->minute; /* Minute ... */ volDes->second = (int16) floor((double)h->sec); /* Second ... */ /* Flight no. for airborne radar, or IOP no. for ground radar */ strncpy(volDes->flightNum, "***", 8); /* Data product generation facility name */ strncpy(volDes->facName, "TSDIS", 8); /* Get the current time; ie, the time of creation of this hdf file. */ time_utc = timeUTC(); if (time_utc != NULL) /* Valid time? */ { volDes->genYear = (int16) (1900 + time_utc->tm_year); volDes->genMonth = (int16) (time_utc->tm_mon + 1); volDes->genDay = (int16) time_utc->tm_mday; } else /* Couldn't get valid time. */ { volDes->genYear = (int16) 0; volDes->genMonth = (int16) 0; volDes->genDay = (int16) 0; } /* No. of sensor descriptors in this volume scan */ volDes->numSensorDesc = (int16) 1; /* 1 for ground-based radar */ } /*************************************************************/ /* */ /* commentsFill */ /* */ /*************************************************************/ void commentsFill(char *comments, VosSize *vs, Radar *radar, float *qcParm, int productID) { /* Write the following into the comments field of the gvl1 structure: 1. VOS comment_field header line. 2. cell/ray/sweep count. 3. 1C-51 QC parameters, if we're writing a 1C-51 HDF file. */ char buf[256]; int pindex, tk_sindex; /* Write out the dimensions of the toolkit structure which contains this VOS. */ sprintf(buf, "nSweep=%d\n", vs->tk.nsweep); strcat(comments, buf); for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { sprintf(buf, "sweep[%.2d]--\n nRay=%d\n", tk_sindex, vs->tk.nray[tk_sindex]); strcat(comments, buf); for (pindex=0; pindextk.nparm; pindex++) { sprintf(buf, " nCell_parm[%d]=%d\n", pindex, vs->tk.ncell[tk_sindex][pindex]); strcat(comments, buf); } strcat(comments, "\n"); } /* end for (pindex=0 ... */ strcat(comments, "********\n"); /* If 1C-51 file, write out the QC parameters. */ if (productID == TK_L1C_GV) { sprintf(buf, "-hThresh1 %.2f -hThresh2 %.2f -hThresh3 %.2f -zThresh0 %.2f -zThresh1 %.2f -zThresh2 %.2f -zThresh3 %.2f -hFreeze %.2f -dbzNoise %.2f -zCal %.2f\n\n", qcParm[HTHRESH1], qcParm[HTHRESH2], qcParm[HTHRESH3], qcParm[ZTHRESH0], qcParm[ZTHRESH1], qcParm[ZTHRESH2], qcParm[ZTHRESH3], qcParm[HFREEZE], qcParm[DBZNOISE], qcParm[ZCAL]); strcat(comments, buf); } /* end if (productID == TK_L1C_GV) */ } /*************************************************************/ /* */ /* gvl1Build */ /* */ /*************************************************************/ L1B_1C_GV *gvl1Build(Radar *radar, float *qcParm, VosSize *vs, int productID) { /* Build the components of the Toolkit 'L1B_1C_GV' structure using the data from the RSL radar structure. */ L1B_1C_GV *gvl1; /* Allocate memory for a TSDIS level_1 structure. */ gvl1 = (L1B_1C_GV *)TKnewGVL1(); /* Fill the structure, using data from the radar structure. */ commentsFill(gvl1->comments, vs, radar, qcParm, productID); volDesFill(&gvl1->volDes, &radar->h, vs); sensorFill(&gvl1->sensor, radar, vs, productID); return(gvl1); } #endif rsl-v1.43/volume.c0000644000102200007640000015231211477757175011050 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Volume functions coded in this file: * * Default DZ_F and DZ_INVF. For VR, SW, CZ, ZT, DR and LR too. * Volume *RSL_new_volume(int max_sweeps); * Sweep *RSL_new_sweep(int max_rays); * Ray *RSL_new_ray(int max_bins); * Ray *RSL_clear_ray(Ray *r); * Sweep *RSL_clear_sweep(Sweep *s); * Volume *RSL_clear_volume(Volume *v); * void RSL_free_ray(Ray *r); * void RSL_free_sweep(Sweep *s); * void RSL_free_volume(Volume *v); * Ray *RSL_copy_ray(Ray *r); * Sweep *RSL_copy_sweep(Sweep *s); * Volume *RSL_copy_volume(Volume *v); * Ray *RSL_get_ray_from_sweep(Sweep *s, float azim); * float RSL_get_value_from_sweep(Sweep *s, float azim, float r); * float RSL_get_value_from_ray(Ray *ray, float r); * float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h); * Sweep *RSL_get_sweep(Volume *v, float elev); * Ray *RSL_get_ray(Volume *v, float elev, float azimuth); * float RSL_get_value(Volume *v, float elev, float azimuth, float range); * Ray *RSL_get_ray_above(Volume *v, Ray *current_ray); * Ray *RSL_get_ray_below(Volume *v, Ray *current_ray); * Ray *RSL_get_matching_ray(Volume *v, Ray *ray); * int RSL_get_sweep_index_from_volume * * See image_gen.c for the Volume image generation functions. * * See doc/rsl_index.html for HTML formatted documentation. * * All routines herein coded, unless otherwise stated, by: * John Merritt * Space Applications Corporation * * Contributions by * Dennis Flanigan, Jr. * flanigan@lance.colostate.edu */ #include #include #include #include #include int strcasecmp(const char *s1, const char *s2); #define USE_RSL_VARS #include "rsl.h" #define bin_azimuth(x, dx) (float)((float)x/dx) #define bin_elevation(x, dx) (float)((float)x/dx) #define bin_range(x, dx) (float)((float)x/dx) extern int radar_verbose_flag; /* Internal storage conversion functions. These may be any conversion and * may be dynamically defined; based on the input data conversion. If you * change any of the reserved values, ie. values that cannot be converted * from/to internal storage (BADVAL, APFLAG, etc), be sure to change all * functions, both XX_F and XX_INVF to handle it. It is best to have the * reserved values stored at 0, 1, 2, on up. That way you merely need to * provide an offset to the actual conversion function. See 'rsl.h' * for the definition of the reserved values. Currently: BADVAL, RFVAL, * APFLAG, NOECHO. * * The conversion functions may NOT be macros. */ #ifdef USE_TWO_BYTE_PRECISION #define F_FACTOR 100.0 #define F_DR_FACTOR 1000.0 #define F_DZ_RANGE_OFFSET 50 #else #define F_FACTOR 2.0 #define F_DR_FACTOR 10.0 #define F_DZ_RANGE_OFFSET 32 #endif /* #define F_VR_OFFSET 63.5 */ #define F_VR_OFFSET 127.0 #define F_DR_OFFSET 12.0 /* IMPORTANT: This is the offset from reserved values. This * number must be exactly (or >=) the number of * reserved values in XX_F and XX_INVF. * * You must change nsig_to_radar.c where F_OFFSET is used for optimization. */ #define F_OFFSET 4 float DZ_F(Range x) { if (x >= F_OFFSET) /* This test works when Range is unsigned. */ return (((float)x-F_OFFSET)/F_FACTOR - F_DZ_RANGE_OFFSET); /* Default wsr88d. */ if (x == 0) return BADVAL; if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; /* Can't get here, but quiets the compiler. */ } float VR_F(Range x) { float val; if (x >= F_OFFSET) { /* This test works when Range is unsigned. */ val = (((float)x-F_OFFSET)/F_FACTOR - F_VR_OFFSET); /* Default wsr88d coding. */ /* fprintf(stderr, "x=%d, val=%f\n", x, val); */ return val; } if (x == 0) return BADVAL; if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; /* Can't get here, but quiets the compiler. */ } float DR_F(Range x) { /* Differential reflectivity */ float val; if (x >= F_OFFSET) { /* This test works when Range is unsigned. */ val = (((float)x-F_OFFSET)/F_DR_FACTOR - F_DR_OFFSET); return val; } if (x == 0) return BADVAL; if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; /* Can't get here, but quiets the compiler. */ } float LR_F(Range x) {/* From MCTEX */ if (x >= F_OFFSET) /* This test works when Range is unsigned. */ return (float) (x - 250.)/6.; if (x == 0) return BADVAL; if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; } float HC_F(Range x) { /* HydroClass (Sigmet) */ if (x == 0) return BADVAL; return (float)x; } /**************************** Sigmet RhoHV : one_byte values > RohHV = sqrt((N-1)/253) > 0 bad/no value > 1 0.0000 > 2 0.0629 > 128 0.7085 > 253 0.9980 > 254 1.0000 *******************************/ float RH_F(Range x) { if (x == 0) return BADVAL; /* return (float)(sqrt((double)((x-1.0)/253.0))); */ return (float)(x-1) / 65533.; } /***************************** Sigmet PhiDP : one_byte values > PhiDP (mod 180) = 180 * ((N-1)/254) > The range is from 0 to 180 degrees in steps of 0.71 as follows. > 0 bad/no value > 1 0.00 deg > 2 0.71 deg > 101 70.87 deg > 254 179.29 deg ******************************/ float PH_F(Range x) { if (x == 0) return BADVAL; /*return (float)(180.0*((x-1.0)/254.0));*/ return (360.*(x-1.))/65534.; } /* TODO: Should this be 5. cm. instead of 0.5? Or maybe 10. cm.? */ float rsl_kdp_wavelen = 0.5; /* Default radar wavelen = .5 cm. See * nsig_to_radar.c for the code that sets this. */ /* KD_F for 1 or 2 byte. */ float KD_F(Range x) { /****** Commented-out code for 1-byte Sigmet native data format. if (x >= F_OFFSET) { x -= F_OFFSET; if (rsl_kdp_wavelen == 0.0) return BADVAL; if (x < 128) return (float)( -0.25 * pow((double)600.0,(double)((127-x)/126.0)) )/rsl_kdp_wavelen; else if (x > 128) return (float)( 0.25 * pow((double)600.0,(double)((x-129)/126.0)) )/rsl_kdp_wavelen; else return 0.0; } if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; ******/ if (x == 0) return BADVAL; return (x-32768.)/100.; } /* Normalized Coherent Power (DORADE) */ float NP_F(Range x) { if (x == 0) return BADVAL; return (float)(x - 1) / 100.; } /* Standard Deviation (for Dual-pole QC testing.) */ float SD_F(Range x) { if (x == 0) return BADVAL; return (float)x / 100.; } /* Signal Quality Index */ float SQ_F(Range x) { if (x == 0) return BADVAL; return (float)(x-1) / 65533.; } float TI_F(Range x) { if (x >= F_OFFSET) return (float)(x); if (x == 0) return BADVAL; if (x == 1) return RFVAL; if (x == 2) return APFLAG; if (x == 3) return NOECHO; return BADVAL; } float SW_F(Range x) { return VR_F(x); } float CZ_F(Range x) { return DZ_F(x); } float ZT_F(Range x) { return DZ_F(x); } float ZD_F(Range x) { return DR_F(x); } /* Differential reflectivity */ float CD_F(Range x) { return DR_F(x); } /* Differential reflectivity */ float XZ_F(Range x) { return DZ_F(x); } float MZ_F(Range x) { return (float)x; } /* DZ Mask */ float MD_F(Range x) { return MZ_F(x); } /* ZD Mask */ float ZE_F(Range x) { return DZ_F(x); } float VE_F(Range x) { return VR_F(x); } float DM_F(Range x) { return DZ_F(x); } float DX_F(Range x) { return DZ_F(x); } float CH_F(Range x) { return DZ_F(x); } float AH_F(Range x) { return DZ_F(x); } float CV_F(Range x) { return DZ_F(x); } float AV_F(Range x) { return DZ_F(x); } float VS_F(Range x) { return VR_F(x); } float VL_F(Range x) { return VR_F(x); } float VG_F(Range x) { return VR_F(x); } float VT_F(Range x) { return VR_F(x); } float VC_F(Range x) { return VR_F(x); } /* Unfortunately, floats are stored differently than ints/shorts. So, * we cannot simply set up a switch statement and we must test for * all the special cases first. We must test for exactness. */ Range DZ_INVF(float x) { if (x == BADVAL) return (Range)0; if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; if (x < -F_DZ_RANGE_OFFSET) return (Range)0; return (Range)(F_FACTOR*(x+F_DZ_RANGE_OFFSET)+.5 + F_OFFSET); /* Default wsr88d. */ } Range VR_INVF(float x) { if (x == BADVAL) return (Range)0; if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; if (x < -F_VR_OFFSET) return (Range)0; return (Range)(F_FACTOR*(x+F_VR_OFFSET)+.5 + F_OFFSET); /* Default wsr88d coding. */ } Range DR_INVF(float x) /* Differential reflectivity */ { if (x == BADVAL) return (Range)0; if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; if (x < -F_DR_OFFSET) return (Range)0; return (Range)(F_DR_FACTOR*(x + F_DR_OFFSET) + F_OFFSET + 0.5); } Range HC_INVF(float x) /* HydroClass (Sigmet) */ { if (x == BADVAL) return (Range)0; return (Range)(x + 0.5); /* Round */ } Range LR_INVF(float x) /* MCTEX */ { if (x == BADVAL) return (Range)0; if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; return (Range)((6.*x + 250) + 0.5); /* Round */ } /************************** Sigmet RhoHV : one_byte values > RohHV = sqrt((N-1)/253) > 0 bad/no value > 1 0.0000 > 2 0.0629 > 128 0.7085 > 253 0.9980 > 254 1.0000 ****************************/ /* RH_INVF for 1 or 2 byte data. */ Range RH_INVF(float x) { if (x == BADVAL) return (Range)0; /* return (Range)(x * x * 253.0 + 1.0 + 0.5); */ return (Range)(x * 65533. + 1. +.5); } /****************************** Sigmet PhiDP : one_byte values > PhiDP (mod 180) = 180 * ((N-1)/254) > The range is from 0 to 180 degrees in steps of 0.71 as follows. > 0 bad/no value > 1 0.00 deg > 2 0.71 deg > 101 70.87 deg > 254 179.29 deg *******************************/ Range PH_INVF(float x) { if (x == BADVAL) return (Range)0; /* return (Range)((x / 180.0) * 254.0 + 1.0 + 0.5); */ return (Range)(x*65534./360. + 1.0 + 0.5); } /* KD_INVF for 1 or 2 byte data. */ Range KD_INVF(float x) { if (x == BADVAL) return (Range)0; return (Range)(x * 100. + 32768. + 0.5); /****** Old code for 1-byte Sigmet native data format commented-out: if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; if (rsl_kdp_wavelen == 0.0) return (Range)0; if (x < 0) { x = 127 - 126 * (log((double)-x) - log((double)(0.25/rsl_kdp_wavelen))) / log((double)600.0) + 0.5; } else if (x > 0) { x = 129 + 126 * (log((double)x) - log((double)0.25/rsl_kdp_wavelen)) / log((double)600.0) + 0.5; } else { x = 128; } x += F_OFFSET; ******/ } /* Standard Deviation (for Dual-pole QC testing.) */ Range SD_INVF(float x) { if (x == BADVAL) return (Range)0; return (Range)(x * 100.); } /* Signal Quality Index */ Range SQ_INVF(float x) { if (x == BADVAL) return (Range)0; return (Range)(x * 65533. + 1. +.5); } /* Normalized Coherent Power (DORADE) */ Range NP_INVF(float x) { if (x == BADVAL) return (0); return (Range)(x * 100. + 1.); } Range TI_INVF(float x) /* MCTEX */ { if (x == BADVAL) return (Range)0; if (x == RFVAL) return (Range)1; if (x == APFLAG) return (Range)2; if (x == NOECHO) return (Range)3; return (Range)(x); } Range SW_INVF(float x) { return VR_INVF(x); } Range CZ_INVF(float x) { return DZ_INVF(x); } Range ZT_INVF(float x) { return DZ_INVF(x); } Range ZD_INVF(float x) { return DR_INVF(x); } /* Differential reflectivity */ Range CD_INVF(float x) { return DR_INVF(x); } /* Differential reflectivity */ Range XZ_INVF(float x) { return DZ_INVF(x); } Range MZ_INVF(float x) { return (Range)x; } /* DZ Mask */ Range MD_INVF(float x) { return MZ_INVF(x); } /* ZD Mask */ Range ZE_INVF(float x) { return DZ_INVF(x); } Range VE_INVF(float x) { return VR_INVF(x); } Range DM_INVF(float x) { return DZ_INVF(x); } Range DX_INVF(float x) { return DZ_INVF(x); } Range CH_INVF(float x) { return DZ_INVF(x); } Range AH_INVF(float x) { return DZ_INVF(x); } Range CV_INVF(float x) { return DZ_INVF(x); } Range AV_INVF(float x) { return DZ_INVF(x); } Range VS_INVF(float x) { return VR_INVF(x); } Range VL_INVF(float x) { return VR_INVF(x); } Range VG_INVF(float x) { return VR_INVF(x); } Range VT_INVF(float x) { return VR_INVF(x); } Range VC_INVF(float x) { return VR_INVF(x); } /**********************************************************************/ /* M E M O R Y M A N A G E M E N T R O U T I N E S */ /**********************************************************************/ /**********************************************************************/ /* */ /* new_volume */ /* new_sweep */ /* new_ray */ /* */ /**********************************************************************/ Volume *RSL_new_volume(int max_sweeps) { /* * A volume consists of a header section and an array of sweeps. */ Volume *v; v = (Volume *)calloc(1, sizeof(Volume)); if (v == NULL) perror("RSL_new_volume"); v->sweep = (Sweep **) calloc(max_sweeps, sizeof(Sweep*)); if (v->sweep == NULL) perror("RSL_new_volume, Sweep*"); v->h.nsweeps = max_sweeps; /* A default setting. */ return v; } /* * The 'Sweep_list' structure is internal to RSL. It maintains a list * of sweeps allocated and it contains pointers to a hash table of Rays * separately for each sweep. There is no reason to access this internal * structure except when optimizing new RSL routines that access Rays. * Otherwise, the RSL interfaces should suffice. * * The hash table is a means of finding rays, by azimuth, quickly. * To find a ray is simple: use the hash function to get close * to the ray, if not right on it the first time. Collisions of rays in * the hash table are handled by a link list of rays from a hash entry. * Typically, the first ray of the sweep is not the ray with the smallest * azimuth angle. We are confident that the order of Rays in the Sweep * is by azimuth angle, but that cannot be guarenteed. Therefore, this * hash scheme is required. * * The 'Sweep_list' contains the address of the memory allocated to * sweep. The list is sorted by addresses. There is no * memory limit to the number of sweeps. If the number of sweeps exceeds * the current allocation for the Sweep_list, then a new Sweep_list is * allocated, which is bigger, and the old list copied to it. * * Sweep_list is at least as long as the number of sweeps allocated. */ typedef struct { Sweep *s_addr; Hash_table *hash; } Sweep_list; /* * By design of RSL, this should be "#define STATIC static" * * It is OK to "#define STATIC static", but, if you do, then * the examples (run by run_tests in examples/) will fail for * those programs that test these data structures. I normally, * don't set this #define, for that reason. */ #define STATIC STATIC int RSL_max_sweeps = 0; /* Initial allocation for sweep_list. * RSL_new_sweep will allocate the space first * time around. */ STATIC int RSL_nsweep_addr = 0; /* A count of sweeps in the table. */ STATIC Sweep_list *RSL_sweep_list = NULL; STATIC int RSL_nextents = 0; void FREE_HASH_NODE(Azimuth_hash *node) { if (node == NULL) return; FREE_HASH_NODE(node->next); /* Tail recursive link list removal. */ free(node); } void FREE_HASH_TABLE(Hash_table *table) { int i; if (table == NULL) return; for (i=0; inindexes; i++) FREE_HASH_NODE(table->indexes[i]); /* A possible linked list of Rays. */ free(table->indexes); free(table); } void REMOVE_SWEEP(Sweep *s) { int i; int j; /* Find where it goes, split the list and slide the tail down one. */ for (i=0; i= RSL_max_sweeps) { /* Current list is too small. */ RSL_nextents++; new_list = (Sweep_list *) calloc(100*RSL_nextents, sizeof(Sweep_list)); if (new_list == NULL) { perror("INSERT_SWEEP"); exit(2); } /* Copy the old list to the new one. */ for (i=0; ii; j--) RSL_sweep_list[j] = RSL_sweep_list[j-1]; RSL_sweep_list[i].s_addr = s; RSL_sweep_list[i].hash = NULL; RSL_nsweep_addr++; return i; } int SWEEP_INDEX(Sweep *s) { /* Locate the sweep in the RSL_sweep_list. Return the index. */ /* Simple linear search; but this will be a binary search. */ int i; for (i=0; iray = (Ray **) calloc(max_rays, sizeof(Ray*)); if (s->ray == NULL) perror("RSL_new_sweep, Ray*"); s->h.nrays = max_rays; /* A default setting. */ s->h.elev = -999.; s->h.azimuth = -999.; return s; } Ray *RSL_new_ray(int max_bins) { /* * A ray consists of a header section and an array of Range types (floats). */ Ray *r; r = (Ray *)calloc(1, sizeof(Ray)); if (r == NULL) perror("RSL_new_ray"); r->range = (Range *) calloc(max_bins, sizeof(Range)); if (r->range == NULL) perror("RSL_new_ray, Range"); r->h.nbins = max_bins; /* A default setting. */ /* fprintf(stderr,"range[0] = %x, range[%d] = %x\n", &r->range[0], max_bins-1, &r->range[max_bins-1]);*/ return r; } /**********************************************************************/ /* */ /* clear_ray */ /* clear_sweep */ /* clear_volume */ /* */ /**********************************************************************/ Ray *RSL_clear_ray(Ray *r) { if (r == NULL) return r; memset(r->range, 0, sizeof(Range)*r->h.nbins); return r; } Sweep *RSL_clear_sweep(Sweep *s) { int i; if (s == NULL) return s; for (i=0; ih.nrays; i++) { RSL_clear_ray(s->ray[i]); } return s; } Volume *RSL_clear_volume(Volume *v) { int i; if (v == NULL) return v; for (i=0; ih.nsweeps; i++) { RSL_clear_sweep(v->sweep[i]); } return v; } /**********************************************************************/ /* */ /* free_ray */ /* free_sweep */ /* free_volume */ /* */ /**********************************************************************/ void RSL_free_ray(Ray *r) { if (r == NULL) return; if (r->range) free(r->range); free(r); } void RSL_free_sweep(Sweep *s) { int i; if (s == NULL) return; for (i=0; ih.nrays; i++) { RSL_free_ray(s->ray[i]); } if (s->ray) free(s->ray); REMOVE_SWEEP(s); /* Remove from internal Sweep list. */ free(s); } void RSL_free_volume(Volume *v) { int i; if (v == NULL) return; for (i=0; ih.nsweeps; i++) { RSL_free_sweep(v->sweep[i]); } if (v->sweep) free(v->sweep); free(v); } /**********************************************************************/ /* */ /* copy_ray */ /* copy_sweep */ /* copy_volume */ /* */ /**********************************************************************/ Ray *RSL_copy_ray(Ray *r) { Ray *new_ray; if (r == NULL) return NULL; new_ray = RSL_new_ray(r->h.nbins); new_ray->h = r->h; memcpy(new_ray->range, r->range, r->h.nbins*sizeof(Range)); return new_ray; } Sweep *RSL_copy_sweep(Sweep *s) { int i; Sweep *n_sweep; if (s == NULL) return NULL; n_sweep = RSL_new_sweep(s->h.nrays); if (n_sweep == NULL) return NULL; n_sweep->h = s->h; for (i=0; ih.nrays; i++) { n_sweep->ray[i] = RSL_copy_ray(s->ray[i]); } return n_sweep; } Volume *RSL_copy_volume(Volume *v) { int i; Volume *new_vol; if (v == NULL) return NULL; new_vol = RSL_new_volume(v->h.nsweeps); new_vol->h = v->h; for (i=0; ih.nsweeps; i++) { new_vol->sweep[i] = RSL_copy_sweep(v->sweep[i]); } return new_vol; } /**********************************************************************/ /**********************************************************************/ /* G E N E R A L F U N C T I O N S */ /**********************************************************************/ /**********************************************************************/ double angle_diff(float x, float y) { double d; d = fabs((double)(x - y)); if (d > 180) d = 360 - d; return d; } /**********************************************************************/ /* */ /* RSL_get_next_cwise_ray */ /* Dennis Flanigan */ /* Mods by John Merritt 10/20/95 */ /**********************************************************************/ Ray *RSL_get_next_cwise_ray(Sweep *s, Ray *ray) { /* The fastest way to do this is to gain access to the hash table * which maintains a linked list of sorted rays. */ Hash_table *hash_table; Azimuth_hash *closest; int hindex; float ray_angle; if (s == NULL) return NULL; if (ray == NULL) return NULL; /* Find a non-NULL index close to hindex that we want. */ hash_table = hash_table_for_sweep(s); if (hash_table == NULL) return NULL; /* Nada. */ ray_angle = ray->h.azimuth; hindex = hash_bin(hash_table,ray_angle); /* Find hash entry with closest Ray */ closest = the_closest_hash(hash_table->indexes[hindex],ray_angle); return closest->ray_high->ray; } /**********************************************************************/ /* */ /* RSL_get_next_ccwise_ray */ /* JHM 10/20/95 */ /**********************************************************************/ Ray *RSL_get_next_ccwise_ray(Sweep *s, Ray *ray) { /* The fastest way to do this is to gain access to the hash table * which maintains a linked list of sorted rays. */ Hash_table *hash_table; Azimuth_hash *closest; int hindex; float ray_angle; if (s == NULL) return NULL; if (ray == NULL) return NULL; /* Find a non-NULL index close to hindex that we want. */ hash_table = hash_table_for_sweep(s); if (hash_table == NULL) return NULL; /* Nada. */ ray_angle = ray->h.azimuth; hindex = hash_bin(hash_table,ray_angle); /* Find hash entry with closest Ray */ closest = the_closest_hash(hash_table->indexes[hindex],ray_angle); return closest->ray_low->ray; } /****************************************** * * * cwise_angle_diff * * * * Dennis Flanigan,Jr. 5/17/95 * ******************************************/ double cwise_angle_diff(float x,float y) { /* Returns the clockwise angle difference of x to y. * If x = 345 and y = 355 return 10. * If x = 345 and y = 335 return 350 */ double d; d = (double)(y - x); if (d < 0) d += 360; return d; } /****************************************** * * * ccwise_angle_diff * * * * Dennis Flanigan,Jr. 5/17/95 * ******************************************/ double ccwise_angle_diff(float x,float y) { /* Returns the counterclockwise angle differnce of x to y. * If x = 345 and y = 355 return 350. * If x = 345 and y = 335 return 10 */ double d; d = (double)(x - y); if (d < 0) d += 360; return d; } /***************************************** * * * the_closest_hash * * * * Dennis Flanigan,Jr. 4/29/95 * *****************************************/ Azimuth_hash *the_closest_hash(Azimuth_hash *hash, float ray_angle) { /* Return the hash pointer with the minimum ray angle difference. */ double clow,chigh,cclow; Azimuth_hash *high,*low; if (hash == NULL) return NULL; /* Set low pointer to hash index with ray angle just below * requested angle and high pointer to just above requested * angle. */ /* set low and high pointers to initial search locations*/ low = hash; high = hash->ray_high; /* Search until clockwise angle to high is less then clockwise * angle to low. */ clow = cwise_angle_diff(ray_angle,low->ray->h.azimuth); chigh = cwise_angle_diff(ray_angle,high->ray->h.azimuth); cclow = ccwise_angle_diff(ray_angle,low->ray->h.azimuth); while((chigh > clow) && (clow != 0)) { if (clow < cclow) { low = low->ray_low; high = low->ray_high; /* Not the same low as line before ! */ } else { low = low->ray_high; high = low->ray_high; /* Not the same low as line before ! */ } clow = cwise_angle_diff(ray_angle,low->ray->h.azimuth); chigh = cwise_angle_diff(ray_angle,high->ray->h.azimuth); cclow = ccwise_angle_diff(ray_angle,low->ray->h.azimuth); } if(chigh <= cclow) { return high; } else { return low; } } /*******************************************************************/ /* */ /* get_closest_sweep_index */ /* */ /* Dennis Flanigan, Jr. 5/15/95 */ /*******************************************************************/ int get_closest_sweep_index(Volume *v,float sweep_angle) { Sweep *s; int i,ci; float delta_angle = 91; float check_angle; if(v == NULL) return -1; ci = 0; for (i=0; ih.nsweeps; i++) { s = v->sweep[i]; if (s == NULL) continue; check_angle = fabs((double)(s->h.elev - sweep_angle)); if(check_angle <= delta_angle) { delta_angle = check_angle; ci = i; } } return ci; } /********************************************************************/ /* */ /* RSL_get_closest_sweep */ /* */ /* Dennis Flanigan, Jr. 5/15/95 */ /********************************************************************/ Sweep *RSL_get_closest_sweep(Volume *v,float sweep_angle,float limit) { /* Find closest sweep to requested angle. Assume PPI sweep for * now. Meaning: sweep_angle represents elevation angle from * 0->90 degrees */ Sweep *s; float delta_angle; int ci; if (v == NULL) return NULL; if((ci = get_closest_sweep_index(v,sweep_angle)) < 0) { return NULL; } s = v->sweep[ci]; delta_angle = fabs((double)(s->h.elev - sweep_angle)); if( delta_angle <= limit) { return s; } else { return NULL; } } /**********************************************************************/ /* These are more specific routines to make coding hierarchical. */ /* */ /* done 4/7/95 Ray *RSL_get_ray_from_sweep */ /* done 3/31 float RSL_get_value_from_sweep */ /* done 3/31 float RSL_get_value_from_ray */ /* done 4/1 float RSL_get_value_at_h */ /* */ /**********************************************************************/ Ray *RSL_get_ray_from_sweep(Sweep *s, float ray_angle) { /* Locate the Ray * for ray_angle in the sweep. */ /* Sanity checks. */ if (s == NULL) return NULL; if (ray_angle < 0) ray_angle += 360.0; /* Only positive angles. */ if (ray_angle >= 360) ray_angle -= 360; return RSL_get_closest_ray_from_sweep(s,ray_angle,s->h.horz_half_bw); } /********************************************** * * * hash_bin * * * * Dennis Flanigan, Jr. 4/27/95 * **********************************************/ int hash_bin(Hash_table *table,float angle) { /* Internal Routine to calculate the hashing bin index * of a given angle. */ int hash; float res; res = 360.0/table->nindexes; hash = (int)(angle/res + res/2.0);/*Centered about bin.*/ if(hash >= table->nindexes) hash = hash - table->nindexes; /* Could test see which direction is closer, but * why bother? */ while(table->indexes[hash] == NULL) { hash++; if(hash >= table->nindexes) hash = 0; } return hash; } Hash_table *hash_table_for_sweep(Sweep *s) { int i; i = SWEEP_INDEX(s); if (i==-1) { /* Obviously, an unregistered sweep. Most likely the * result of pointer assignments. */ i = INSERT_SWEEP(s); } if (RSL_sweep_list[i].hash == NULL) { /* First time. Construct the table. */ RSL_sweep_list[i].hash = construct_sweep_hash_table(s); } return RSL_sweep_list[i].hash; } /*********************************************************************/ /* */ /* RSL_get_closest_ray_from_sweep */ /* */ /* Dennis Flanigan 4/30/95 */ /*********************************************************************/ Ray *RSL_get_closest_ray_from_sweep(Sweep *s,float ray_angle, float limit) { /* * Return closest Ray in Sweep within limit (angle) specified * in parameter list. Assume PPI mode. */ int hindex; Hash_table *hash_table; Azimuth_hash *closest; double close_diff; if (s == NULL) return NULL; /* Find a non-NULL index close to hindex that we want. */ hash_table = hash_table_for_sweep(s); if (hash_table == NULL) return NULL; /* Nada. */ hindex = hash_bin(hash_table,ray_angle); /* Find hash entry with closest Ray */ closest = the_closest_hash(hash_table->indexes[hindex],ray_angle); /* Is closest ray within limit parameter ? If * so return ray, else return NULL. */ close_diff = angle_diff(ray_angle,closest->ray->h.azimuth); if(close_diff <= limit) return closest->ray; return NULL; } /*********************************************************************/ /* */ /* Rsl_get_value_from_sweep */ /* */ /*********************************************************************/ float RSL_get_value_from_sweep(Sweep *s, float azim, float r) { /* Locate the polar point (r,azim) in the sweep. */ Ray *ray; if (s == NULL) return BADVAL; ray = RSL_get_ray_from_sweep(s, azim); if (ray == NULL) return BADVAL; return RSL_get_value_from_ray(ray, r); } /*********************************************************************/ /* */ /* RSL_get_range_of_range_index */ /* D. Flanigan 8/18/95 */ /*********************************************************************/ float RSL_get_range_of_range_index(Ray *ray, int index) { if (ray == NULL) return 0.0; if (index >= ray->h.nbins) return 0.0; return ray->h.range_bin1/1000.0 + index*ray->h.gate_size/1000.0; } /************************************/ /* RSL_get_value_from_ray */ /* */ /* Updated 4/4/95 D. Flanigan */ /* */ /************************************/ float RSL_get_value_from_ray(Ray *ray, float r) { int bin_index; float rm; rm = r * 1000; if (ray == NULL) return BADVAL; if(ray->h.gate_size == 0) { if(radar_verbose_flag) { fprintf(stderr,"RSL_get_value_from_ray: ray->h.gate_size == 0\n"); } return BADVAL; } /* range_bin1 is range to center of first bin */ bin_index = (int)(((rm - ray->h.range_bin1)/ray->h.gate_size) + 0.5); /* Bin indexes go from 0 to nbins - 1 */ if (bin_index >= ray->h.nbins || bin_index < 0) return BADVAL; return ray->h.f(ray->range[bin_index]); } /*********************************************************************/ /* */ /* RSL_get_value_at_h */ /* */ /*********************************************************************/ float RSL_get_value_at_h(Volume *v, float azim, float grnd_r, float h) { float elev, r; RSL_get_slantr_and_elev(grnd_r, h, &r, &elev); return RSL_get_value(v, elev, azim, r); } /**********************************************************************/ /* These take a Volume and return the appropriate structure. */ /* */ /* done 4/21/95 Sweep *RSL_get_sweep */ /* done 4/1 Ray *RSL_get_ray */ /* done 4/1 float *RSL_get_value */ /* done 5/3 Ray *RSL_get_ray_above */ /* done 5/3 Ray *RSL_get_ray_below */ /* done 5/12 Ray *RSL_get_ray_from_other_volume */ /* */ /**********************************************************************/ /*********************************************************************/ /* */ /* RSL_get_sweep */ /* */ /* Updated 5/15/95 Dennis Flanigan, Jr. */ /*********************************************************************/ Sweep *RSL_get_sweep(Volume *v, float sweep_angle) { /* Return a sweep with +/- 1/2 beam_width of 'elev', if found. */ int i = 0; if (v == NULL) return NULL; while(v->sweep[i] == NULL) i++; return RSL_get_closest_sweep(v,sweep_angle,v->sweep[i]->h.vert_half_bw); } /*********************************************************************/ /* */ /* RSL_get_ray */ /* */ /*********************************************************************/ Ray *RSL_get_ray(Volume *v, float elev, float azimuth) { /* Locate 'elev' and 'azimuth' in the Volume v by a simple +/- epsilon on * the elevation angle and azimuth angle. */ /* * 1. Locate sweep using azimuth; call RSL_get_sweep. * 2. Call RSL_get_ray_from_sweep */ return RSL_get_ray_from_sweep( RSL_get_sweep( v, elev ), azimuth ); } /*********************************************************************/ /* */ /* RSL_get_value */ /* */ /*********************************************************************/ float RSL_get_value(Volume *v, float elev, float azimuth, float range) { /* Locate 'elev' and 'azimuth' and 'h.elev)) < 0) return NULL; i++; while( i < v->h.nsweeps) { if(v->sweep[i] != NULL) break; i++; } if(i >= v->h.nsweeps) return NULL; return RSL_get_ray_from_sweep(v->sweep[i], current_ray->h.azimuth); } /*********************************************************************/ /* */ /* RSL_get_ray_below */ /* */ /* Updated 5/15/95, Dennis Flanigan, Jr. */ /*********************************************************************/ Ray *RSL_get_ray_below(Volume *v, Ray *current_ray) { int i; if (v == NULL) return NULL; if (current_ray == NULL) return NULL; /* Find index of current Sweep */ if(( i = get_closest_sweep_index(v,current_ray->h.elev)) < 0) return NULL; i--; while( i >= 0) { if(v->sweep[i] != NULL) break; i--; } if(i < 0) return NULL; return RSL_get_ray_from_sweep(v->sweep[i], current_ray->h.azimuth); } /*********************************************************************/ /* */ /* RSL_get_matching_ray */ /* */ /*********************************************************************/ Ray *RSL_get_matching_ray(Volume *v, Ray *ray) { /* * Locate the closest matching ray in the Volume 'v' to 'ray'. * Typically, use this function when finding a similiar ray in another * volume. */ if (v == NULL) return NULL; if (ray == NULL) return NULL; return RSL_get_ray(v, ray->h.elev, ray->h.azimuth); } /*********************************************************************/ /* */ /* RSL_get_first_ray_of_sweep */ /* RSL_get_first_ray_of_volume */ /* */ /*********************************************************************/ Ray *RSL_get_first_ray_of_sweep(Sweep *s) { /* Because a sorting of azimuth angles may have been performed, * we need to test on the ray_num member and look for the smallest * one. */ int i; Ray *r; int smallest_ray_num; r = NULL; smallest_ray_num = 9999999; if (s == NULL) return r; for (i=0; ih.nrays; i++) if (s->ray[i]) { if (s->ray[i]->h.ray_num <= 1) return s->ray[i]; if (s->ray[i]->h.ray_num < smallest_ray_num) { r = s->ray[i]; smallest_ray_num = r->h.ray_num; } } return r; } Ray *RSL_get_first_ray_of_volume(Volume *v) { int i; if (v == NULL) return NULL; for (i=0; ih.nsweeps; i++) if (v->sweep[i]) return RSL_get_first_ray_of_sweep(v->sweep[i]); return NULL; } /*********************************************************************/ /* */ /* RSL_get_first_sweep_of_volume */ /* */ /*********************************************************************/ Sweep *RSL_get_first_sweep_of_volume(Volume *v) { int i; if (v == NULL) return NULL; for (i=0; ih.nsweeps; i++) if (RSL_get_first_ray_of_sweep(v->sweep[i])) return v->sweep[i]; return NULL; } #define N_SPECIAL_NAMES 2 /* * Unfortunately in C, there is no way around initializing static * arrays by specifying repetition. * * There is another solution and that is to have RSL_new_radar set * a flag indicating if the application has called 'RSL_select_fields' * prior to calling the ingest routine. I choose the static = {...}; method * for now. */ /* Could be static and force use of 'rsl_query_field' */ int rsl_qfield[MAX_RADAR_VOLUMES] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /*********************************************************************/ /* */ /* RSL_select_fields */ /* */ /*********************************************************************/ void RSL_select_fields(char *field_type, ...) { /* * 10/15/96 * field_type = Case insensitive: * "all" - default, if never this routine is never called. * "none" - No fields are ingestd. Useful for getting header * information. * "dz" - Ingest DZ volume. * "vr" - Ingest VR volume. * ... - Just list additional fields. * * The last argument must be NULL. This signals this routine * when to stop parsing the field types. * * Action or side-effect: * A second call to this fuction overrides any previous settings. * In other words, multiple calls are not additive. So, to get both * DZ and VR volumes, use: * RSL_select_fields("dz", "vr"); - Read both DZ and VR. * and not: * RSL_select_fields("dz"); - Read only DZ. * RSL_select_fields("vr"); - Read only VR, no DZ. * * An RSL hidden array is set to flag which fields are selected. * This array is examined inside all ingest code. It is not available * to the application. */ va_list ap; char *c_field; int i; for (i=0; i> specified.\n", c_field); } } c_field = va_arg(ap, char *); } if (radar_verbose_flag) fprintf(stderr,"\n"); va_end(ap); } int rsl_query_field(char *c_field) { /* * 10/15/96 * RSL interface, for library code developers, to rsl ingest code, * which is intended to be part of RSL ingest code, which access * the hidden array 'rsl_qfield' and reports if that field is to * be ingested. * * Return 1 if YES, meaning yes ingest this field type. * Return 0 if NO. */ /* * All ingest code is meant to use this routine to decide whether * or not to allocate memory for a field type. For data formats * that are very large, this will help optimize the ingest on * small memory machines and hopefully avoid unnessary swapping. * * LASSEN is a good example where there may be 10 or 12 input field * types, but the application only wants 2 or 3 of them. * * The application interface is RSL_select_fields. */ int i; /* Quiet the compilier when -pedantic. :-) */ RSL_f_list[0] = RSL_f_list[0]; RSL_invf_list[0] = RSL_invf_list[0]; for (i=0; i> specified.\n", c_field); } /* 'i' is the index. Is it set? */ return rsl_qfield[i]; } /* Could be static and force use of 'rsl_query_sweep' */ int *rsl_qsweep = NULL; /* If NULL, then read all sweeps. Otherwise, * read what is on the list. */ #define RSL_MAX_QSWEEP 500 /* It'll be rediculious to have more. :-) */ int rsl_qsweep_max = RSL_MAX_QSWEEP; /*********************************************************************/ /* */ /* RSL_read_these_sweeps */ /* */ /*********************************************************************/ void RSL_read_these_sweeps(char *csweep, ...) { va_list ap; char *c_sweep; int i, isweep; /* "all", "none", "0", "1", "2", "3", ... */ /* # arguments, should be <= 'max # sweeps expected', but, what is it? * We can handle typo's and redundancies. Each is processed in the * order they appear. */ c_sweep = csweep; va_start(ap, csweep); rsl_qsweep_max = -1; if (rsl_qsweep == NULL) rsl_qsweep = (int *)calloc(RSL_MAX_QSWEEP, sizeof(int)); /* else Clear the array - a second call to this function over-rides * any previous settings. This holds even if the second call has * bad arguments. */ else for(i = 0;i< RSL_MAX_QSWEEP; i++) rsl_qsweep[i] = 0; if (radar_verbose_flag) fprintf(stderr,"Selected sweeps for ingest:"); for (;c_sweep; c_sweep = va_arg(ap, char *)) { /* CHECK EACH FIELD. This is a fancier case statement than C provides. */ if (radar_verbose_flag) fprintf(stderr," %s", c_sweep); if (strcasecmp(c_sweep, "all") == 0) { for (i=0; i RSL_MAX_QSWEEP) { if (radar_verbose_flag) fprintf(stderr,"\nRSL_read_these_sweeps: parameter %s not in [0,%d). Ignoring.\n", c_sweep, RSL_MAX_QSWEEP); continue; } if (isweep > rsl_qsweep_max) rsl_qsweep_max = isweep; rsl_qsweep[isweep] = 1; } } if (radar_verbose_flag) fprintf(stderr,"\n"); va_end(ap); } #include void RSL_fix_time (Ray *ray) { struct tm the_time; float fsec; /* Fixes possible overflow values in month, day, year, hh, mm, ss */ /* Normally, ss should be the overflow. This code ensures end of * month, year and century are handled correctly by using the Unix * time functions. */ if (ray == NULL) return; memset(&the_time, 0, sizeof(struct tm)); the_time.tm_sec = ray->h.sec; fsec = ray->h.sec - the_time.tm_sec; the_time.tm_min = ray->h.minute; the_time.tm_hour = ray->h.hour; the_time.tm_mon = ray->h.month - 1; the_time.tm_year = ray->h.year - 1900; the_time.tm_mday = ray->h.day; the_time.tm_isdst = -1; (void) mktime(&the_time); /* The time is fixed. */ ray->h.sec = the_time.tm_sec; ray->h.sec += fsec; ray->h.minute = the_time.tm_min; ray->h.hour = the_time.tm_hour; ray->h.month = the_time.tm_mon + 1; ray->h.year = the_time.tm_year + 1900; ray->h.day = the_time.tm_mday; return; } /*********************************************************************/ /* */ /* RSL_add_dbz_offset_to_ray */ /* */ /*********************************************************************/ /* Add the calibration factor 'dbz_offset' to each ray bin which contains a valid value. */ void RSL_add_dbz_offset_to_ray(Ray *r, float dbz_offset) { int ibin; float val; if (r == NULL) return; for (ibin=0; ibinh.nbins; ibin++) { val = r->h.f(r->range[ibin]); if ( val >= (float)NOECHO ) continue; /* Invalid value */ r->range[ibin] = r->h.invf(val + dbz_offset); } } /*********************************************************************/ /* */ /* RSL_add_dbz_offset_to_sweep */ /* */ /*********************************************************************/ void RSL_add_dbz_offset_to_sweep(Sweep *s, float dbz_offset) { int iray; if (s == NULL) return; for (iray=0; irayh.nrays; iray++) RSL_add_dbz_offset_to_ray(s->ray[iray], dbz_offset); } /*********************************************************************/ /* */ /* RSL_add_dbz_offset_to_volume */ /* */ /*********************************************************************/ void RSL_add_dbz_offset_to_volume(Volume *v, float dbz_offset) { int isweep; if (v == NULL) return; for (isweep=0; isweeph.nsweeps; isweep++) RSL_add_dbz_offset_to_sweep(v->sweep[isweep], dbz_offset); } rsl-v1.43/read_write.c0000644000102200007640000002571611072761356011660 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /**********************************************************************/ /* */ /* RSL_read_ray */ /* RSL_read_sweep */ /* RSL_read_volume */ /* RSL_read_radar */ /* */ /* RSL_write_ray */ /* RSL_write_sweep */ /* RSL_write_volume */ /* RSL_write_radar */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ #include #include #include "rsl.h" extern int radar_verbose_flag; /**********************************************************************/ /**********************************************************************/ /* */ /* I N P U T */ /* */ /**********************************************************************/ /**********************************************************************/ Ray *RSL_read_ray(FILE *fp) { char header_buf[512]; Ray_header ray_h; Ray *r; int nbins; (void)fread(header_buf, sizeof(char), sizeof(header_buf), fp); (void)fread(&nbins, sizeof(int), 1, fp); if (nbins == 0) return NULL; memcpy(&ray_h, header_buf, sizeof(Ray_header)); r = RSL_new_ray(ray_h.nbins); r->h = ray_h; (void)fread(r->range, sizeof(Range), r->h.nbins, fp); return r; } Sweep *RSL_read_sweep(FILE *fp) { char header_buf[512]; Sweep_header sweep_h; int i; Sweep *s; int nrays; (void)fread(header_buf, sizeof(char), sizeof(header_buf), fp); (void)fread(&nrays, sizeof(int), 1, fp); if (nrays == 0) return NULL; if (radar_verbose_flag) fprintf(stderr,"Reading %d rays. ", nrays); memcpy(&sweep_h, header_buf, sizeof(Sweep_header)); if (radar_verbose_flag) fprintf(stderr,"From header info nrays = %d\n", sweep_h.nrays); s = RSL_new_sweep(sweep_h.nrays); s->h = sweep_h; for (i=0; ih.nrays; i++) { s->ray[i] = RSL_read_ray(fp); } return s; } Volume *RSL_read_volume(FILE *fp) { char header_buf[512]; Volume_header vol_h; int i; Volume *v; int nsweeps; (void)fread(header_buf, sizeof(char), sizeof(header_buf), fp); (void)fread(&nsweeps, sizeof(int), 1, fp); if (nsweeps == 0) return NULL; if (radar_verbose_flag) fprintf(stderr,"Reading %d sweeps. ", nsweeps); memcpy(&vol_h, header_buf, sizeof(Volume_header)); if (radar_verbose_flag) fprintf(stderr,"From header info nsweeps = %d\n", vol_h.nsweeps); v = RSL_new_volume(vol_h.nsweeps); v->h = vol_h; for (i=0; ih.nsweeps; i++) { if (radar_verbose_flag) fprintf(stderr,"RSL_read_sweep %d ", i); v->sweep[i] = RSL_read_sweep(fp); } return v; } Radar *set_default_function_pointers(Radar *radar) { int i,j,k; Volume *v; Sweep *s; Ray *r; float (*f[MAX_RADAR_VOLUMES])(Range x); Range (*invf[MAX_RADAR_VOLUMES])(float x); f[DZ_INDEX] = DZ_F; f[VR_INDEX] = VR_F; f[SW_INDEX] = SW_F; f[CZ_INDEX] = CZ_F; f[ZT_INDEX] = ZT_F; f[DR_INDEX] = DR_F; f[LR_INDEX] = LR_F; invf[DZ_INDEX] = DZ_INVF; invf[VR_INDEX] = VR_INVF; invf[SW_INDEX] = SW_INVF; invf[CZ_INDEX] = CZ_INVF; invf[ZT_INDEX] = ZT_INVF; invf[DR_INDEX] = DR_INVF; invf[LR_INDEX] = LR_INVF; if (radar == NULL) return NULL; for (i=0; ih.nvolumes; i++) { v = radar->v[i]; if (v) { for (j=0; jh.nsweeps; j++) { s = v->sweep[j]; if (s) { for (k=0; kh.nrays; k++) { r = s->ray[k]; if (r) { r->h.f = f[i]; r->h.invf = invf[i]; } } s->h.f = f[i]; s->h.invf = invf[i]; } } v->h.f = f[i]; v->h.invf = invf[i]; } } return radar; } Radar *RSL_read_radar(char *infile) { /* On disk each header buffer size is this big to reserve space for * any new members. This will make older radar files readable as * development proceeds. */ char header_buf[512]; Radar_header radar_h; Radar *radar; FILE *fp; int i; int nradar; char title[100]; if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return NULL; } fp = uncompress_pipe(fp); (void)fread(title, sizeof(char), sizeof(title), fp); if (strncmp(title, "RSL", 3) != 0) return NULL; (void)fread(header_buf, sizeof(char), sizeof(header_buf), fp); memcpy(&radar_h, header_buf, sizeof(Radar_header)); radar = RSL_new_radar(MAX_RADAR_VOLUMES); radar->h = radar_h; (void)fread(&nradar, sizeof(int), 1, fp); if (radar_verbose_flag) fprintf(stderr,"Reading %d volumes.\n", nradar); for (i=0; iv[i] = RSL_read_volume(fp); } rsl_pclose(fp); radar = set_default_function_pointers(radar); return radar; } /**********************************************************************/ /**********************************************************************/ /* */ /* O U T P U T */ /* */ /**********************************************************************/ /**********************************************************************/ int RSL_write_ray(Ray *r, FILE *fp) { char header_buf[512]; int n = 0; int zero = 0; memset(header_buf, 0, sizeof(header_buf)); if (r == NULL) { n += fwrite(header_buf, sizeof(header_buf), 1, fp) * sizeof(header_buf); n += fwrite(&zero, sizeof(int), 1, fp) * sizeof(int); return n; } memcpy(header_buf, &r->h, sizeof(r->h)); n += fwrite(header_buf, sizeof(char), sizeof(header_buf), fp); n += fwrite(&r->h.nbins, sizeof(int), 1, fp) * sizeof(int); n += fwrite(r->range, sizeof(Range), r->h.nbins, fp) * sizeof(Range); return n; } int RSL_write_sweep(Sweep *s, FILE *fp) { char header_buf[512]; int i; int n = 0; int zero = 0; memset(header_buf, 0, sizeof(header_buf)); if (s == NULL) { n += fwrite(header_buf, sizeof(header_buf), 1, fp) * sizeof(header_buf); n += fwrite(&zero, sizeof(int), 1, fp) * sizeof(int); return n; } memcpy(header_buf, &s->h, sizeof(s->h)); n += fwrite(header_buf, sizeof(char), sizeof(header_buf), fp); if (radar_verbose_flag) fprintf(stderr,"Expect to output %d rays.\n", s->h.nrays); n += fwrite(&s->h.nrays, sizeof(int), 1, fp) * sizeof(int); for (i=0; ih.nrays; i++) { n += RSL_write_ray(s->ray[i], fp); } return n; } int RSL_write_volume(Volume *v, FILE *fp) { char header_buf[512]; int i; int n = 0; int zero = 0; memset(header_buf, 0, sizeof(header_buf)); if (v == NULL) { /* Special case for missing volume. Volume type * is identified by it ordinal within the array. * See DZ_INDEX, VR_INDEX, and SW_INDEX in volume.h */ /* Write a place holder volume. Just an empty header will do since * the reading code is data driven. */ n += fwrite(header_buf, sizeof(header_buf), 1, fp) * sizeof(header_buf); n += fwrite(&zero, sizeof(int), 1, fp) * sizeof(int); return n; } memcpy(header_buf, &v->h, sizeof(v->h)); n += fwrite(header_buf, sizeof(char), sizeof(header_buf), fp); if (radar_verbose_flag) fprintf(stderr,"Expect to output %d sweeps.\n", v->h.nsweeps); n += fwrite(&v->h.nsweeps, sizeof(int), 1, fp) * sizeof(int); for (i=0; ih.nsweeps; i++) { if (radar_verbose_flag) fprintf(stderr,"write_sweep %d ", i); n += RSL_write_sweep(v->sweep[i], fp); } return n; } int RSL_write_radar_fp(Radar *radar, FILE *fp) { /* On disk each header buffer size is this big to reserve space for * any new members. This will make older radar files readable as * development proceeds. */ char header_buf[512]; int i; int n = 0; int nradar; char title[100]; if (radar == NULL) return 0; memset(title, 0, sizeof(title)); (void)sprintf(title, "RSL v%s. sizeof(Range) %d", RSL_VERSION_STR, sizeof(Range)); n += fwrite(title, sizeof(char), sizeof(title), fp); memset(header_buf, 0, sizeof(header_buf)); memcpy(header_buf, &radar->h, sizeof(radar->h)); n += fwrite(header_buf, sizeof(char), sizeof(header_buf), fp); nradar = radar->h.nvolumes; n += fwrite(&nradar, sizeof(int), 1, fp) * sizeof(int); if (radar_verbose_flag) fprintf(stderr,"Number of volumes to write: %d\n", nradar); for (i=0; iv[i], fp); } if (radar_verbose_flag) fprintf(stderr,"write_radar done. Wrote %d bytes.\n", n); return n; } int RSL_write_radar(Radar *radar, char *outfile) { /* On disk each header buffer size is this big to reserve space for * any new members. This will make older radar files readable as * development proceeds. */ FILE *fp; int n; if (radar == NULL) return 0; if ((fp = fopen(outfile, "w")) == NULL) { perror(outfile); return -1; } n = RSL_write_radar_fp(radar, fp); (void)fclose(fp); return n; } int RSL_write_radar_gzip(Radar *radar, char *outfile) { /* On disk each header buffer size is this big to reserve space for * any new members. This will make older radar files readable as * development proceeds. */ FILE *fp; int n; if (radar == NULL) return 0; if ((fp = fopen(outfile, "w")) == NULL) { perror(outfile); return -1; } fp = compress_pipe(fp); n = RSL_write_radar_fp(radar, fp); rsl_pclose(fp); return n; } rsl-v1.43/hdf_to_radar.c0000644000102200007640000010305707634130300012126 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBTSDISTK /****************************************************************** Reads one volume scan from a HDF file into a RSL radar structure. ----------------------------------------------------------------- Libraries required for execution of this code : -ltsdistk : tsdis toolkit -lmfhdf -ldf -ljpeg -lz : HDF -lrsl : rsl -lm : C math ----------------------------------------------------------------- *******************************************************************/ #include #include #include #include #include #include /* TSDIS toolkit function and structure definitions. */ #include "IO.h" #include "IO_GV.h" /* RSL function and structure definitions. */ #include "rsl.h" /* Parameter definitions for 1B-51 and 1C-51 HDF file handling applications using the TSDIS toolkit. */ #include "toolkit_1BC-51_appl.h" #define MISSING_VAL 0 /*************************************************************/ /* */ /* Function Prototypes */ /* */ /*************************************************************/ void RayFillFrom1B51(Ray *ray, int16 *rayData, PARAMETER_DESCRIPTOR *parmDesc); void RayFillFrom1C51(Ray *ray, int vindex, int16 *rayData, int8 *rayMaskData, PARAMETER_DESCRIPTOR *parmDesc, float calibr); static void Ray_headerFill(Ray *ray, L1B_1C_GV *gvl1, VosSize *vs, int pindex, int tk_sindex, int rindex); Ray *RayBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex, int sindex, int rindex); static void Sweep_headerFill(Sweep *sweep, SENSORS *sensor, int sindex, int nrays); Sweep *SweepBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex, int sindex); static void Volume_headerFill(Volume *volume, char *parmDesc, int vindex, int nsweeps, float calibr); Volume *VolumeBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex); int parmIdentify(char *parmName); static void Radar_headerFill(Radar *radar, L1B_1C_GV *gvl1); Radar *RadarBuild(L1B_1C_GV *gvl1, VosSize *vs, float zCal); int commentsRead(VosSize *vs, float *zCal, char *comments, int productID); static L1B_1C_GV *GVL1Build(IO_HANDLE *granuleHandle, int vosNum, VosSize *vs); int metaDataRead(Radar *radar, IO_HANDLE *granuleHandle); static int hdfFileOpen(char *infile, IO_HANDLE *granuleHandle, char *hdfFileName, int *vosNum); Radar *RSL_hdf_to_radar(char *infile); /* Toolkit memory management functions. */ extern void TKfreeGVL1(L1B_1C_GV *gvl1); extern int8 ***TKnewParmData1byte(int nsweep, int nray, int ncell); extern int16 ***TKnewParmData2byte(int nsweep, int nray, int ncell); extern PARAMETER *TKnewGVL1parm(void); extern L1B_1C_GV *TKnewGVL1(void); static float (*f)(Range x); static Range (*invf)(float x); extern int radar_verbose_flag; static void ymd(int jday, int yy, int *mm, int *dd); static int daytab[2][13] = { {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} }; static void ymd(int jday, int year, int *mm, int *dd) { /* Input: jday, yyyy */ /* Output: mm, dd */ int leap; int i; leap = (year%4 == 0 && year%100 != 0) || year%400 == 0; for (i=0; daytab[leap][i]h.nbins; j++) { if (rayData[j] <= AP_VALUE) /* Handle anomalous condition flags. */ { if (rayData[j] == NO_VALUE) ray->range[j] = invf((float)BADVAL); else if (rayData[j] == RNG_AMBIG_VALUE) ray->range[j] = invf((float)RFVAL); else if (rayData[j] == NOECHO_VALUE) ray->range[j] = invf((float)NOECHO); else ray->range[j] = invf((float)APFLAG); } else /* Valid data value */ { ray->range[j] = invf( (rayData[j] - parmDesc->offsetFactor) / parmDesc->scaleFactor ); } } /* end for (j=0... */ } /*************************************************************/ /* */ /* RayFillFrom1C51 */ /* */ /*************************************************************/ void RayFillFrom1C51(Ray *ray, int vindex, int16 *rayData, int8 *rayMaskData, PARAMETER_DESCRIPTOR *parmDesc, float calibr) { /* Fill the RSL bin slots of one ray of a CZ or a DZ volume using the corresponding ray data and ray_mask data from a 1C-51 HDF file. */ int j; for (j=0; jh.nbins; j++) { if (rayData[j] <= AP_VALUE) /* Handle anomalous condition flags. */ { if (rayData[j] == NO_VALUE) ray->range[j] = invf((float)BADVAL); else if (rayData[j] == RNG_AMBIG_VALUE) ray->range[j] = invf((float)RFVAL); else if (rayData[j] == NOECHO_VALUE) ray->range[j] = invf((float)NOECHO); else ray->range[j] = invf((float)APFLAG); } else /* Valid data value */ { if ((vindex == CZ_INDEX) || (vindex == CD_INDEX)) { if (rayMaskData[j] == 1) ray->range[j] = invf((float)BADVAL); else ray->range[j] = invf( (rayData[j] - parmDesc->offsetFactor) / parmDesc->scaleFactor ); } /* end if (vindex == CZ_INDEX) */ else if (vindex == DZ_INDEX) { ray->range[j] = invf( ((rayData[j] - parmDesc->offsetFactor) / parmDesc->scaleFactor) - calibr + X * rayMaskData[j] ); } /* end else if DZ_INDEX */ else if (vindex == ZD_INDEX) { ray->range[j] = invf( ((rayData[j] - parmDesc->offsetFactor) / parmDesc->scaleFactor) + X * rayMaskData[j] ); } /* end else if ZD_INDEX */ else fprintf(stderr, "RayFillFrom1C51(): Illegal volume index..\n"); } /* else valid data value */ } /* end for (j=0; ... */ } /*************************************************************/ /* */ /* Ray_headerFill */ /* */ /*************************************************************/ void Ray_headerFill(Ray *ray, L1B_1C_GV *gvl1, VosSize *vs, int pindex, int tk_sindex, int rindex) { ray->h.year = (int)gvl1->volDes.year; /* Get calendar date (month, day) from (year, Julian day) */ ymd((int)gvl1->sensor.rayInfoInteger[tk_sindex][rindex][1], ray->h.year, &ray->h.month, &ray->h.day); ray->h.hour = (int)gvl1->sensor.rayInfoInteger[tk_sindex][rindex][2]; ray->h.minute = (int)gvl1->sensor.rayInfoInteger[tk_sindex][rindex][3]; ray->h.sec = (float)(gvl1->sensor.rayInfoInteger[tk_sindex][rindex][4] + gvl1->sensor.rayInfoInteger[tk_sindex][rindex][5]/1000.0); ray->h.azimuth = gvl1->sensor.rayInfoFloat[tk_sindex][rindex][0]; ray->h.ray_num = rindex + 1; ray->h.elev = gvl1->sensor.rayInfoFloat[tk_sindex][rindex][1]; /* degrees */ ray->h.elev_num = tk_sindex + 1; ray->h.gate_size = (int) (gvl1->sensor.parm[pindex]->cellRangeVector.distanceToCell[2] - gvl1->sensor.parm[pindex]->cellRangeVector.distanceToCell[1]); /*meters*/ ray->h.range_bin1 = (int) (gvl1->sensor.parm[pindex]->cellRangeVector.distanceToCell[0] - 0.5 * ray->h.gate_size); /* meters */ ray->h.vel_res = MISSING_VAL; /* ?? */ /* Sweeps/min */ ray->h.sweep_rate = (float)(gvl1->sensor.radarDesc.nomScanRate / 6.0); ray->h.prf = (int)gvl1->sensor.rayInfoFloat[tk_sindex][rindex][3]; ray->h.azim_rate = (float)gvl1->sensor.radarDesc.nomScanRate; ray->h.fix_angle = (float)gvl1->sensor.sweepInfo[tk_sindex].fixedAngle; ray->h.pulse_count = (int)gvl1->sensor.rayInfoFloat[tk_sindex][rindex][2]; /* Pulse width (microsec) */ ray->h.pulse_width = (float)(gvl1->sensor.parm[pindex]->parmDesc.pulseWidth / 300.0); ray->h.beam_width = (float)gvl1->sensor.radarDesc.horBeamWidth; /* Carrier freq (GHz) */ ray->h.frequency = (float)gvl1->sensor.radarDesc.frequency1; /* wavelength (m) */ if (ray->h.frequency != 0.0) ray->h.wavelength = (RSL_SPEED_OF_LIGHT / ray->h.frequency) * 1.0e-9; else ray->h.wavelength = 0.0; ray->h.nyq_vel = (float) (ray->h.prf * ray->h.wavelength / 4.0); if (ray->h.prf != 0) ray->h.unam_rng = (float) RSL_SPEED_OF_LIGHT / (2.0 * ray->h.prf * 1000.0); else ray->h.unam_rng = (float) 0.0; ray->h.nbins = vs->tk.ncell[tk_sindex][pindex]; ray->h.f = f; ray->h.invf = invf; } /*************************************************************/ /* */ /* RayBuild */ /* */ /*************************************************************/ Ray *RayBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex, int tk_sindex, int rindex) { Ray *ray; /* Create a Ray structure. */ ray = RSL_new_ray(vs->tk.ncell[tk_sindex][pindex]); if (ray == NULL) { perror("RayBuild(): RSL_new_ray failed\n"); return(NULL); } Ray_headerFill(ray, gvl1, vs, pindex, tk_sindex, rindex); /* Is this a 1C-51 file? */ if ((strcmp(gvl1->sensor.parm[pindex]->parmDesc.parmName, "QCZ") == 0) || (strcmp(gvl1->sensor.parm[pindex]->parmDesc.parmName, "QCZDR") == 0)) RayFillFrom1C51(ray, vindex, gvl1->sensor.parm[pindex]->parmData2byte[tk_sindex][rindex], gvl1->sensor.parm[pindex-1]->parmData1byte[tk_sindex][rindex], &gvl1->sensor.parm[pindex]->parmDesc, calibr); else /* 1B-51 file */ RayFillFrom1B51(ray, gvl1->sensor.parm[pindex]->parmData2byte[tk_sindex][rindex], &gvl1->sensor.parm[pindex]->parmDesc); return(ray); } /*************************************************************/ /* */ /* Sweep_headerFill */ /* */ /*************************************************************/ void Sweep_headerFill(Sweep *sweep, SENSORS *sensor, int tk_sindex, int nrays) { /* sweep->h.sweep_num filled in VolumeBuild() */ sweep->h.elev = sensor->sweepInfo[tk_sindex].fixedAngle; sweep->h.beam_width = sensor->radarDesc.horBeamWidth; sweep->h.horz_half_bw = sensor->radarDesc.horBeamWidth / 2.0; sweep->h.vert_half_bw = sensor->radarDesc.verBeamWidth / 2.0; sweep->h.nrays = sensor->sweepInfo[tk_sindex].numRays; sweep->h.f = f; sweep->h.invf = invf; } /*************************************************************/ /* */ /* SweepBuild */ /* */ /*************************************************************/ Sweep *SweepBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex, int tk_sindex) { int rindex; Sweep *sweep; /* Create a Sweep structure. */ sweep = RSL_new_sweep(vs->rsl.maxNray); if (sweep == NULL) { perror("SweepBuild(): RSL_new_sweep failed\n"); return(NULL); } /* Initialize the Sweep_header values. */ Sweep_headerFill(sweep, &gvl1->sensor, tk_sindex, vs->rsl.maxNray); /* Loop to fill each of the rays of this rsl sweep structure. */ for (rindex=0; rindextk.nray[tk_sindex]; rindex++) sweep->ray[rindex] = RayBuild(gvl1, vs, calibr, vindex, pindex, tk_sindex, rindex); return(sweep); } /*************************************************************/ /* */ /* Volume_headerFill */ /* */ /*************************************************************/ void Volume_headerFill(Volume *volume, char *parmDesc, int vindex, int nsweeps, float calibr) { if (vindex == DZ_INDEX) volume->h.type_str = strdup("Reflectivity"); else if (vindex == ZD_INDEX) volume->h.type_str = strdup("Differential Reflectivity"); else volume->h.type_str = strdup(parmDesc); volume->h.f = f; volume->h.invf = invf; volume->h.nsweeps = nsweeps; volume->h.calibr_const = calibr; } /*************************************************************/ /* */ /* VolumeBuild */ /* */ /*************************************************************/ Volume *VolumeBuild(L1B_1C_GV *gvl1, VosSize *vs, float calibr, int vindex, int pindex) { Volume *v; int sindex, tk_sindex; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; /* Create a Volume structure. */ v = RSL_new_volume(vs->tk.nsweep); if (v == NULL) { perror("VolumeBuild(): RSL_new_volume failed\n"); return(NULL); } /* Initialize the Volume_header values. */ Volume_headerFill(v, gvl1->sensor.parm[pindex]->parmDesc.parmDesc, vindex, vs->tk.nsweep, calibr); if (radar_verbose_flag) fprintf(stderr, "RSL volume type: %s\n", v->h.type_str); /* Build each of the sweeps of this radar volume structure. */ sindex = -1; for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { if (rsl_qsweep != NULL) { if (tk_sindex > rsl_qsweep_max) break; if (rsl_qsweep[tk_sindex] == 0) continue; } /* If data for this parm type exists in this toolkit sweep, then move it into a rsl sweep. */ if (vs->tk.ncell[tk_sindex][pindex] > 0) { sindex++; v->sweep[sindex] = SweepBuild(gvl1, vs, calibr, vindex, pindex, tk_sindex); v->sweep[sindex]->h.sweep_num = sindex + 1; if (radar_verbose_flag) fprintf(stderr, " rsl_sweep[%02d] elev=%4.1f nrays=%d cells/ray=%d\n", v->sweep[sindex]->h.sweep_num-1, v->sweep[sindex]->h.elev, vs->tk.nray[tk_sindex], vs->tk.ncell[tk_sindex][pindex]); } } /* end for (tk_sindex=0;...*/ return(v); } /*************************************************************/ /* */ /* parmIdentify */ /* */ /*************************************************************/ int parmIdentify(char *parmName) /* Identify the parameter type stored in the L1B_1C_GV structure. Upon success, return the corresponding RSL radar volume XX_INDEX value. Upon failure, return -1 . */ { int vindex; if (strcmp(parmName, "Z") == 0) { vindex = DZ_INDEX; invf = DZ_INVF; f = DZ_F; } else if (strcmp(parmName, "V") == 0) { vindex = VR_INDEX; invf = VR_INVF; f = VR_F; } else if (strcmp(parmName, "QCZ") == 0) { vindex = CZ_INDEX; invf = CZ_INVF; f = CZ_F; } else if (strcmp(parmName, "ZDR") == 0) { vindex = ZD_INDEX; invf = ZD_INVF; f = ZD_F; } else if (strcmp(parmName, "QCZDR") == 0) { vindex = CD_INDEX; invf = CD_INVF; f = CD_F; } else if (strcmp(parmName, "QCMZ") == 0) { vindex = MZ_INDEX; invf = MZ_INVF; f = MZ_F; } else if (strcmp(parmName, "QCMZDR") == 0) { vindex = MD_INDEX; invf = MD_INVF; f = MD_F; } else /* Unknown */ { return(-1); } return(vindex); } /*************************************************************/ /* */ /* Radar_headerFill */ /* */ /*************************************************************/ void Radar_headerFill(Radar *radar, L1B_1C_GV *gvl1) { double x; radar->h.month = (int)gvl1->volDes.month; radar->h.day = (int)gvl1->volDes.day; radar->h.year = (int)gvl1->volDes.year; radar->h.hour = (int)gvl1->volDes.hour; radar->h.minute = (int)gvl1->volDes.minute; radar->h.sec = (float)gvl1->volDes.second; strncpy(radar->h.radar_type, "**", 48); /*********/ radar->h.nvolumes = MAX_RADAR_VOLUMES; radar->h.number = MISSING_VAL; strncpy(radar->h.name, gvl1->sensor.radarDesc.radarName, 7); strncpy(radar->h.radar_name, gvl1->sensor.sweepInfo[0].radarName, 7); /* Radar Latitude */ x = fabs(gvl1->sensor.radarDesc.radarLat); radar->h.latd = (int)floor(x); x = (x - radar->h.latd) * 60.0; radar->h.latm = (int)floor(x); x = (x - radar->h.latm) * 60.0; radar->h.lats = (int)floor(x + 0.5); /* round up */ if (gvl1->sensor.radarDesc.radarLat < 0) { radar->h.latd = -radar->h.latd; radar->h.latm = -radar->h.latm; radar->h.lats = -radar->h.lats; } /* Radar Longitude */ x = fabs(gvl1->sensor.radarDesc.radarLon); radar->h.lond = (int)floor(x); x = (x - radar->h.lond) * 60.0; radar->h.lonm = (int)floor(x); x = (x - radar->h.lonm) * 60.0; radar->h.lons = (int)floor(x + 0.5); /* round up */ if (gvl1->sensor.radarDesc.radarLon < 0) { radar->h.lond = -radar->h.lond; radar->h.lonm = -radar->h.lonm; radar->h.lons = -radar->h.lons; } radar->h.height = (int)(1000.0 * gvl1->sensor.radarDesc.radarAlt + 0.5); radar->h.spulse = MISSING_VAL; /* ns */ radar->h.lpulse = MISSING_VAL; /* ns */ } /*************************************************************/ /* */ /* RadarBuild */ /* */ /*************************************************************/ Radar *RadarBuild(L1B_1C_GV *gvl1, VosSize *vs, float zCal) /* Creates and fills a RSL radar structure with data obtained from the L1B_1C_GV structure. If success, returns a pointer to the radar structure. If failure, returns NULL. */ { Radar *radar; extern int rsl_qfield[]; int pindex, vindex; if (radar_verbose_flag) { fprintf(stderr, "\n****** Moving VOS from toolkit L1GV structure -> RSL structure ...\n"); } /* Create a structure of type Radar */ radar = (Radar *)RSL_new_radar(MAX_RADAR_VOLUMES); if (radar == NULL) { perror("RadarBuild(): Error creating radar structure.\n"); return(NULL); } /* Initialize the Radar_header values. */ Radar_headerFill(radar, gvl1); /* Build each of the 'nparm' volumes of the radar structure. */ for (pindex=0; pindextk.nparm; pindex++) { /* Identify parameter type, so we know which RSL volume to load the data into. */ vindex = parmIdentify(gvl1->sensor.parm[pindex]->parmDesc.parmName); if (vindex < 0) { fprintf(stderr, "RadarBuild(): Unexpected parameter type: %s found in HDF file.\n", gvl1->sensor.parm[pindex]->parmDesc.parmName); } /* Don't build mask volumes. */ else if ((vindex == MZ_INDEX) || (vindex == MD_INDEX)) continue; else if (rsl_qfield[vindex] == 0) /* Don't build unselected volumes. */ { if (radar_verbose_flag) { fprintf(stderr, "Field %s not selected for retrieval from HDF file.\n", gvl1->sensor.parm[pindex]->parmDesc.parmName); if (vindex == CZ_INDEX) fprintf(stderr, "Field 'DZ' unselected for retrieval from 1C-51 file.\n"); else if (vindex == CD_INDEX) fprintf(stderr, "Field 'ZD' unselected for retrieval from 1C-51 file.\n"); } } /* end else if (rsl_qfield[vindex] == 0) */ else if (vindex == CZ_INDEX) /* Handle CZ and DZ volumes. */ { /* Build the RSL CZ volume. */ radar->v[vindex] = VolumeBuild(gvl1, vs, zCal, vindex, pindex); /* If required, build a RSL DZ volume. */ if (rsl_qfield[DZ_INDEX]) { if (radar_verbose_flag) fprintf(stderr, "Constructing reflectivity volume 'DZ'\n"); radar->v[DZ_INDEX] = VolumeBuild(gvl1, vs, zCal, DZ_INDEX, pindex); } } /* end if (vindex == CZ_INDEX) */ else if (vindex == CD_INDEX) /* Handle CD and ZD volumes. */ { /* Build the RSL CD volume. */ radar->v[vindex] = VolumeBuild(gvl1, vs, 0.0, vindex, pindex); /* If required, build a RSL ZD volume. */ if (rsl_qfield[ZD_INDEX]) { if (radar_verbose_flag) fprintf(stderr, "Constructing reflectivity volume 'ZD'\n"); radar->v[ZD_INDEX] = VolumeBuild(gvl1, vs, 0.0, ZD_INDEX, pindex); } } /* end if (vindex == CD_INDEX) */ else /* Handle all 1B-51 fields. (DZ, ZD, VR) */ { radar->v[vindex] = VolumeBuild(gvl1, vs, 0.0, vindex, pindex); } } /* end for (pindex=0; ...) */ return(radar); } /*************************************************************/ /* */ /* commentsRead */ /* */ /*************************************************************/ int commentsRead(VosSize *vs, float *zCal, char *comments, int productID) { /* Parse the comments field of the 'L1B_1C_GV' structure. Retrieve the number_of_cells/ray values for each parameter, and store in the 'VosSize' structure. Returns: OK if success. <0 if failure. */ char *spointer; char record[2][2048]; /* 2 records is maximum possible. */ char parseString[1024]; int nrecords, pindex, tk_sindex; float qcParm[NUMBER_QC_PARAMS]; /* Construct a format string to read the records in the comments field. A logical record here is the block of ascii characters which details the toolkit dimensions of one VOS. For a 1B-51 file, there should be 1 such record. For a 1C-51 file, there is one additional record for QC parms.*/ strcpy(parseString, ""); strcat(parseString, "%[^*] %*[*\n]"); nrecords = 1; if (productID == TK_L1C_GV) { strcat(parseString, "%[^\n]"); nrecords++; } /* Read all records from the comments field into the record buffers. */ if (sscanf(comments, parseString, record[0], record[1]) != nrecords) goto quit; if (sscanf(record[0], "nSweep=%d", &vs->tk.nsweep) != 1) goto quit; strcpy(parseString, "nRay=%d\n"); for (pindex=0; pindextk.nparm; pindex++) strcat(parseString, "nCell_parm[%*d]=%d\n"); spointer = record[0]; for (tk_sindex=0; tk_sindextk.nsweep; tk_sindex++) { spointer = strstr(spointer, "nRay="); if (sscanf(spointer, parseString, &vs->tk.nray[tk_sindex], &vs->tk.ncell[tk_sindex][0], &vs->tk.ncell[tk_sindex][1], &vs->tk.ncell[tk_sindex][2], &vs->tk.ncell[tk_sindex][3]) != vs->tk.nparm+1) goto quit; spointer = spointer + 5; } /* If 1C-51 file, read the QC parameters into the qcParm array. */ if (productID == TK_L1C_GV) { if (sscanf(record[1], "-hThresh1 %f -hThresh2 %f -hThresh3 %f -zThresh0 %f -zThresh1 %f -zThresh2 %f -zThresh3 %f -hFreeze %f -dbzNoise %f -zCal %f", &qcParm[HTHRESH1], &qcParm[HTHRESH2], &qcParm[HTHRESH3], &qcParm[ZTHRESH0], &qcParm[ZTHRESH1], &qcParm[ZTHRESH2], &qcParm[ZTHRESH3], &qcParm[HFREEZE], &qcParm[DBZNOISE], &qcParm[ZCAL]) != NUMBER_QC_PARAMS) goto quit; /* Print out the QC parameters we've just read in. */ /* if (radar_verbose_flag) { fprintf(stderr, "\n****** Reading VOS QC Parameters from HDF file...\n"); fprintf(stderr, "hThresh1: %.2f hThresh2: %.2f hThresh3: %.2f\n", qcParm[HTHRESH1], qcParm[HTHRESH2], qcParm[HTHRESH3]); fprintf(stderr, "zThresh0: %.2f zThresh1: %.2f zThresh2: %.2f zThresh3: %.2f\n", qcParm[ZTHRESH0], qcParm[ZTHRESH1], qcParm[ZTHRESH2], qcParm[ZTHRESH3]); fprintf(stderr, "hFreeze: %.2f dbzNoise: %.2f zCal: %.2f\n\n", qcParm[HFREEZE], qcParm[DBZNOISE], qcParm[ZCAL]); } */ if (qcParm[ZCAL] <= NOVAL_FLOAT) *zCal = 0.0; else *zCal = qcParm[ZCAL]; } /* end if (productID == TK_L1C_GV) */ return(OK); quit: if (radar_verbose_flag) fprintf(stderr, "commentsRead(): Failure reading comments field\n"); return(ABORT); } /*************************************************************/ /* */ /* GVL1Build */ /* */ /*************************************************************/ static L1B_1C_GV *GVL1Build(IO_HANDLE *granuleHandle, int vosNum, VosSize *vs) { /* Build a toolkit 'L1B_1C_GV' structure sized for the VOS we will later read in from the HDF file. Returns: gvl1 if success. NULL if fails. */ int ncell, pindex; L1B_1C_GV *gvl1; /* Using the toolkit, get the toolkit VOS dimensions from the HDF file. Note that the toolkit dimensions are distinct from the RSL VOS dimensions. */ vs->tk.nparm = TKgetNparm(granuleHandle, vosNum); /* TK_FAIL is now defined as 1?????? */ if (vs->tk.nparm <= 0) { fprintf(stderr, "GVL1Build(): TKgetNparm() failed.\n"); return(NULL); } vs->tk.nsweep = TKgetNsweep(granuleHandle, vosNum); if (vs->tk.nsweep <= 0) { fprintf(stderr, "GVL1Build(): TKgetNsweep() failed.\n"); return(NULL); } vs->rsl.maxNray = TKgetNray(granuleHandle, vosNum); if (vs->rsl.maxNray <= 0) { fprintf(stderr, "GVL1Build(): TKgetNray() failed.\n"); return(NULL); } /* Allocate memory for a TSDIS 'L1B_1C_GV' structure. */ gvl1 = (L1B_1C_GV *)TKnewGVL1(); for (pindex=0; pindextk.nparm; pindex++) { /* Allocate memory for a new parameter. */ gvl1->sensor.parm[pindex] = (PARAMETER *)TKnewGVL1parm(); ncell = TKgetNcell(granuleHandle, vosNum, pindex); /* Allocate memory for a 3D array to contain mask values and/or data. */ if (granuleHandle->productID == TK_L1B_GV) { gvl1->sensor.parm[pindex]->parmData2byte = (int16 ***)TKnewParmData2byte(vs->tk.nsweep, vs->rsl.maxNray, ncell); } else /* 1C-51 */ { /* Odd parameters contain data, even parameters contain masks. */ if ((pindex % 2) == 0) /* Mask? */ gvl1->sensor.parm[pindex]->parmData1byte = (int8 ***)TKnewParmData1byte(vs->tk.nsweep, vs->rsl.maxNray, ncell); else /* data */ gvl1->sensor.parm[pindex]->parmData2byte = (int16 ***)TKnewParmData2byte(vs->tk.nsweep, vs->rsl.maxNray, ncell); } } /* end for (pindex=0; ... */ return(gvl1); } /*************************************************************/ /* */ /* metaDataRead */ /* */ /*************************************************************/ int metaDataRead(Radar *radar, IO_HANDLE *granuleHandle) { char buf[64]; TKreadMetadataChar(granuleHandle, TK_RADAR_CITY, buf); strncpy(radar->h.city, buf, 14); TKreadMetadataChar(granuleHandle, TK_RADAR_STATE, buf); strncpy(radar->h.state, buf, 2); return(OK); } /*************************************************************/ /* */ /* hdfFileOpen */ /* */ /*************************************************************/ static int hdfFileOpen(char *infile, IO_HANDLE *granuleHandle, char *hdfFileName, int *vosNum) { /* Opens, if necessary, an HDF file. Checks that a VOS, not previously retrieved, exists in the HDF file. Returns: OK, if success. <0, if failure. */ char *product; int productID, nvos, status; /* If we presently have an open HDF file, check that it is the file requested; ie, 'infile'. If it's not, we first close the open HDF file. */ if (*vosNum != 0) { if (strcmp(hdfFileName, infile) != 0) { if (TKclose(granuleHandle) != TK_SUCCESS) { fprintf(stderr, "hdfFileOpen(): *** TKclose() error\n"); return(ABORT); } *vosNum = 0; } } /* end if (*vosNum != 0) */ /* If first VOS of HDF file, we need first to open the file. */ if (*vosNum == 0) { strncpy(hdfFileName, infile, TK_MAX_FILENAME-1); /* Get the desired product out of the HDF filename. */ product = strrchr(hdfFileName, '/'); if (product == NULL) product = hdfFileName; else product = (char *)(product + 1); if (strncmp(product, "1B51", 4) == 0) productID = TK_L1B_GV; else if (strncmp(product, "1C51", 4) == 0) productID = TK_L1C_GV; else { fprintf(stderr, "hdfFileOpen(): Invalid HDF filename.\n"); return(ABORT); } status = TKopen(hdfFileName, productID, TK_READ_ONLY, granuleHandle); if (status != TK_SUCCESS) { fprintf(stderr, "hdfFileOpen(): *** TKopen() error\n"); return(ABORT); } } /* end if (*vosNum == 0) */ /* Check if the requested VOS exists in the HDF granule. */ nvos = (int)TKgetNvos(granuleHandle); if (nvos == 0) { if (radar_verbose_flag) fprintf(stderr, "\nEmpty granule.\n"); return(QUIT); } else if (*vosNum+1 > nvos) { if (radar_verbose_flag) fprintf(stderr, "\nAll VOSs read from HDF file: %s\n", hdfFileName); return(QUIT); } else if (nvos < 0) { fprintf(stderr, "hdfFileOpen():*** TKgetNvos() error\n"); return(QUIT); } return(OK); } /*************************************************************/ /* */ /* RSL_hdf_to_radar */ /* */ /*************************************************************/ Radar *RSL_hdf_to_radar(char *infile) { /* Reads one volume scan from a HDF file into a RSL radar structure. It is envisioned that all VOSs will normally be retrieved, one after the other, from an HDF file. Therefore, in the interest of efficiency, this function is designed to keep an HDF file open between VOS retrievals. Returns: - pointer to a filled radar structure, if success. - NULL pointer, if failure. */ int pindex, status; float zCal=0.0; /* Z Calibration constant. */ VosSize vs; /* VOS dimensions storage. */ Radar *radar; /* RSL structure for VOS storage. */ L1B_1C_GV *gvl1; /* TSDIS structure for VOS storage. */ /* Following values must remain between invocations of this function. */ static IO_HANDLE granuleHandle; static char hdfFileName[TK_MAX_FILENAME]; static int vosNum=0; /* No. of last VOS read from HDF file. (1...N) */ /* Open, if necessary, an HDF file. */ status = hdfFileOpen(infile, &granuleHandle, hdfFileName, &vosNum); if (status < 0) goto quit; /* Initialize the 'VosSize' structure. */ memset(&vs, '\0', sizeof(VosSize)); /* Build a toolkit 'L1B_1C_GV' structure correctly sized for the VOS we will next read in from the HDF file. */ gvl1 = (L1B_1C_GV *)GVL1Build(&granuleHandle, vosNum, &vs); if (gvl1 == NULL) goto quit; /* Read VOS from HDF file into the toolkit L1B_1C_GV structure. */ if (radar_verbose_flag) fprintf(stderr, "\n\n***** Moving VOS from HDF file -> toolkit L1GV structure ...\n"); status = TKreadL1GV(&granuleHandle, gvl1); if (status != TK_SUCCESS) { fprintf(stderr, "RSL_hdf_to_radar(): *** TKreadL1GV() error\n"); goto quit; } if (radar_verbose_flag) { fprintf(stderr, "Input file: %s\n", hdfFileName); fprintf(stderr, "VOS date: %.2d/%.2d/%d\n", gvl1->volDes.month, gvl1->volDes.day, gvl1->volDes.year); fprintf(stderr, "VOS time: %.2d:%.2d:%.2d\n", gvl1->volDes.hour, gvl1->volDes.minute, gvl1->volDes.second); fprintf(stderr, "Granule VOS #: %d\n", gvl1->volDes.volNum); fprintf(stderr, "VOS Fields:\n"); for (pindex=0; pindexsensor.parm[pindex]->parmDesc.parmDesc); } /* Scan thru the comments field of the 'gvl1' structure for the number_of_cells/ray/sweep for each parameter, and store the values in vs, so we can next build a correctly sized RSL structure to contain the VOS. */ if (commentsRead(&vs, &zCal, gvl1->comments, granuleHandle.productID) < 0) goto quit; /* Move VOS from L1B_1C_GV structure to radar structure. */ radar = (Radar *)RadarBuild(gvl1, &vs, zCal); /* There are a couple metadata items needed for insertion into the radar->header. */ status = metaDataRead(radar, &granuleHandle); /* Free memory allocated to the toolkit GVL1 structure. */ TKfreeGVL1(gvl1); if (radar == NULL) goto quit; vosNum++; return(radar); quit: if (status == QUIT) TKclose(&granuleHandle); return(NULL); } #else /* * Just declare and return something when we're told we don't have * TSDISTK nor HDF. Do this because RSL_anyformat_to_radar references * this routine; linking won't fail because of no HDF. */ #include "rsl.h" Radar *RSL_hdf_to_radar(char *infile) { return NULL; } #endif rsl-v1.43/farea.c0000644000102200007640000001042607634132711010575 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include # define M_PI 3.14159265358979323846 #include "rsl.h" /**********************************************************************/ /* */ /* RSL_area_of_ray */ /* RSL_fractional_area_of_sweep */ /* */ /* Compute fractional area of a sweep given a range of dBZ and */ /* a maximum range in km. */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ float get_pixel_area(Ray *r, float min_range, float max_range) { float h1, h2, r1, r2; /* height and radius in km*/ float volume; float theta; /* in radian */ /* returns volume area of ray between min range and max range */ if (r == NULL) return 0.0; h1 = min_range; h2 = max_range; /* convert from degree to radian */ theta = (r->h.beam_width/2) * 2 * M_PI / 360; r1 = h1 * tan(theta); r2 = h2 * tan(theta); volume = (M_PI/3) * (pow((double)r2, (double) 2) * h2 - pow((double) r1, (double) 2) *h1); return volume; } /* get_pixel_area */ float RSL_area_of_ray(Ray *r, float lo, float hi, float min_range, float max_range) { int i; float start_km; float xdBZ; float r1, r2, area; int nbins, bin1; float binsize; if (r == NULL) return 0.0; /* Check if min_range is closer to the radar than the first bin. * If so, we can't use it. */ if (hi <= 0.0) hi = 100.0; /* default to max dbz*/ start_km = r->h.range_bin1/1000.0; binsize = r->h.gate_size/1000.0; nbins = ((max_range - start_km) / binsize); bin1 = (min_range - start_km) / binsize; if (bin1 < 0) bin1 = 0; if (nbins > r->h.nbins) nbins = r->h.nbins; /* Compute the number of pixels with lo < dBZ <= hi */ area = 0.0; for(i=bin1; ih.f(r->range[i]); if(lo < xdBZ && xdBZ <= hi) { /*MAX_DBZ = hi (typically 70?) */ /* get r1 and r2 in km */ r1 = i * binsize + start_km; r2 = (i+1) * binsize + start_km; area += get_pixel_area(r, r1, r2); } r1 = i * binsize + start_km; } return area; } float RSL_fractional_area_of_sweep(Sweep *s, float lo, float hi, float min_rng, float max_rng) { /* * Compute the fractional area of the Sweep. * * This doesn't take care of a sector (window). The caller will * have to multiply the answer by some appropriate constant. * */ float sweep_area; float area; float frac_area; float total_sys_area=0.0; int iazm; if (s == NULL) return 0.0; sweep_area = 0; for (iazm=0; iazmh.nrays; iazm++) { /* get total system volume area */ total_sys_area += RSL_area_of_ray(s->ray[iazm], -71, 0.0, min_rng, max_rng); area = RSL_area_of_ray(s->ray[iazm], lo, hi, min_rng, max_rng); sweep_area += area; /* fprintf(stderr,"iazm = %d, totalsysarea = %f, area = %f, sweep_area = %f\n", iazm, total_sys_area, area, sweep_area); */ } frac_area = sweep_area / total_sys_area; return (float) frac_area; } rsl-v1.43/lassen.c0000644000102200007640000004006107024246261011001 00000000000000#ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LASSEN /* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /*---------------------------------------------------------------------- * PURPOSE: * * Ingest a Lassen file and fill the Lassen_volume data structure. * It can handle version 1.3 and 1.4 files (MCTEX data). * * The algorthm is pretty simple, call an 'xdr' routine each time for * each and every member of Lassen_volume and all substructures. * * The order and type of xdr routine called defines the file organization. *---------------------------------------------------------------------- */ #include #include #include #include #include #include "lassen.h" /* xdr_destroy is broken on HPUX, SGI, and SUN; Linux, the only working one? */ /* This broken behavior could be from old xdr versions, too. */ #undef BROKEN_XDR_DESTROY #if defined(__hpux) || defined(__sgi) || defined(__sun) #define BROKEN_XDR_DESTROY #endif /*************************************************************/ /* */ /* read_lassen_head */ /* */ /*************************************************************/ int read_lassen_head(FILE *f, Lassen_head *head) { int rc=1, i; char *tmp; XDR xdrs; memset(head->magic, 0, sizeof(head->magic)); xdrstdio_create(&xdrs, f, XDR_DECODE); /* * Can I read the first string? If not, then this is probably * not a valid header. If this happens, then return. */ tmp=head->magic; if((rc &= xdr_string(&xdrs, &tmp, 8))==0) { #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdrs); #endif return(0); } rc &= xdr_u_char(&xdrs, &head->mdate.year); rc &= xdr_u_char(&xdrs, &head->mdate.month); rc &= xdr_u_char(&xdrs, &head->mdate.day); rc &= xdr_u_char(&xdrs, &head->mdate.hour); rc &= xdr_u_char(&xdrs, &head->mdate.minute); rc &= xdr_u_char(&xdrs, &head->mdate.second); rc &= xdr_u_char(&xdrs, &head->cdate.year); rc &= xdr_u_char(&xdrs, &head->cdate.month); rc &= xdr_u_char(&xdrs, &head->cdate.day); rc &= xdr_u_char(&xdrs, &head->cdate.hour); rc &= xdr_u_char(&xdrs, &head->cdate.minute); rc &= xdr_u_char(&xdrs, &head->cdate.second); rc &= xdr_int(&xdrs, &head->type); tmp=head->mwho; rc &= xdr_string(&xdrs, &tmp, 16); tmp=head->cwho; rc &= xdr_string(&xdrs, &tmp, 16); rc &= xdr_int(&xdrs, &head->protection); rc &= xdr_int(&xdrs, &head->checksum); tmp=head->description; rc &= xdr_string(&xdrs, &tmp, 40); rc &= xdr_int(&xdrs, &head->id); for(i=0;i<12;i++) rc &= xdr_int(&xdrs, &head->spare[i]); #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdrs); #endif return rc; } /*************************************************************/ /* */ /* free_lassen_volume */ /* */ /*************************************************************/ void free_lassen_volume(Lassen_volume *vol) { int i,j; if (vol == NULL) return; for(i=0; inumsweeps; i++ ) { if(vol->index[i] == NULL) continue; for(j=0; jindex[i]->numrays; j++ ) if (vol->index[i]->ray[j] != NULL) free( vol->index[i]->ray[j] ); free( vol->index[i] ); } free( vol ); return; } static void short_shift(unsigned short *n) { *n = ntohs(*n); } /*************************************************************/ /* */ /* read_lassen_volume */ /* */ /*************************************************************/ int read_lassen_volume( XDR *xdr, Lassen_volume *vol) { int i,j; int rc = TRUE; char *tmp; unsigned short ushort_tmp; /* Read the version number. */ rc &= xdr_u_short(xdr, &vol->version); /* * Currently, Version 1.3 and 1.4 seem to be the same on disk. * I have no doc's. The only thing that I know of to be different * is how the ray azimuth angles are calculated. For MCTEX data, * this is time dependant. The correction will happen in the * application; after RSL_lassen_to_radar is called, for example. * * Version 1.3 is coded as 13 and version 1.4 is coded as 14. */ if( (int)vol->version != 13 && (int)vol->version != 14 ) { (void)fprintf(stderr, "Incompatible version of LASSEN file.\n" ); (void)fprintf(stderr, "File version: %d.%d\n", (int)vol->version/10, (int)vol->version%10); return( 0 ); } /* Read in the Lassen_volume. */ rc &= xdr_short(xdr, &vol->filled); rc &= xdr_u_int(xdr, &vol->volume); rc &= xdr_u_short(xdr, &vol->sweep); rc &= xdr_u_short(xdr, &vol->sweep_type); rc &= xdr_u_short(xdr, &vol->max_height); rc &= xdr_u_short(xdr, &vol->status); rc &= xdr_u_short(xdr, &vol->min_fangle); rc &= xdr_u_short(xdr, &vol->max_fangle); rc &= xdr_u_short(xdr, &vol->min_var); rc &= xdr_u_short(xdr, &vol->max_var); rc &= xdr_u_short(xdr, &vol->a_start); rc &= xdr_u_short(xdr, &vol->a_stop); rc &= xdr_u_short(xdr, &vol->numsweeps); for(i=0;ifangles[i]); rc &= xdr_u_short(xdr, &vol->gatewid); rc &= xdr_u_short(xdr, &vol->rangeg1); for(i=0;inumgates[i]); rc &= xdr_u_short(xdr, &vol->maxgates); rc &= xdr_u_short(xdr, &ushort_tmp); rc &= xdr_u_short(xdr, &ushort_tmp); rc &= xdr_u_short(xdr, &ushort_tmp); rc &= xdr_u_short(xdr, &ushort_tmp); rc &= xdr_u_short(xdr, &vol->prf); rc &= xdr_u_short(xdr, &vol->prflow); rc &= xdr_u_int(xdr, &vol->freq); rc &= xdr_u_short(xdr, &vol->n_pulses); for(i=0;ioffset[i][j]); rc &= xdr_u_char(xdr, &vol->year); rc &= xdr_u_char(xdr, &vol->month); rc &= xdr_u_char(xdr, &vol->day); rc &= xdr_u_char(xdr, &vol->shour); rc &= xdr_u_char(xdr, &vol->sminute); rc &= xdr_u_char(xdr, &vol->ssecond); rc &= xdr_u_char(xdr, &vol->ehour); rc &= xdr_u_char(xdr, &vol->eminute); rc &= xdr_u_char(xdr, &vol->esecond); /* The flags use bits. The data type length is short; I expect. */ rc &= xdr_u_short(xdr, (unsigned short *)&vol->volflags); short_shift((unsigned short *)&vol->volflags); /* This is radar info. */ tmp=vol->radinfo.radar_name; rc &= xdr_string(xdr, &tmp, 8); tmp=vol->radinfo.site_name; rc &= xdr_string(xdr, &tmp, 8); rc &= xdr_u_short(xdr, &vol->radinfo.antenna_height); rc &= xdr_short(xdr, &vol->radinfo.latitude.degree); rc &= xdr_short(xdr, &vol->radinfo.latitude.minute); rc &= xdr_short(xdr, &vol->radinfo.latitude.second); rc &= xdr_short(xdr, &vol->radinfo.longitude.degree); rc &= xdr_short(xdr, &vol->radinfo.longitude.minute); rc &= xdr_short(xdr, &vol->radinfo.longitude.second); /* * The return value is the logical and of all the xdr reads. */ return( rc ); } /*************************************************************/ /* */ /* read_lassen_ray */ /* */ /*************************************************************/ int read_lassen_ray(XDR *xdr, Lassen_ray *ray ) { int i, rc = 1; /* Read in Lassen_ray */ rc &= xdr_u_short( xdr, &ray->vangle); rc &= xdr_u_short( xdr, &ray->fanglet); rc &= xdr_u_short( xdr, &ray->fanglea); rc &= xdr_u_short( xdr, &ray->a_start); rc &= xdr_u_short( xdr, &ray->a_stop); rc &= xdr_u_char( xdr, &ray->max_height); rc &= xdr_u_char( xdr, &ray->volume); rc &= xdr_u_char( xdr, &ray->sweep); rc &= xdr_u_char( xdr, &ray->sweep_type); rc &= xdr_u_short( xdr, &ray->gatewid); rc &= xdr_u_short( xdr, &ray->rangeg1); rc &= xdr_u_short( xdr, &ray->numgates); rc &= xdr_u_short( xdr, &ray->prf); rc &= xdr_u_short( xdr, &ray->prflow); rc &= xdr_u_short( xdr, &ray->n_pulses); rc &= xdr_u_char( xdr, &ray->p_width); rc &= xdr_u_char( xdr, &ray->cfilter); rc &= xdr_u_short( xdr, &ray->status); memset(&ray->flags, 0, 4); /* I expect the length of the bit field to be a 'short', never 'long' */ rc &= xdr_u_short( xdr, (unsigned short *)&ray->flags); /* a bit field */ short_shift((unsigned short *)&ray->flags); /* fprintf(stderr, "short_shift: flags = %x\n", ray->flags); fprintf(stderr, "packed = %d", (int)ray->flags.packed); fprintf(stderr, "good_data = %d", (int)ray->flags.good_data); fprintf(stderr, "uz = %d", (int)ray->flags.uz); fprintf(stderr, "cz = %d", (int)ray->flags.cz); fprintf(stderr, "vel= %d", (int)ray->flags.vel); fprintf(stderr, "wid= %d", (int)ray->flags.wid); fprintf(stderr, "zdr= %d", (int)ray->flags.zdr); fprintf(stderr, "phi= %d", (int)ray->flags.phi); fprintf(stderr, "rho= %d", (int)ray->flags.rho); fprintf(stderr, "ldr= %d", (int)ray->flags.ldr); fprintf(stderr, "kdp= %d", (int)ray->flags.kdp); fprintf(stderr, "tim= %d", (int)ray->flags.time); fprintf(stderr, "spa= %x", (int)ray->flags.spares); */ for(i=0;ioffset[i]); rc &= xdr_u_char( xdr, &ray->year); rc &= xdr_u_char( xdr, &ray->month); rc &= xdr_u_char( xdr, &ray->day); rc &= xdr_u_char( xdr, &ray->hour); rc &= xdr_u_char( xdr, &ray->minute); rc &= xdr_u_char( xdr, &ray->second); return rc; } /*************************************************************/ /* */ /* read_entire_lassen_file */ /* */ /*************************************************************/ int read_entire_lassen_file(FILE *f, Lassen_volume *vol) { Lassen_sweep *sweep; int i; XDR xdr; Lassen_ray ray; Lassen_head head; int isweep = (-99); int lastray=0,numrays=0, rc; unsigned int size; int tbytes = 0; unsigned char *p; /* Skip the header. */ read_lassen_head(f, &head); /* Connect to the XDR stream. */ xdrstdio_create(&xdr, f, XDR_DECODE); /* Check the volume header. Is the version is correct? */ if( read_lassen_volume( &xdr, vol ) == 0) { #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdr); #endif return( 0 ); } rc = TRUE; /* Read until XDR error. */ while(rc == TRUE) { /* * Read in the ray header. If there is an error in reading * in the ray header, then make sure the rc value is * set to 0. */ if( read_lassen_ray( &xdr, &ray ) == 0 ) break; if( (short)ANGLE_CONVERT(ray.vangle) < 0 || (short)ANGLE_CONVERT(ray.vangle) > 360 ) { fprintf(stderr, "read_entire_lassen_file: angle out of range (%d)\n", ANGLE_CONVERT(ray.vangle)); rc = 0; break; } if(ray.volume != (vol->volume&0x00ff)) { fprintf(stderr, "read_entire_lassen_file: Volume serial number out of sync:\n"); fprintf(stderr, " Ray->volume = %u, Should be %u\n", ray.volume, (unsigned char)vol->volume&0x00ff ); fprintf(stderr, " (Ray->volume == Vol->volume(%d) & 0x00ff)\n", vol->volume ); if(isweep == -99) rc = 0; break; } /* * If we have a new sweep, then create * the new sweep data structure. The 'isweep' * contains the offset number in the volume. 'ray.sweep' * has the sweep number. */ if((ray.sweep-1) != isweep) { if(ray.sweep == 0) { fprintf(stderr,"Sweep number in a ray is 0!\n"); fprintf(stderr,"Aborting read_entire_lassen_file()\n"); #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdr); #endif rc = 0; break; } isweep = ray.sweep-1; if(isweep > 0) { /* Reset the last ray when passing 2 pi. */ lastray--; if( lastray < 0 ) lastray = 359; sweep = vol->index[isweep-1]; if (sweep == NULL) { rc = 0; fprintf(stderr, "vol->index[%d] is NULL.\n", isweep-1); break; } sweep->ehour = sweep->ray[lastray]->hour; sweep->eminute = sweep->ray[lastray]->minute; sweep->esecond = sweep->ray[lastray]->second; sweep->numrays = numrays; sweep->max_var = sweep->ray[lastray]->vangle; } /* We have a new sweep. */ if((vol->index[isweep] = (Lassen_sweep *)calloc (1,sizeof(Lassen_sweep))) == 0) { perror("read_entire_lassen_file"); rc = 0; break; } lastray = 0; /* Copy to the Sweep. */ sweep = vol->index[isweep]; sweep->sweep = isweep; sweep->shour = ray.hour; sweep->sminute = ray.minute; sweep->ssecond = ray.second; sweep->volume = ray.volume; sweep->sweep = ray.sweep; sweep->sweep_type = ray.sweep_type; sweep->max_height = ray.max_height; sweep->fangle = ray.fanglet; sweep->a_start = ray.a_start; sweep->a_stop = ray.a_stop; sweep->gatewid = ray.gatewid; sweep->rangeg1 = ray.rangeg1; sweep->numgates = ray.numgates; sweep->prf = ray.prf; sweep->prflow = ray.prflow; sweep->n_pulses = ray.n_pulses; sweep->p_width = ray.p_width; sweep->cfilter = ray.cfilter; for(i=0; ioffset[i] = ray.offset[i]; sweep->year = ray.year; sweep->month = ray.month; sweep->day = ray.day; sweep->min_var = ray.vangle; numrays = 0; } /* * If everything is ok, then add the ray to the * volume. */ numrays++; vol->index[isweep]->status |= ray.status; /* Determine the 'size' of the ray and allocate memory. */ size = 0; /* fprintf(stderr,"\nOFFSETS (%d):", NUMOFFSETS); */ for(i=0; iindex[isweep]->ray[lastray] = (Lassen_ray *) calloc(1,sizeof(Lassen_ray)+size))==0) { perror("read_entire_lassen_file"); rc = 0; #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdr); #endif break; } p = (unsigned char *)vol->index[isweep]->ray[lastray]; /* Copy the ray header. */ memcpy(p, &ray, sizeof(Lassen_ray)); p = (unsigned char *)p + sizeof(Lassen_ray); /* Read the data. */ /* printf("Previous rc=%d ... ", rc); */ rc &= xdr_bytes(&xdr, (char **)&p, &size,size); tbytes += size; /* printf("after rc=%d. xdr_bytes %d bytes, tbytes %d.\n", rc, size, tbytes); */ lastray++; if(lastray > 359) lastray = 0; } /* End while. */ if(rc == 0) { /* Clean up and get out. */ free_lassen_volume(vol); #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdr); #endif fprintf(stderr,"\tAborting read_entire_lassen_file.\n\n"); return(0); } /* * Check to see if we read a sweep! */ if( isweep == -99 ) vol->filled = -1; else { lastray--; if( lastray < 0 ) lastray = 359; /* Update the last sweep. */ sweep = vol->index[isweep]; sweep->ehour = sweep->ray[lastray]->hour; sweep->eminute = sweep->ray[lastray]->minute; sweep->esecond = sweep->ray[lastray]->second; sweep->max_var = ray.vangle; sweep->numrays = numrays; vol->filled = 1; } /* Check the number of tilts read vs. the number in the file. */ if(vol->numsweeps != isweep+1) { fprintf(stderr, "read_entire_lassen_file: Warning, read error. The number of sweeps "); fprintf(stderr, "detected is different from the number written."); } vol->numsweeps = isweep+1; #ifndef BROKEN_XDR_DESTROY xdr_destroy(&xdr); #endif return( 1 ); } #endif rsl-v1.43/toga_to_radar.c0000644000102200007640000003761007024071545012330 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Ingest a Darwin_Toga file and fill a Radar structure with the data. * Darwin Type 1 data contains 4 fields: corrected & uncorrected refl, * velocity, and spectrum width. * Darwin type 19 data contains 1 field: uncorrected reflectivity. * Ignore all other Darwin data types. * Handle only PPI scans; ignore RHI scans. * * Object code from this file must be linked with the following * libraries: * -ltg -lradar * * "libtg.a" handles the reading and decompression of Darwin TOGA * data records from the input toga file. * * * Kolander * Applied Research Corp. * NASA/GSFC * */ #include #include #include "toga.h" #include "rsl.h" #define MAX_RAYS 512 #define MAX_SWEEPS 20 #define MISSING_VAL 0 extern int radar_verbose_flag; int tg_open(char *infile, tg_file_str *tg_file); int tg_read_ray(tg_file_str *tg_file); /* Toga radar routines */ void fill_ray(Ray *, tg_file_str *, int); void fill_ray_header(Ray *, tg_file_str *, int, int); void fill_sweep_header(Radar *, tg_map_head_str *, int, int); void fill_volume_header(Radar *, tg_map_head_str *); void fill_radar_header(Radar *, tg_map_head_str *); /********************************************************************/ void fill_ray(Ray *ray, tg_file_str *tg_file, int datatype) /* transfer ray data values from the toga ray structure to the radar ray */ { int j; if (ray == NULL) return; for (j=0; jray.num_bins[datatype]; j++) { /* check to see if this is valid data */ if (tg_file->ray.data[datatype][j] == TG_NO_DATA) ray->range[j] = ray->h.invf(BADVAL); /* bad data, store flag */ else /* good data, store into radar ray */ ray->range[j] = ray->h.invf(tg_file->ray.data[datatype][j]); } /* end for */ } void fill_ray_header(Ray *ray, tg_file_str *tg_file, int elev_num, int datatype) /* Unresolved: Many of the following values */ { if (ray == NULL) return; ray->h.month = tg_file->ray_head.mon; ray->h.day = tg_file->ray_head.day; ray->h.year = tg_file->ray_head.year; ray->h.hour = tg_file->ray_head.hour; ray->h.minute = tg_file->ray_head.min; ray->h.sec = tg_file->ray_head.hunsec/100.0; ray->h.unam_rng = MISSING_VAL; /* ?? */ ray->h.azimuth = tg_file->ray.azm; ray->h.ray_num = tg_file->ray_num; ray->h.elev = tg_file->ray.elev; ray->h.elev_num = elev_num; ray->h.range_bin1 = (int)(tg_file->ray.start_km[datatype]*1000.0); ray->h.gate_size = (int)(tg_file->ray.interval_km[datatype]*1000.0); ray->h.vel_res = MISSING_VAL; /* ?? */ ray->h.sweep_rate = MISSING_VAL; /* ?? */ ray->h.prf = tg_file->map_head.prf; ray->h.azim_rate = MISSING_VAL; /* ?? */ ray->h.fix_angle = MISSING_VAL; /* ?? */ ray->h.pulse_count = MISSING_VAL; /* ?? */ ray->h.pulse_width = tg_file->map_head.pulsewd/100.0; ray->h.beam_width = 1.65; ray->h.frequency = 5625; ray->h.wavelength = (tg_file->map_head.wavelen/100.0)/100.0; /* m */ ray->h.nyq_vel = (ray->h.wavelength * ray->h.prf)/4.0; /* m/s */ ray->h.nbins = tg_file->ray.num_bins[datatype]; if (datatype == TG_DM_IND) { ray->h.f = DZ_F; ray->h.invf = DZ_INVF; } else if (datatype == TG_DZ_IND) { ray->h.f = DZ_F; ray->h.invf = DZ_INVF; } else if (datatype == TG_VR_IND) { ray->h.f = VR_F; ray->h.invf = VR_INVF; } else if (datatype == TG_SW_IND) { ray->h.f = SW_F; ray->h.invf = SW_INVF; } } void fill_sweep_header(Radar *radar, tg_map_head_str *map_head, int sweep_num, int nrays) /* Arrive here _after_ sweep ray data has been filled in. */ { if (radar_verbose_flag) fprintf(stderr,"sweep_num:%02d num_rays:%d\n",sweep_num, nrays); if (map_head->data_set == 1) { radar->v[DZ_INDEX]->sweep[sweep_num]->h.f = DZ_F; radar->v[DZ_INDEX]->sweep[sweep_num]->h.invf = DZ_INVF; radar->v[ZT_INDEX]->sweep[sweep_num]->h.f = DZ_F; radar->v[ZT_INDEX]->sweep[sweep_num]->h.invf = DZ_INVF; radar->v[VR_INDEX]->sweep[sweep_num]->h.f = VR_F; radar->v[VR_INDEX]->sweep[sweep_num]->h.invf = VR_INVF; radar->v[SW_INDEX]->sweep[sweep_num]->h.f = SW_F; radar->v[SW_INDEX]->sweep[sweep_num]->h.invf = SW_INVF; radar->v[DZ_INDEX]->sweep[sweep_num]->h.sweep_num = sweep_num; radar->v[ZT_INDEX]->sweep[sweep_num]->h.sweep_num = sweep_num; radar->v[VR_INDEX]->sweep[sweep_num]->h.sweep_num = sweep_num; radar->v[SW_INDEX]->sweep[sweep_num]->h.sweep_num = sweep_num; radar->v[DZ_INDEX]->sweep[sweep_num]->h.elev = map_head->angfix[sweep_num]/10.0; radar->v[ZT_INDEX]->sweep[sweep_num]->h.elev = map_head->angfix[sweep_num]/10.0; radar->v[VR_INDEX]->sweep[sweep_num]->h.elev = map_head->angfix[sweep_num]/10.0; radar->v[SW_INDEX]->sweep[sweep_num]->h.elev = map_head->angfix[sweep_num]/10.0; radar->v[DZ_INDEX]->sweep[sweep_num]->h.beam_width = 1.65; radar->v[ZT_INDEX]->sweep[sweep_num]->h.beam_width = 1.65; radar->v[VR_INDEX]->sweep[sweep_num]->h.beam_width = 1.65; radar->v[SW_INDEX]->sweep[sweep_num]->h.beam_width = 1.65; radar->v[DZ_INDEX]->sweep[sweep_num]->h.horz_half_bw = 0.85; radar->v[ZT_INDEX]->sweep[sweep_num]->h.horz_half_bw = 0.85; radar->v[VR_INDEX]->sweep[sweep_num]->h.horz_half_bw = 0.85; radar->v[SW_INDEX]->sweep[sweep_num]->h.horz_half_bw = 0.85; radar->v[DZ_INDEX]->sweep[sweep_num]->h.vert_half_bw = 0.85; radar->v[ZT_INDEX]->sweep[sweep_num]->h.vert_half_bw = 0.85; radar->v[VR_INDEX]->sweep[sweep_num]->h.vert_half_bw = 0.85; radar->v[SW_INDEX]->sweep[sweep_num]->h.vert_half_bw = 0.85; radar->v[DZ_INDEX]->sweep[sweep_num]->h.nrays = nrays; radar->v[ZT_INDEX]->sweep[sweep_num]->h.nrays = nrays; radar->v[VR_INDEX]->sweep[sweep_num]->h.nrays = nrays; radar->v[SW_INDEX]->sweep[sweep_num]->h.nrays = nrays; } else if (map_head->data_set == 19) { radar->v[ZT_INDEX]->sweep[sweep_num]->h.sweep_num = sweep_num; radar->v[ZT_INDEX]->sweep[sweep_num]->h.elev = map_head->angfix[sweep_num]/10.0; radar->v[ZT_INDEX]->sweep[sweep_num]->h.beam_width = 1.65; radar->v[ZT_INDEX]->sweep[sweep_num]->h.horz_half_bw = 0.825; radar->v[ZT_INDEX]->sweep[sweep_num]->h.vert_half_bw = 0.825; radar->v[ZT_INDEX]->sweep[sweep_num]->h.nrays = nrays; radar->v[ZT_INDEX]->sweep[sweep_num]->h.f = DZ_F; radar->v[ZT_INDEX]->sweep[sweep_num]->h.invf = DZ_INVF; } else /* Another data type? */ { } } void fill_volume_header(Radar *radar, tg_map_head_str *map_head) { if (map_head->data_set == 1) { radar->v[DZ_INDEX] = RSL_new_volume(MAX_SWEEPS); radar->v[ZT_INDEX] = RSL_new_volume(MAX_SWEEPS); radar->v[VR_INDEX] = RSL_new_volume(MAX_SWEEPS); radar->v[SW_INDEX] = RSL_new_volume(MAX_SWEEPS); radar->v[DZ_INDEX]->h.type_str = strdup("Reflectivity"); radar->v[ZT_INDEX]->h.type_str = strdup("Reflectivity"); radar->v[VR_INDEX]->h.type_str = strdup("Velocity"); radar->v[SW_INDEX]->h.type_str = strdup("Spectrum width"); radar->v[DZ_INDEX]->h.nsweeps = map_head->numfix_ang; radar->v[ZT_INDEX]->h.nsweeps = map_head->numfix_ang; radar->v[VR_INDEX]->h.nsweeps = map_head->numfix_ang; radar->v[SW_INDEX]->h.nsweeps = map_head->numfix_ang; radar->v[DZ_INDEX]->h.f = DZ_F; radar->v[DZ_INDEX]->h.invf = DZ_INVF; radar->v[ZT_INDEX]->h.f = DZ_F; radar->v[ZT_INDEX]->h.invf = DZ_INVF; radar->v[VR_INDEX]->h.f = VR_F; radar->v[VR_INDEX]->h.invf = VR_INVF; radar->v[SW_INDEX]->h.f = SW_F; radar->v[SW_INDEX]->h.invf = SW_INVF; } else if (map_head->data_set == 19) { radar->v[ZT_INDEX] = RSL_new_volume(MAX_SWEEPS); radar->v[ZT_INDEX]->h.type_str = strdup("Reflectivity"); radar->v[ZT_INDEX]->h.nsweeps = map_head->numfix_ang; radar->v[ZT_INDEX]->h.f = DZ_F; radar->v[ZT_INDEX]->h.invf = DZ_INVF; } else /* Another data type? */ { } } void fill_radar_header(Radar *radar, tg_map_head_str *map_head) { radar->h.month = map_head->scan_mon; radar->h.day = map_head->scan_day; radar->h.year = map_head->scan_year; radar->h.hour = map_head->scan_hour; radar->h.minute = map_head->scan_min; radar->h.sec = map_head->scan_sec/100.0; strcpy(radar->h.radar_type, "toga"); radar->h.number = 0; strcpy(radar->h.name, ""); strcpy(radar->h.radar_name, "TOGA"); strcpy(radar->h.city, "Darwin"); strcpy(radar->h.state, ""); /* The following lat, lon coordinates obtained from Dave Wolff */ radar->h.latd = -12; radar->h.latm = -27; radar->h.lats = -26; radar->h.lond = 130; radar->h.lonm = 55; radar->h.lons = 31; radar->h.height = 37; radar->h.spulse = 500; /* ns */ radar->h.lpulse = 2000; /* ns */ } Radar *RSL_toga_to_radar(char *infile) /* Ingest a Darwin_Toga file and fill a Radar structure with the data. Darwin Type 1 data contains 4 fields: corrected & uncorrected refl, velocity, and spectrum width. Darwin type 19 data contains 1 field: uncorrected reflectivity. Ignore all other Darwin data types. Handle only PPI scans; ignore RHI scans. */ { int m, swp_num, num_bins; Radar *radar; Ray *new_ray; tg_file_str tg_file; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; /* open the toga data file and read toga file header into the tg_file map_head_structure */ if (tg_open(infile,&tg_file) < 0) /* Understands NULL 'infile' as stdin. */ { if (radar_verbose_flag) fprintf(stderr,"Error opening/reading data file\n"); close(tg_file.fd); return NULL; } if (radar_verbose_flag) { fprintf(stderr,"Input file: %s\n",infile); fprintf(stderr,"Scan_date: %.2d/%.2d/%d\n",tg_file.map_head.scan_mon, tg_file.map_head.scan_day,tg_file.map_head.scan_year); fprintf(stderr,"Scan_time: %.2d:%.2d\n",tg_file.map_head.scan_hour, tg_file.map_head.scan_min); } /* If this toga file does not contain a PPI (constant elevation) scan, do not bother with it. Just quit. */ if (tg_file.map_head.scanmod != 1) { if (radar_verbose_flag) fprintf(stderr,"Darwtoga file %s does not contain a PPI scan.\n",infile); close(tg_file.fd); return NULL; } /* Can handle only datatypes 1 and 19 */ if ((tg_file.map_head.data_set != 1) && (tg_file.map_head.data_set != 19)) { if (radar_verbose_flag) fprintf(stderr,"File %s does not contain Doppler or refl data\n",infile); close(tg_file.fd); return NULL; } if (radar_verbose_flag) { if (tg_file.map_head.data_set == 1) fprintf(stderr,"Type 1 data\n"); else if (tg_file.map_head.data_set == 19) fprintf(stderr,"Type 19 data\n"); else fprintf(stderr,"Unknown data type\n"); } radar = RSL_new_radar(MAX_RADAR_VOLUMES); fill_radar_header(radar, &tg_file.map_head); fill_volume_header(radar, &tg_file.map_head); /* initialize counters */ tg_file.ray_num = -1; swp_num = -1; /* Main loop to read in a toga ray from the toga data file and store into radar structure */ while ((m=tg_read_ray(&tg_file)) > 0) { /* check for end_of_sweep. Fill the sweep header _after_ we've read in the sweep */ if (swp_num < tg_file.ray_head.tilt - 1) /* new sweep? */ { if (swp_num >= 0) { /* fill the sweep header for the previous sweep */ fill_sweep_header(radar, &tg_file.map_head, swp_num, tg_file.ray_num+1); } tg_file.ray_num = -1; /* Reset ray_num. */ swp_num += 1; /* increment sweep count */ if (rsl_qsweep != NULL) { if (swp_num > rsl_qsweep_max) break; if (rsl_qsweep[swp_num] == 0) continue; } /* Check for too many sweeps. */ if ((tg_file.map_head.numfix_ang < swp_num + 1) || (MAX_SWEEPS < swp_num + 1)) { perror("toga_to_radar: Exceeded expected no. of sweeps"); close(tg_file.fd); RSL_free_radar(radar); return NULL; } /* Create new sweep structures. */ if (tg_file.map_head.data_set == 1) { radar->v[DZ_INDEX]->sweep[swp_num] = RSL_new_sweep(MAX_RAYS); radar->v[ZT_INDEX]->sweep[swp_num] = RSL_new_sweep(MAX_RAYS); radar->v[VR_INDEX]->sweep[swp_num] = RSL_new_sweep(MAX_RAYS); radar->v[SW_INDEX]->sweep[swp_num] = RSL_new_sweep(MAX_RAYS); } else if (tg_file.map_head.data_set == 19) { radar->v[ZT_INDEX]->sweep[swp_num] = RSL_new_sweep(MAX_RAYS); } } /* end if new sweep */ num_bins = tg_file.ray.num_bins[TG_DM_IND] + 4; /* types 1,19 data*/ tg_file.ray_num += 1; /* Check for too many rays. */ if (tg_file.ray_num > MAX_RAYS) { perror("toga_to_radar: Exceeded maximal no. of rays"); close(tg_file.fd); RSL_free_radar(radar); return NULL; } /* check for uncorrected reflectivity data */ if (tg_file.ray.da_inv[TG_DM_IND] == TRUE) { new_ray = RSL_new_ray(num_bins); radar->v[ZT_INDEX]->sweep[swp_num]->ray[tg_file.ray_num] = new_ray; fill_ray_header(new_ray, &tg_file, swp_num, TG_DM_IND); fill_ray(new_ray, &tg_file, TG_DM_IND); } /* check for corrected reflectivity data */ if (tg_file.ray.da_inv[TG_DZ_IND] == TRUE) { new_ray = RSL_new_ray(num_bins); radar->v[DZ_INDEX]->sweep[swp_num]->ray[tg_file.ray_num] = new_ray; fill_ray_header(new_ray, &tg_file, swp_num, TG_DZ_IND); fill_ray(new_ray, &tg_file, TG_DZ_IND); } /* check for velocity data */ if (tg_file.ray.da_inv[TG_VR_IND] == TRUE) { new_ray = RSL_new_ray(num_bins); radar->v[VR_INDEX]->sweep[swp_num]->ray[tg_file.ray_num] = new_ray; fill_ray_header(new_ray, &tg_file, swp_num, TG_VR_IND); fill_ray(new_ray, &tg_file, TG_VR_IND); } /* check for spectrum width data */ if (tg_file.ray.da_inv[TG_SW_IND] == TRUE) { new_ray = RSL_new_ray(num_bins); radar->v[SW_INDEX]->sweep[swp_num]->ray[tg_file.ray_num] = new_ray; fill_ray_header(new_ray, &tg_file, swp_num, TG_SW_IND); fill_ray(new_ray, &tg_file, TG_SW_IND); } } /* end while */ /* At this point, we are finished reading toga data records. Fill in the last sweep header. */ fill_sweep_header(radar, &tg_file.map_head, swp_num, tg_file.ray_num+1); /* Check which flag the TOGA read_record routines returned, and print appropriate terminating message */ if (radar_verbose_flag) { switch (m) { case TG_END_DATA: fprintf(stderr,"Reached end of data file\n"); break; case TG_RAY_READ_ERR: fprintf(stderr,"Error reading toga ray\n"); break; case TG_RAY_NOTYPE: fprintf(stderr,"Found unrecognized toga ray type\n"); fprintf(stderr,"ray_type: %d\n",tg_file.ray_head.type); break; case TG_REC_NOSEQ: fprintf(stderr,"found out-of-sequence toga record \n"); break; case -1: fprintf(stderr,"Error reading toga ray_header \n"); break; default: fprintf(stderr,"Error reading toga file \n"); break; } } /* end if (radar_verbose_flag) */ close(tg_file.fd); if (m == TG_END_DATA) { radar = RSL_prune_radar(radar); return radar; } else { RSL_free_radar(radar); return NULL; } } rsl-v1.43/mcgill_to_radar.c0000644000102200007640000004157707024071545012654 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 Mike Kolander Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /******************************************************************* * Ingest a Mcgill format file and fill a RSL Radar structure * with the data. * * Object code from this file must be linked with the following libraries: * librsl libmcg * *----------------------------------------------------------------- * NOTE: Adjust Mcgill dbz bias in function RayFill() . * Presently, if (Mcgill_dbz_value != 0) * then Mcgill_dbz_value + 16.5 is stored in RSL Ray. * if (Mcgill dbz value == 0) * then 0 is stored in RSL Ray. * I don't find the Mcgill documentation very clear in this matter. *----------------------------------------------------------------- * Presently sets radar_head->radar_type = DARWIN_TOGA_SIGMET * (Need a radar_type defined in rsl.h for PAFB or MCGILL) *---------------------------------------------------------------- * Minor changes will be required in the associated Mcgill library to * accomodate Mcgill data from Sao Paulo. Since I don't have any files * from Sao Paulo to test, I haven't incorporated any such changes. *------------------------------------------------------------------- * Functions defined in this file: * * void RayFill(Ray *rsl_ray, mcgRay_t *mcg_ray); * void Ray_headerInit(Ray *ray, mcgHeader_t *head, * mcgRay_t *mcg_ray, int ray_num, int num_bins_rsl); * void Sweep_headerInit(Sweep *sweep, mcgRay_t *mcg_ray, * int nrays); * void Volume_headerInit(Volume *volume, short vol_scan_format); * void Radar_headerInit(Radar *radar, mcgHeader_t *mcg_head); * Radar *RSL_mcgill_to_radar(char *infile); * * Kolander * 09 May 95 * *******************************************************************/ #include #include #include "mcgill.h" #include "rsl.h" #define MAX_RAYS 512 #define MAX_SWEEPS 32 #define MISSING_VAL 0 #define MCG_DBZ_BIAS 16.5 #define MCG_NOISE_BIAS 0.0 extern int radar_verbose_flag; /*********************** Function Prototypes ***************************/ static void RayFill(Ray *rsl_ray, mcgRay_t *mcg_ray); static void Ray_headerInit(Ray *ray, mcgHeader_t *head, mcgRay_t *mcg_ray, int ray_num, int num_bins_rsl); static void Sweep_headerInit(Sweep *sweep, mcgRay_t *mcg_ray, int nrays); static void Volume_headerInit(Volume *volume, short vol_scan_format); static void Radar_headerInit(Radar *radar, mcgHeader_t *mcg_head); Radar *RSL_mcgill_to_radar(char *infile); static float (*f)(Range x); static Range (*invf)(float x); /* Fixed number_of_RSL_bins for Mcgill sweeps. Note that the number of bins in the RSL structure differs from the number of bins in the Mcgill ray stucture, since the km/bin spacing differs. SEE MCGILL DOCUMENTATION */ static int num_bins_normal[24] = { /* PAFB volume scan formats 1 and 3 (normal mode) */ 480, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240 }; static int num_bins_compressed[24] = { /* PAFB volume scan formats 2 and 4 (compressed mode) */ 240, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120 }; /********************************************************************/ void RayFill(Ray *rsl_ray, mcgRay_t *mcg_ray) /********************************************************************/ /* transfer ray data values from the mcgRay structure to the radar->v[]->sweep[]->ray[] structure */ { int j, mcg_bin; int rsl_bin=0; int index=1; /* Used to accomodate varying Mcgill bin spacing */ if (rsl_ray == NULL) return; /* Note that the number of bins in the Mcgill ray structure is different from the number of bins in the RSL ray structure, since the Mcgill bin spacing changes with range. RSL ray bin spacing is constant. --------------------------------------------------------- MCGILL NORMAL FORMAT: The first 120 mcg_bins have a length of 1 km, and span the the range [0, 120] km. Mcg_bins 120 to 180 have a length of 2 km, and span the range [120, 240] km. Mcg_bins 180 to 240 have a length of 4 km, and span the range [240, 480] km. --------------------------------------------------------- MCGILL COMPRESSED FORMAT: The first 120 mcg_bins have a length of 2 km, and span the range [0, 240] km. Mcg_bins 120 to 180 have a length of 4 km, and span the range [240, 480] km. */ for (mcg_bin=0; mcg_binnum_bins; mcg_bin++) { /* I do the case dbz_value of zero separately, so produced color images have a black background. Otherwise, if >>all<< dbz values are biased by 16.5, we get a colored background where there is no precipitation. Looks peculiar. Somebody knowledgable should look into this matter. */ if (mcg_ray->data[mcg_bin] == 0) { for (j=0; jrange[rsl_bin] = invf(MCG_NOISE_BIAS); rsl_bin += 1; } } else { for (j=0; jrange[rsl_bin] = invf(mcg_ray->data[mcg_bin] + MCG_DBZ_BIAS); rsl_bin += 1; } } /* end else */ /* Mcgill bin spacing changes at bins 120 and 180 */ if ((mcg_bin == 119) || (mcg_bin == 179)) { /* In normal format, put range rings at 120km and 240km. In compressed format, put range rings at 240km and 480km */ /* rsl_ray->range[rsl_bin-1] = RSL_INVF(60.0); */ index = index*2; /* Set up new bin spacing index */ } } /* end for (mcg_bin=0...*/ } /*************************************************************************/ void Ray_headerInit(Ray *ray, mcgHeader_t *head, mcgRay_t *mcg_ray, int ray_num, int num_bins_rsl) /*************************************************************************/ { if (ray == NULL) return; ray->h.month = (int)head->month; ray->h.day = (int)head->day; ray->h.year = 1900 + (int)head->year; if (ray->h.year < 1980) ray->h.year += 100; /* Year > 2000 */ ray->h.hour = (int)head->hour; ray->h.minute = (int)head->min; ray->h.sec = (float)head->sec; ray->h.unam_rng = MISSING_VAL; /***** ?? ******/ ray->h.azimuth = mcg_ray->azm; ray->h.ray_num = ray_num; ray->h.elev = mcg_ray->elev; ray->h.elev_num = mcg_ray->sweep_num; ray->h.range_bin1 = 0; switch (head->vol_scan_format) { case 1: ray->h.gate_size = 1000; /* 1 km/bin */ ray->h.fix_angle = 24; /* 24 sweeps */ break; case 2: ray->h.gate_size = 2000; /* 2 km/bin */ ray->h.fix_angle = 24; /* 24 sweeps */ break; case 3: ray->h.gate_size = 1000; /* 1 km/bin */ ray->h.fix_angle = 12; /* 12 sweeps */ break; case 4: ray->h.gate_size = 2000; /* 2 km/bin */ ray->h.fix_angle = 12; /* 12 sweeps */ break; default: break; } /* end switch */ ray->h.vel_res = MISSING_VAL; /* ?? */ ray->h.sweep_rate = MISSING_VAL; /* ?? */ ray->h.prf = MISSING_VAL; ray->h.azim_rate = MISSING_VAL; /* ?? */ ray->h.pulse_count = MISSING_VAL; /* ?? */ ray->h.pulse_width = MISSING_VAL; /* ?? */ ray->h.frequency = MISSING_VAL; /* ?? */ ray->h.wavelength = MISSING_VAL; /* ?? */ ray->h.nyq_vel = MISSING_VAL; /* ?? */ ray->h.nbins = num_bins_rsl; ray->h.f = f; ray->h.invf = invf; } /*********************************************************************/ void Sweep_headerInit(Sweep *sweep, mcgRay_t *mcg_ray, int nrays) /*********************************************************************/ /* Arrive here _after_ sweep ray data has been filled in. */ { if (radar_verbose_flag) fprintf(stderr,"sweep_num:%02d num_rays:%d\n",mcg_ray->sweep_num, nrays); if (sweep == NULL) return; sweep->h.sweep_num = mcg_ray->sweep_num; sweep->h.elev = mcg_ray->elev; sweep->h.beam_width = 2.0; /* From Dennis' function mcg2uf(). I don't know where he got it. */ sweep->h.horz_half_bw = 1.0; sweep->h.vert_half_bw = 1.0; sweep->h.nrays = nrays; sweep->h.f = f; sweep->h.invf = invf; } /************************************************************************/ void Volume_headerInit(Volume *volume, short vol_scan_format) /************************************************************************/ { if (volume == NULL) return; volume->h.type_str = strdup("Reflectivity"); volume->h.f = f; volume->h.invf = invf; switch (vol_scan_format) { case 1: case 2: volume->h.nsweeps = 24; break; case 3: case 4: volume->h.nsweeps = 12; break; default: break; } } /***********************************************************************/ void Radar_headerInit(Radar *radar, mcgHeader_t *mcg_head) /***********************************************************************/ { radar->h.month = (int)mcg_head->month; radar->h.day = (int)mcg_head->day; radar->h.year = 1900 + (int)mcg_head->year; radar->h.hour = (int)mcg_head->hour; radar->h.minute = (int)mcg_head->min; radar->h.sec = (float)mcg_head->sec; strcpy(radar->h.radar_type, "mcgill"); radar->h.nvolumes = 1; /* Mcgill contains only refl data */ radar->h.number = MISSING_VAL; /****************/ strcpy(radar->h.name, "PAFB"); strcpy(radar->h.radar_name, "MCGILL"); strcpy(radar->h.city, "MELB"); strcpy(radar->h.state, "FL"); radar->h.latd = 28; radar->h.latm = 15; radar->h.lats = 19; radar->h.lond = -80; radar->h.lonm = -36; radar->h.lons = -21; radar->h.height = 0; radar->h.spulse = MISSING_VAL; /* ns */ /*************/ radar->h.lpulse = MISSING_VAL; /* ns */ /*************/ } /*********************************************************************/ Radar *RSL_mcgill_to_radar(char *infile) /*********************************************************************/ { /* Ingest a Mcgill format radar data file and fill a Radar RSL structure with the data. */ int ray_num, code; int *num_bins_rsl; mcgFile_t *file; Radar *radar; mcgRay_t *mcg_ray, *mcg_ray_last, *swap; extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ extern int rsl_qsweep_max; /* If no filename has been passed, there's nothing to do. */ if (infile == NULL) return NULL; /* Default conversion functions. */ f = DZ_F; invf = DZ_INVF; /* Create a structure of type Radar */ radar = (Radar *)RSL_new_radar(MAX_RADAR_VOLUMES); if (radar == NULL) { perror("RSL_mcgill_to_radar: RSL_new_radar:"); return NULL; } /* Open the Mcgill data file and read Mcgill file header into the mcgFile.head structure */ file = (mcgFile_t *)mcgFileOpen(&code, infile); if (file == NULL) goto quit; if (radar_verbose_flag) { fprintf(stderr,"Input file: %s\n", infile); fprintf(stderr,"Scan_date: %d/%d/%d\n", file->head.month, file->head.day, file->head.year); fprintf(stderr,"Scan_time: %d:%d:%d\n", file->head.hour, file->head.min, file->head.sec); fprintf(stderr,"num_recs:%d format:%d\n\n", file->head.num_records, file->head.vol_scan_format); } /* Initialize num_bins_rsl to point to the proper bin count array for the scan format. */ if ((file->head.vol_scan_format == 1) || (file->head.vol_scan_format == 3)) /* Normal mode */ { num_bins_rsl = num_bins_normal; } else /* Compressed mode */ num_bins_rsl = num_bins_compressed; /* Allocate space for two mcg_rays. mcg_ray will contain the current ray, and mcg_ray_last will contain the previous ray. The previous ray is needed only at sweep increments. */ mcg_ray = (mcgRay_t *)malloc(sizeof(mcgRay_t)); mcg_ray_last = (mcgRay_t *)malloc(sizeof(mcgRay_t)); /* Initialize the values of the Radar_header structure */ Radar_headerInit(radar, &file->head); /* Create a structure of type Volume */ radar->v[DZ_INDEX] = RSL_new_volume(MAX_SWEEPS); if (radar->v[DZ_INDEX] == NULL) { perror("mcgill_to_radar: RSL_new_volume"); return radar; } /* Initialize the values of the Volume_header structure. */ Volume_headerInit(radar->v[DZ_INDEX], file->head.vol_scan_format); /* initialize counters */ ray_num = -1; mcg_ray_last->sweep_num = -1; /* Main loop to read in a ray from the Mcgill data file and store into RSL radar structure */ while ((code = mcgRayBuild(mcg_ray, file)) == MCG_OK) { /* Discard rays with bogus azimuth values. */ if (mcg_ray->azm > 360.0) { if (radar_verbose_flag) fprintf(stderr,"**** Bogus azm:%.1f, discarding ray.\n", mcg_ray->azm); continue; } /* Check for end_of_sweep. Fill the sweep header _after_ we've read in the sweep, since we don't know the number of rays in the sweep until we find the start of the next sweep*/ if (mcg_ray_last->sweep_num < mcg_ray->sweep_num) /* new sweep? */ { if (mcg_ray_last->sweep_num >= 0) { /* fill the sweep header for the previous sweep */ Sweep_headerInit(radar->v[DZ_INDEX]->sweep[mcg_ray_last->sweep_num], mcg_ray_last, ray_num+1); } ray_num = -1; /* Reset ray counter at start of each sweep */ /* Check for too many sweeps. If we've exceeded MAX_SWEEPS, we're lost. */ if (MAX_SWEEPS < mcg_ray->sweep_num + 1) { perror("RSL_mcgill_to_radar: Exceeded expected no. of sweeps"); mcgFileClose(file); RSL_free_radar(radar); return NULL; } if (rsl_qsweep != NULL) { if (mcg_ray->sweep_num > rsl_qsweep_max) break; if (rsl_qsweep[mcg_ray->sweep_num] == 0) continue; } /* Create new sweep structure. */ radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num] = RSL_new_sweep(MAX_RAYS); if (radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num] == NULL) { perror("mcgill_to_radar: RSL_new_sweep"); return radar; } } /* end if new sweep */ ray_num += 1; /* Increment ray counter */ /* Check for too many rays. */ if (ray_num > MAX_RAYS) { perror("mcgill_to_radar: Exceeded maximal no. of rays"); mcgFileClose(file); RSL_free_radar(radar); return NULL; } /* Create a new RSL ray containing correct # of bins, and fill it. */ radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num]->ray[ray_num] = RSL_new_ray(num_bins_rsl[mcg_ray->sweep_num] + 8); if (radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num]->ray[ray_num] == NULL ) { perror("mcgill_to_radar: RSL_new_ray"); return radar; } Ray_headerInit(radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num]->ray[ray_num], &file->head, mcg_ray, ray_num, num_bins_rsl[mcg_ray->sweep_num]); RayFill(radar->v[DZ_INDEX]->sweep[mcg_ray->sweep_num]->ray[ray_num], mcg_ray); /* Swap mcg_ray pointers so that the current mcg_ray, which we've finished loading into an RSL_ray, becomes mcg_ray_last . */ swap = (mcgRay_t *)mcg_ray_last; mcg_ray_last = (mcgRay_t *)mcg_ray; mcg_ray = (mcgRay_t *)swap; } /* end while */ /* At this point, we're finished reading file records. Fill in the last sweep header. */ Sweep_headerInit(radar->v[DZ_INDEX]->sweep[mcg_ray_last->sweep_num], mcg_ray_last, ray_num+1); /* Check which flag the mcgill routines returned, and print appropriate terminating message */ quit: if (radar_verbose_flag) { switch (code) { case MCG_EOD: fprintf(stderr,"MCG_EOD: Reached end of data file\n"); break; case MCG_OPEN_FILE_ERR: fprintf(stderr,"MCG_OPEN_FILE_ERR: Error opening Mcgill data file\n"); break; case MCG_EOF: fprintf(stderr,"MCG_EOF: End of data file reached prematurely\n"); break; case MCG_READ_ERR: fprintf(stderr,"MCG_READ_ERR: Error occurred while reading from data file\n"); break; case MCG_FORMAT_ERR: fprintf(stderr,"MCG_FORMAT_ERR: Format error encountered in data file\n"); break; default: fprintf(stderr,"Error reading data file \n"); break; } } /* end if (radar_verbose_flag) */ if (code == MCG_EOD) /* Successfully read in Mcgill file? */ { mcgFileClose(file); radar = RSL_prune_radar(radar); return(radar); } else /* Fatal error occurred */ { RSL_free_radar(radar); return(NULL); } } rsl-v1.43/config.sub0000755000102200007640000007305511312033143011330 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-18' # 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 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* | freebsd*-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) 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] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | 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 \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | 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-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | 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-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | 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-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | 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-* | 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 ;; 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 ;; 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 ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; 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 ;; 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 ;; 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 ;; 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* | -netbsd* | -openbsd* | -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* | -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*) # 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*) 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 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -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 ;; -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 ;; -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 ;; *-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 ;; -ptx*) vendor=sequent ;; -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: rsl-v1.43/histogram.c0000644000102200007640000002065607634132711011522 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 David B. Wolff Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include "rsl.h" /*********************************************************************/ /* */ /* Unless otherwise stated, all routines in this file are */ /* were coded by David B. Wolff, Space Applications Corporation, */ /* Landover, MD. */ /* */ /*********************************************************************/ extern int radar_verbose_flag; /**********************************************************/ /* This set of functions and typedefs create a histogram */ /* from a volume, sweep or ray. The structure of the */ /* histogram is as such: */ /* */ /* histogram->nbins # number of bins in histogram */ /* histogram->low # Low end of histogram */ /* histogram->hi # High end of histogram */ /* histogram->ucount # Total number of bins looked at */ /* # in calculating histogram */ /* histogram->ccount # Valid number of bins looked at */ /* # in calculating histogram */ /* histogram->data[] # Counts of each bin (How is this */ /* # allocated???? */ /**********************************************************/ /** DBW and JHM *******************************************/ /**********************************************************/ Histogram *RSL_allocate_histogram(int low, int hi) { Histogram *histogram; int nbins; nbins = hi - low + 1; histogram = (Histogram *)calloc(1, sizeof(Histogram)); if (histogram) { histogram->nbins = nbins; histogram->low = low; histogram->hi = hi; histogram->ucount = 0; histogram->ccount = 0; histogram->data = (int *)calloc(nbins, sizeof(int)); } return histogram; } /*********************************************************************/ /* */ /* RSL_free_histogram */ /* */ /*********************************************************************/ void RSL_free_histogram(Histogram *histogram) { if (histogram == NULL) return; if (histogram->data) free(histogram->data); free(histogram); } /*********************************************************/ /** DBW and JHM ******************************************/ /*********************************************************/ void RSL_print_histogram(Histogram *histogram, int min_range, int max_range, char *filename) { float PDF[200], CDF[200]; int nbins; float ucount, ccount; int i, index; FILE *fp; /* Print the stats on this histogram */ if(histogram == NULL) { perror("Cannot print NULL histogram"); return; } if (radar_verbose_flag) fprintf(stderr,"print_histogram: %s\n",filename); if((fp = fopen(filename,"w")) == NULL ) { perror(filename); return; } fprintf(fp,"Min range = %d\n", min_range); fprintf(fp,"Max range = %d\n", max_range); fprintf(fp,"histogram->nbins = %d\n",histogram->nbins); fprintf(fp,"histogram->low = %d\n",histogram->low); fprintf(fp,"histogram->hi = %d\n",histogram->hi); fprintf(fp,"histogram->ucount = %d\n",histogram->ucount); fprintf(fp,"histogram->ccount = %d\n",histogram->ccount); /* Compute the PDF and CDF from the histogram. PDF = histogram->data[i]/ucount (PDF) CDF = runsum(PDF) (CDF) */ nbins = histogram->nbins; ucount = histogram->ucount; ccount = histogram->ccount; for(i=0; idata[i]/ucount; PDF[i] = histogram->data[i]/ccount; } CDF[0] = PDF[0]; for(i=0; ilow; fprintf(fp,"\nBin Count PDF CDF\n"); for(i=0; idata[i], PDF[i],CDF[i]); index++; } fclose(fp); } Histogram *RSL_read_histogram(char *infile) { FILE *fp; int n; int low, hi; int nbins; Histogram *histogram; if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return NULL; } /* 1. nbins, ucount, count 2. data[0..nbins-1] */ n = 0; n += fread(&nbins, sizeof(nbins), 1, fp); n += fread(&low, sizeof(int), 1, fp); n += fread(&hi, sizeof(int), 1, fp); if ((histogram = RSL_allocate_histogram(low, hi)) == NULL) { perror("read_histogram"); return NULL; } if(histogram->low != low || histogram->hi != hi) { perror("Incompatible histograms"); return NULL; } n += fread(&histogram->ucount, sizeof(int), 1, fp); n += fread(&histogram->ccount, sizeof(int), 1, fp); n += fread(histogram->data, sizeof(int), nbins, fp); fclose(fp); return histogram; } int RSL_write_histogram(Histogram *histogram, char *outfile) { FILE *fp; int n; if ((fp = fopen(outfile, "w")) == NULL) { perror(outfile); return -1; } /* 1. nbins, ucount, count 2. data[0..nbins-1] */ n = 0; n += fwrite(&histogram->nbins, sizeof(int), 1, fp); n += fwrite(&histogram->low, sizeof(int), 1, fp); n += fwrite(&histogram->hi, sizeof(int), 1, fp); n += fwrite(&histogram->ucount, sizeof(int), 1, fp); n += fwrite(&histogram->ccount, sizeof(int), 1, fp); n += fwrite(histogram->data, sizeof(int), histogram->nbins, fp); fclose(fp); return n; } /*********************************************************/ /** DBW and JHM ******************************************/ /*********************************************************/ Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range) { int i, index; float dbz, ray_resolution, range; float (*f)(Range x); if (histogram == NULL ) { if (radar_verbose_flag) fprintf(stderr,"Allocating histogram at ray level\n"); histogram = RSL_allocate_histogram(low, hi); } if(ray != NULL) { ray_resolution = ray->h.gate_size/1000.0; f = ray->h.f; for(i=0; ih.nbins; i++) { histogram->ucount++; range = i*ray_resolution + ray->h.range_bin1/1000.; if(range < min_range) continue; if(range > max_range) break; dbz = f(ray->range[i]); if(dbz >= histogram->low && dbz <= histogram->hi) { index = dbz - histogram->low; histogram->ccount++; histogram->data[index]++; } } } return histogram; } Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range) { int i; if (histogram == NULL ) { if (radar_verbose_flag) fprintf(stderr,"Allocating histogram at sweep level\n"); histogram = RSL_allocate_histogram(low, hi); } if(sweep != NULL) { for(i=0; ih.nrays; i++) { histogram = RSL_get_histogram_from_ray(sweep->ray[i], histogram, low, hi, min_range, max_range); } } return histogram; } Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range) { int i; if (histogram == NULL ) { if (radar_verbose_flag) fprintf(stderr,"Allocating histogram at volume level\n"); histogram = RSL_allocate_histogram(low, hi); } if(volume == NULL) return NULL; for(i=0; ih.nsweeps; i++) { histogram = RSL_get_histogram_from_sweep(volume->sweep[i], histogram, low, hi, min_range,max_range); } return histogram; } rsl-v1.43/prune.c0000644000102200007640000000550206600002401010627 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * The PRUNE functions eliminate NULL or non-present (no data present) * substructures. This tightens the structures for output. Development * was sparked by failing NCAR UF ingest programs; they cannot handle * 0 sized volumes/sweeps/rays dispite conformity to the UF specification. * * These routines free memory that is pruned. * * John H. Merritt * Space Applications Corporation * December 12, 1995 */ #include "rsl.h" extern int radar_verbose_flag; Ray *RSL_prune_ray(Ray *ray) { if (ray == NULL) return NULL; if (ray->h.nbins > 0) return ray; RSL_free_ray(ray); return NULL; } Sweep *RSL_prune_sweep(Sweep *s) { int i, j; if (s == NULL) return NULL; if (s->h.nrays == 0) { RSL_free_sweep(s); return NULL; } /* * Squash out all dataless rays. 'j' is the index for the squashed (pruned) * rays. */ for (i=0,j=0; ih.nrays; i++) if ((s->ray[i] = RSL_prune_ray(s->ray[i]))) s->ray[j++] = s->ray[i]; /* Keep this ray. */ if (j==0) { RSL_free_sweep(s); return NULL; /* All rays were pruned. */ } for (i=j; ih.nrays; i++) s->ray[i] = NULL; s->h.nrays = j; return s; } Volume *RSL_prune_volume(Volume *v) { int i, j; if (v == NULL) return NULL; if (v->h.nsweeps == 0) { RSL_free_volume(v); return NULL; } /* * Squash out all dataless sweeps. 'j' is the index for sweep containing data. */ for (i=0,j=0; ih.nsweeps; i++) if ((v->sweep[i] = RSL_prune_sweep(v->sweep[i]))) v->sweep[j++] = v->sweep[i]; /* Keep this sweep. */ if (j==0) { RSL_free_volume(v); return NULL; /* All sweeps were pruned. */ } for (i=j; ih.nsweeps; i++) v->sweep[i] = NULL; v->h.nsweeps = j; return v; } Radar *RSL_prune_radar(Radar *radar) { int i; /* Volume indexes are fixed so we just prune the substructures. */ if (radar == NULL) return NULL; for (i=0; ih.nvolumes; i++) radar->v[i] = RSL_prune_volume(radar->v[i]); return radar; } rsl-v1.43/dorade.h0000644000102200007640000003702211212304223010745 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996-1999 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _dorade_ #define _dorade_ #include typedef struct { char code[4]; int len; char *comment; /* 0..len-1 of comments (N bytes ASCII, N%4==0 */ } Comment_block; typedef struct { char code[4]; /* Code identifier for the volume descriptor. (4 ASCII "VOLD") */ int len; /* Length of the volume descriptor. (4 byte int) */ short version; /* Version number of the format. (2 byte int) */ short volume_number; /* Volume number from the begining of the data set. (2 byte int) */ int max_bytes; /* Maximum number of bytes in a data record. (4 byte int) */ char project_name[20]; /* Project name. (20 ASCII) */ short year; /* Year YYYY e.g. 1999 (2 byte int) */ short month; /* Month 1-12 (2 byte int) */ short day; /* Day 1-31 (2 byte int) */ short hour; /* Hour 1-23 (2 byte int) */ short minute; /* Minute 0-59 (2 byte int) */ short second; /* Second 0-59 (2 byte int) */ char flight_num[8]; /* Flight number (8 ASCII) for airborne raar or IOP number for ground based radars. */ char facility_name[8]; /* Generation facility. (8 ASCII) */ short gen_year; /* Generation year YYYY. (2 byte int) */ short gen_month; /* Generation month 1-12. (2 byte int) */ short gen_day; /* Generation day 1-31. (2 byte int) */ short nsensors; /* Number of sennsor descriptors to follow. (2 byte int) */ } Volume_desc; typedef struct { char code[4]; /* Code identifier for the radar descriptor. (4 ASCII "RADD") */ int len; /* Length of the radar descriptor. (4 byte int) */ char radar_name[8]; /* Radar name. (8 ASCII) */ float radar_constant;/* Radar constant. */ float peak_power; /* Nominal Peak power. [kw] */ float noise_power; /* Nominal Noise power. [dBm] */ float rcvr_gain; /* Receiver gain. [dB] */ float ant_gain; /* Antenna gain. [dB] */ float radar_system_gain; /* [dB] */ float horizontal_beam_width; /* [deg] */ float vertical_beam_width; /* [deg] */ short radar_type; /* 0--Ground 1--Airborne fore 2--Airborne aft 3--Airborne tail 4--Airborne lower fuselage 5--Shipborne */ short scan_mode; /* 0--Calibration 1--PPI (Constant elevation) 2--Coplane 3--RHI (Constant azimuth) 4--Vertical pointing 5--Target (Stationary, not vertical pointing) 6--Manual 7--Idle (out of control) 8--Surveillance 9--Vertical sweep (rotation axis parallels the fuselage) */ float scan_rate; /* Nominal scan rate. [deg/sec] */ float start_angle; /* Nominal start angle. [deg] */ float stop_angle; /* Nominal stop angle. [deg] */ short nparam_desc; /* Total number of parameter descriptors for this radar. (2 byte int) */ short ndesc; /* Total number of descriptors for this radar. (2 byte int) */ short compress_code; /* Data compression format code. (2 byte int): 0--no compression 1--data compression (compression algorithm described in the ASCII file athe the begining of the file. */ short compress_algo; /* Data reduction algorithm: 0--No data reduction. 1--Data recorded between two rotation angles. 2--Data recorded between two concentic angles. 3--Data recorded between two altitudes. 4-N--Other types of data reduction. */ float data_reduction_param1; /* Data reduction specific parameter #1 1--Smallest positive angle [deg]. 2--Inner circle diameter [km]. 3--Minimum altitude [km]. 4-N--Will be defined if other types created. */ float data_reduction_param2; /* Data reduction specific parameter #2 1--Largest positive angle [deg]. 2--Outer circle diameter [km]. 3--Maximum altitude [km]. 4-N--Will be defined if other types created. */ float longitude; /* Radar longitude [deg]. If airborne, airport longitude. */ float latitude; /* Radar latitude [deg]. If airborne, airport latitude. */ float altitude; /* Radar altitude of mean sea level (msl) [km]. If airborne, airport altitude. */ float unambiguous_velocity; /* Effective unambiguous velocity [m/s]. */ float unambiguous_range; /* Effective unambiguous range [km]. */ short nfreq; /* Number of freqencies transmitted (2 byte int). */ short npulse_periods; /* Number of different inter-pulse periods (IPP's) transmitted. (2 byte int). */ float freq[5]; /* Frequency 1..5 [GHz] (float) */ float period[5]; /* Interpulse Period (IPP) 1..5 [ms] (float) */ } Radar_desc; typedef struct { char code[4]; /* Code identifier. (4 ASCII "PARM") */ int len; /* Length of this descriptor. */ char name[8]; /* Name of the parameter. */ char description[40]; /* Description of the parameter. */ char units[8]; /* Units (8 ASCII) */ short ipp; /* Inter-pulse periods. Bit 0 set to 1 indicates IPP#1 is used in this parameter. Similiarly for bits 1,2,3 and 4 and IPP's 2,3,4 and 5. */ short xmit_freq; /* Transmittd frequencies. Bit 0 set to 1 indicates Frequency#1 is used in this parameter. Similiarly for bits 1,2,3 and 4 and Frequencies 2,3,4 and 5. */ float rcvr_bandwidth;/* [MHz] */ short pulse_width; /* [m] */ short polarization; /* 0--Horizontal 1--Vertical 2--Circular, Right handed 3--Elliptical 4--Circular, Left handed 5--Dual polarization */ short nsamp_in_dwell_time; /* Number of samples in dwell time. */ short parameter_type; /* 1--8 bit integer 2--16 bit integer 3--32 bit integer 4--floating point (32 bit IEEE) */ char threshold_field[8]; float threshold_value; /* Units depend on the threshold field. */ float scale_factor; /* Scale factor. */ float offset_factor; /* meteorological val = (recorded val - offset factor) / scale factor */ int missing_data_flag; /* Deleted or missing data flag. 256for bytes, -999 for all others. */ } Parameter_desc; typedef struct { char code[4]; /* Code identifier. (4 ASCII "CELV") */ int len; /* Length of this descriptor. */ int ncells; /* Number of cells definced in this vector. */ float *range_cell; /* Range to cell n [m] (0..ncells-1) */ } Cell_range_vector; typedef struct { char code[4]; /* Code identifier. (4 ASCII "CFAC") */ int len; /* Length of this descriptor. */ float azimuth; /* Correction for azimuth [deg]. */ float elevation; /* Correction for elevation [deg]. */ float range; /* Correction for range delay [m]. */ float longitude; /* Correction for radar longitude [deg]. */ float latitude; /* Correction for radar latitude [deg]. */ float altitude; /* Correction for radar pressure altitude (msl) [km]. */ float height; /* Correction for radar altitude above ground (agl) [km]. */ float speed_east_west; /* Correction for radar platform ground speed E->W [m/s]. */ float speed_north_south; /* Correction for radar platform ground spedd N->S [m/s]. */ float vertical_velocity; /* Correction for radar platform vertical velocity [m/s]. */ float heading; /* Correction for radar platform heading [deg]. */ float roll; /* Correction for radar platform roll [deg]. */ float pitch; /* Correction for radar platform pitch [deg]. */ float drift; /* Correction for radar platform drift [deg]. */ float rotation_angle; /* Correction for radar rotation angle [deg]. */ float tilt_angle; /* Correction for radar tilt angle [deg]. */ } Correction_factor_desc; typedef struct { char code[4]; /* Code identifier. (4 ASCII "SWIB") */ int len; /* Length of this descriptor. */ char radar_name[8]; /* Radar name. */ int sweep_num; /* Sweep number from beginning of volume. */ int nrays; /* Number of rays recorded in this sweep. */ float start_angle; /* True start angle [deg]. */ float stop_angle; /* True stop angle [deg]. */ float fixed_angle; /* Fixed angle [deg]. */ int filter_flag; /* Filter flag: 0--No filtering in use. 1--ON (Algorithm described in ASCII file at beginning of the file.) */ } Sweep_info; typedef struct { char code[4]; /* Code identifier. (4 ASCII "RYIB") */ int len; /* Length of this descriptor. */ int sweep_num; int jday; /* Julian day. (from beginning of year :-) */ short hour; /* Hour 0-23. */ short minute; /* Minute 0-59. */ short second; /* Second 0-59. */ short msec; /* Millisecond. */ float azimuth; /* [deg] */ float elevation; /* [deg] */ float peak_power;/* Peak transmitted power [kw] */ float scan_rate; /* [deg/sec]. */ int status; /* Ray status: 0--Normal 1--Transition (antenna repositioning) 2--Bad 3--Questionable */ } Ray_info; typedef struct { /* Especially for moving radars. */ char code[4]; /* Code identifier. (4 ASCII "ASIB") */ int len; /* Length of this descriptor. */ float longitude; /* Radar longitude [deg]. */ float latitude; /* Radar latitude [deg]. */ float altitude; /* Radar pressure altitude (msl) [km]. */ float height; /* Radar above ground altitude (agl) [km]. */ float ew_speed; /* Platform ground speed (E (positive) or W) [m/s]. */ float ns_speed; /* Platform ground speed (N (positive) or S) [m/s]. */ float v_speed; /* Platform vertical velocity [m/s]. */ float heading; /* Platform heading [deg]. */ float roll; /* Platform roll [deg]. */ float pitch; /* Platform pitch [deg]. */ float drift; /* Platform drift [deg]. */ float rotation; /* Platform rotation angle [deg]. */ float tilt; /* Platform tilt [deg]. */ float ew_wind_speed; /* Horizontal wind speed at radar (toward East positive) [m/s]. */ float ns_wind_speed; /* Horizontal wind speed at radar (toward North positive) [m/s]. */ float v_wind_speed; /* Vertical wind speed at radar (up is positive) [m/s]. */ float heading_rate; /* Heading change rate [deg/sec]. */ float pitch_rate; /* Pitch change rate [deg/sec]. */ } Platform_info; typedef struct { char code[4]; /* Code identifier. (4 ASCII "RDAT") */ int len; /* Length of this descriptor. */ char name[8]; /* Name of parameter. (See name in 'parameter descriptor'). */ char *data; /* Length as described in Parameter_desc. */ } Parameter_data; /* Higher level objects */ typedef struct { Radar_desc *radar_desc; int nparam; Parameter_desc **p_desc; /* 0..nparam-1 */ Cell_range_vector *cell_range_vector; Correction_factor_desc *correction_factor_desc; } Sensor_desc; typedef struct { Ray_info *ray_info; Platform_info *platform_info; int nparam; int *data_len; /* 0..nparam-1 * Length of *parameter_data[i] in bytes. * This is length of data portion. */ int *word_size; /* 0..nparam-1 * Size of each word in *parameter_data[i]. */ Parameter_data **parameter_data; /* 0..nparam-1 */ } Data_ray; typedef struct { Sweep_info *s_info; int nrays; Data_ray **data_ray; /* 0..nrays-1 */ } Sweep_record; /* PROTOTYPES */ Comment_block *dorade_read_comment_block(FILE *in); Volume_desc *dorade_read_volume_desc (FILE *in); /* Sensor descriptor routines. */ Radar_desc *dorade_read_radar_desc (FILE *in); Parameter_desc *dorade_read_parameter_desc (FILE *in); Cell_range_vector *dorade_read_cell_range_vector (FILE *in); Correction_factor_desc *dorade_read_correction_factor_desc(FILE *in); Sensor_desc *dorade_read_sensor (FILE *in); Sweep_info *dorade_read_sweep_info(FILE *in); Sweep_record *dorade_read_sweep(FILE *fp, Sensor_desc **sd); /* Data Ray routines. */ Ray_info *dorade_read_ray_info (FILE *in); Platform_info *dorade_read_platform_info (FILE *in); Parameter_data *dorade_read_parameter_data(FILE *in); Data_ray *dorade_read_ray (FILE *in); /* Memory management routines. */ void dorade_free_sweep(Sweep_record *s); void dorade_free_data_ray(Data_ray *r); /* Print routines. */ void dorade_print_sweep_info(Sweep_info *d); void dorade_print_ray_info(Ray_info *d); void dorade_print_platform_info(Platform_info *d); void dorade_print_correction_factor_desc(Correction_factor_desc *d); void dorade_print_cell_range_vector(Cell_range_vector *d); void dorade_print_parameter_desc(Parameter_desc *d); void dorade_print_radar_desc(Radar_desc *d); void dorade_print_volume_desc(Volume_desc *d); void dorade_print_comment_block(Comment_block *cb); void dorade_print_sensor(Sensor_desc *s); #endif rsl-v1.43/endian.c0000644000102200007640000000330106600002400010726 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ int big_endian(void); int little_endian(void); void swap_4_bytes(void *word); void swap_2_bytes(void *word); int big_endian(void) { union { unsigned char byte[4]; int val; } word; word.val = 0; word.byte[3] = 0x1; return word.val == 1; } int little_endian(void) { union { unsigned char byte[4]; int val; } word; word.val = 0; word.byte[3] = 0x1; return word.val != 1; } void swap_4_bytes(void *word) { unsigned char *byte; unsigned char temp; byte = word; temp = byte[0]; byte[0] = byte[3]; byte[3] = temp; temp = byte[1]; byte[1] = byte[2]; byte[2] = temp; } void swap_2_bytes(void *word) { unsigned char *byte; unsigned char temp; byte = word; temp = byte[0]; byte[0] = byte[1]; byte[1] = temp; } rsl-v1.43/image_gen.c0000644000102200007640000013332510135755373011443 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* *--------------------------------------------------------------------- * Image generation functions: * * void RSL_load_color_table(char *infile, char buffer[256], int *ncolors); * void RSL_load_red_table(char *infile); * void RSL_load_green_table(char *infile); * void RSL_load_blue_table(char *infile); * void RSL_load_refl_color_table(); * void RSL_load_vel_color_table(); * void RSL_load_sw_color_table(); * void RSL_load_height_color_table(); * void RSL_load_rainfall_color_table(); * void RSL_bscan_ray(FILE *fp, Ray *r); * void RSL_bscan_sweep(Sweep *s, char *outfile); * void RSL_bscan_volume(Volume *v, char *basename); * unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range); * unsigned char *RSL_rhi_sweep_to_cart(Sweep *s, int xdim, int ydim, float range, int vert_scale); * void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); * void RSL_write_pict(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); * void RSL_write_ppm(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]); * void RSL_write_pgm(char *outfile, unsigned char *image, int xdim, int ydim); * void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range); * void RSL_rhi_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range, int vert_scale); * void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range); * void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range); * void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range); * void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range); * void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range); * void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range); * void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range); * void RSL_rebin_velocity_ray(Ray *r); * void RSL_rebin_velocity_sweep(Sweep *s); * void RSL_rebin_velocity_volume(Volume *v); * void RSL_rebin_zdr_ray(Ray *r); * void RSL_rebin_zdr_sweep(Sweep *s); * void RSL_rebin_zdr_volume(Volume *v); */ #include #include #include "rsl.h" extern FILE *popen(const char *, const char *); extern int pclose(FILE *stream); extern int radar_verbose_flag; static char color_table[256][3]; static int ncolors = 0; /**********************************************************************/ /* */ /* RSL_load_color_table */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_load_color_table(char *infile, char buffer[256], int *num_colors) { FILE *fp; fp = fopen(infile, "r"); if (fp == NULL) { perror(infile); exit(-1); } *num_colors = fread(buffer, sizeof(char), 256, fp); (void)fclose(fp); } /**********************************************************************/ /* */ /* RSL_set_color_table */ /* */ /* By: John Merritt */ /* SM&A Corporation */ /* Jan 21, 1999 */ /**********************************************************************/ void RSL_set_color_table(int icolor, char buffer[256], int ncolors) { int i; /* In RSL: Red table=RSL_RED_TABLE, * green table=RSL_GREEN_TABLE, * blue table=RSL_BLUE_TABLE. */ for (i=0; i /**********************************************************************/ /* */ /* RSL_load_refl_color_table */ /* RSL_load_vel_color_table */ /* RSL_load_sw_color_table */ /* RSL_load_zdr_color_table */ /* RSL_load_rainfall_color_table */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_load_refl_color_table() { char buffer[256]; char *fnames[3] = { REFL_RED_FILE, REFL_GREEN_FILE, REFL_BLUE_FILE }; int i, igun; for (igun=0; igun<3; igun++) { RSL_load_color_table(fnames[igun], buffer, &ncolors); for (i=0; ih.nbins); f = r->h.f; for (i=0; ih.nbins; i++) if (f(r->range[i]) != BADVAL) { if (f(r->range[i]) >= 0) outvect[i] = (unsigned char) f(r->range[i]); } else outvect[i] = (unsigned char) (255 + f(r->range[i])); for(i=0; ih.nbins; i++) (void)fwrite(color_table[outvect[i]], sizeof(char), 3, fp); } void RSL_bscan_sweep(Sweep *s, char *outfile) { int i, j, nrecs, nbins; Ray *first_ray; FILE *fp; if (s == NULL) return; fp = fopen(outfile,"w"); if (fp == NULL) { perror(outfile); return; } first_ray = RSL_get_first_ray_of_sweep(s); nrecs = s->h.nrays; nbins = first_ray->h.nbins; fprintf(fp, "P6\n# %s\n%d %d\n255\n",outfile, nbins, nrecs); outvect = NULL; outvect = (unsigned char *) calloc(nbins, sizeof(unsigned char)); if (outvect == NULL) { perror((char *)outvect); return; } /* Now, write the bscan. */ for (j=0; jh.nrays; j++) { if (s->ray[j]) RSL_bscan_ray(s->ray[j], fp); else { memset(outvect, 0, nbins); for(i=0; ih.nsweeps; i++) { (void)sprintf(outfile,"bscan.%2.2d.ppm", i); RSL_bscan_sweep(v->sweep[i], outfile); if (radar_verbose_flag) fprintf(stderr,"Output: %s\n", outfile); } free (outfile); } /**********************************************************************/ /**********************************************************************/ /* */ /* Volume to cartesean GIF */ /* (polar to cartesean) */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ /**********************************************************************/ #include /**********************************************************************/ /* */ /* RSL_sweep_to_cart */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ unsigned char *RSL_sweep_to_cart(Sweep *s, int xdim, int ydim, float range) { /* Range specifies the maximum range to load that points into the image. */ int x, y; float azim, r; float val; int the_index; Ray *ray; float beam_width; static unsigned char *cart_image = NULL; if (s == NULL) return NULL; if (xdim != ydim || ydim < 0 || xdim < 0) { fprintf(stderr, "(xdim=%d) != (ydim=%d) or either negative.\n", xdim, ydim); return NULL; } cart_image = (unsigned char *) calloc(xdim*ydim, sizeof(unsigned char)); beam_width = s->h.beam_width/2.0 * 1.2; if (beam_width == 0) beam_width = 1.2; /* Sane image generation. */ for (y=-ydim/2; y=0 && x<0) /* Quad: 2 */ azim += 180; /* Radar is clockwise increasing. */ azim = -azim; azim -= 90.0; if (azim < 0) azim += 360.0; r = (float)sqrt((double)x*x + (double)y*y); if (ydim < xdim) r *= range/(.5*ydim); else r *= range/(.5*xdim); if (r > range) val = BADVAL; else { ray = RSL_get_closest_ray_from_sweep(s, azim, beam_width); val = RSL_get_value_from_ray(ray, r); } the_index = (y+ydim/2)*ydim + (xdim-1)-(x+xdim/2); if (val == BADVAL || val == NOTFOUND_V || val == NOTFOUND_H) cart_image[the_index] = (unsigned char) 0; else if (val >= 0) cart_image[the_index] = (unsigned char) val; else cart_image[the_index] = (unsigned char) (256+val); } return cart_image; } /**********************************************************************/ /* */ /* RSL_rhi_sweep_to_cart */ /* */ /* A modified version of RSL_sweep_to_cart() */ /* -> Handles rhi (vertical) sweeps */ /* Kolander */ /* Space Applications Corporation */ /* July 27, 1995 */ /**********************************************************************/ unsigned char *RSL_rhi_sweep_to_cart(Sweep *s, int xdim, int ydim, float range, int vert_scale) { int x, y, xx, yy, i, j; float angle, r; float val; int the_index; static unsigned char *rhi_cart_image = NULL; static unsigned char *buffer = NULL; if (s == NULL) return NULL; if (buffer == NULL) buffer = (unsigned char *)calloc(xdim*ydim, sizeof(unsigned char)); if (rhi_cart_image == NULL) rhi_cart_image = (unsigned char *)calloc(xdim*ydim, sizeof(unsigned char)); memset(buffer, (unsigned char)0, xdim*ydim); memset(rhi_cart_image, (unsigned char)0, xdim*ydim); for (y=0; y range) val = BADVAL; else val = RSL_get_value_from_sweep(s, angle, r); /* A vertical sweep extends from 0 deg to perhaps 25 deg in elevation. For proper orientation of a displayed rhi vertical sweep: 1. reflect image about the line y=x . 2. translate image downward so that radar site is located at the bottom left corner of the image. The sweep will then extend upward from the bottom of the image. */ xx = y; /* reflection about line y=x */ yy = x; /* reflection about line y=x */ the_index = (ydim - 1 - yy)*xdim + xx; if (val == BADVAL || val == NOTFOUND_V || val == NOTFOUND_H) buffer[the_index] = (unsigned char) 0; else if (val >= 0) buffer[the_index] = (unsigned char) val; else buffer[the_index] = (unsigned char) (256+val); } /* To see details in the sweep, it is customary to scale the image so that the scale of the vertical axis is 5 or 10 times the scale of the horizontal axis. Copy each row of pixel values from buffer[] a constant multiple number of times into rhi_cart_image[], in order to vertically expand the image. */ for (j=0; j /**********************************************************************/ /* */ /* RSL_write_gif */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_write_gif(char *outfile, unsigned char *image, int xdim, int ydim, char c_table[256][3]) { int i; int nbytes; char pipecmd[300]; FILE *fpipe; if (image == NULL) { fprintf(stderr, "No image for file %s\n", outfile); return; } fpipe = NULL; nbytes = xdim*ydim; (void)sprintf(pipecmd, "ppmtogif > %s 2>/dev/null", outfile); fpipe = popen(pipecmd, "w"); /* Global FILE * */ if (fpipe == NULL) { perror("RSL_write_gif1"); return; } if (fprintf(fpipe, "P6\n# %s\n%d %d\n255\n",outfile, xdim, ydim) < 0) { perror("RSL_write_gif2"); pclose(fpipe); return; } for (i=0; i %s 2>/dev/null", outfile); fpipe = popen(pipecmd, "w"); /* Global FILE * */ fprintf(fpipe, "P6\n# %s\n%d %d\n255\n",outfile, xdim, ydim); for (i=0; i %s.gz 2>/dev/null", outfile); fpipe = popen(pipecmd, "w"); /* Global FILE * */ fprintf(fpipe, "P5\n# %s\n%d %d\n255\n",outfile, xdim, ydim); (void)fwrite(image, sizeof(char), nbytes, fpipe); (void)pclose(fpipe); /* The following is commented and is for non compressed. */ #ifdef COMPILE nbytes = xdim*ydim; fpipe = fopen(outfile, "w"); /* Global FILE * */ fprintf(fpipe, "P5\n# %s\n%d %d\n255\n",outfile, xdim, ydim); (void)fwrite(image, sizeof(char), nbytes, fpipe); (void)fclose(fpipe); #endif } /**********************************************************************/ /* */ /* RSL_sweep_to_gif */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (s == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_sweep_to_cart(s, xdim, ydim, range); RSL_write_gif(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_rhi_sweep_to_gif */ /* */ /* Slightly modified version of RSL_sweep_to_gif() */ /* */ /* By: Kolander */ /* Space Applications Corporation */ /* July 27, 1995 */ /**********************************************************************/ void RSL_rhi_sweep_to_gif(Sweep *s, char *outfile, int xdim, int ydim, float range, int vert_scale) { unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (s == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_rhi_sweep_to_cart(s, xdim, ydim, range, vert_scale); RSL_write_gif(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_sweep_to_pict */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_sweep_to_pict(Sweep *s, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (s == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_sweep_to_cart(s, xdim, ydim, range); RSL_write_pict(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_sweep_to_ppm */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_sweep_to_ppm(Sweep *s, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (s == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_sweep_to_cart(s, xdim, ydim, range); RSL_write_ppm(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_sweep_to_pgm */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_sweep_to_pgm(Sweep *s, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; if (s == NULL) return; cart_image = RSL_sweep_to_cart(s, xdim, ydim, range); RSL_write_pgm(outfile, cart_image, xdim, ydim); free(cart_image); } /**********************************************************************/ /* */ /* RSL_volume_to_gif */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_volume_to_gif(Volume *v, char *basename, int xdim, int ydim, float range) { /* * Make a xdim by ydim cartesean image. Center of radar is xdim/2,ydim/2. */ int i; char outfile[100]; unsigned char *cart_image; if (v == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } /* * Sweep 0 has Reflectivity only. * Sweep 1 has Velocity and Spectrum width, No Reflectivity. * Sweep > 1 any. * */ for (i=0; ih.nsweeps; i++) { (void)sprintf(outfile,"%s.%2.2d.gif", basename, i); /* File name: sweep.[0-10] */ if (v->sweep[i] == NULL) continue; cart_image = RSL_sweep_to_cart(v->sweep[i], xdim, ydim, range); if (radar_verbose_flag) fprintf(stderr,"==> Sweep %d of %d\n",i, v->h.nsweeps); if (cart_image != NULL) { RSL_write_gif(outfile, cart_image, xdim, ydim, color_table); printf("%s\n", outfile); free (cart_image); } else { if (radar_verbose_flag) fprintf(stderr,"No image. cart_image for sweep %d is NULL.\n", i); } } } /**********************************************************************/ /* */ /* RSL_volume_to_pict */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_volume_to_pict(Volume *v, char *basename, int xdim, int ydim, float range) { /* * Make a xdim by ydim cartesean image. Center of radar is xdim/2,ydim/2. */ int i; char outfile[100]; unsigned char *cart_image; if (v == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } /* * Sweep 0 has Reflectivity only. * Sweep 1 has Velocity and Spectrum width, No Reflectivity. * Sweep > 1 any. * */ for (i=0; ih.nsweeps; i++) { cart_image = RSL_sweep_to_cart(v->sweep[i], xdim, ydim, range); if (radar_verbose_flag) fprintf(stderr,"==> Sweep %d of %d\n",i, v->h.nsweeps); (void)sprintf(outfile,"%s.%2.2d.pict", basename, i); /* File name: sweep.[0-10] */ if (cart_image != NULL) { RSL_write_pict(outfile, cart_image, xdim, ydim, color_table); if (radar_verbose_flag) fprintf(stderr,"Wrote: %s\n", outfile); free (cart_image); } else { if (radar_verbose_flag) fprintf(stderr,"No image. cart_image for sweep %d is NULL.\n", i); } } } /**********************************************************************/ /* */ /* RSL_volume_to_ppm */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_volume_to_ppm(Volume *v, char *basename, int xdim, int ydim, float range) { /* * Make a xdim by ydim cartesean image. Center of radar is xdim/2,ydim/2. */ int i; char outfile[100]; unsigned char *cart_image; if (v == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } /* * Sweep 0 has Reflectivity only. * Sweep 1 has Velocity and Spectrum width, No Reflectivity. * Sweep > 1 any. * */ for (i=0; ih.nsweeps; i++) { cart_image = RSL_sweep_to_cart(v->sweep[i], xdim, ydim, range); if (radar_verbose_flag) fprintf(stderr,"==> Sweep %d of %d\n",i, v->h.nsweeps); (void)sprintf(outfile,"%s.%2.2d.ppm", basename, i); /* File name: sweep.[0-10] */ if (cart_image != NULL) { RSL_write_ppm(outfile, cart_image, xdim, ydim, color_table); if (radar_verbose_flag) fprintf(stderr,"Wrote: %s\n", outfile); free (cart_image); } else { if (radar_verbose_flag) fprintf(stderr,"No image. cart_image for sweep %d is NULL.\n", i); } } } /**********************************************************************/ /* */ /* RSL_volume_to_pgm */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 7, 1994 */ /**********************************************************************/ void RSL_volume_to_pgm(Volume *v, char *basename, int xdim, int ydim, float range) { /* * Make a xdim by ydim cartesean image. Center of radar is xdim/2,ydim/2. */ int i; char outfile[100]; unsigned char *cart_image; /* * Sweep 0 has Reflectivity only. * Sweep 1 has Velocity and Spectrum width, No Reflectivity. * Sweep > 1 any. * */ if (v == NULL) return; for (i=0; ih.nsweeps; i++) { cart_image = RSL_sweep_to_cart(v->sweep[i], xdim, ydim, range); if (radar_verbose_flag) fprintf(stderr,"==> Sweep %d of %d\n",i, v->h.nsweeps); (void)sprintf(outfile,"%s.%2.2d.pgm", basename, i); /* File name: sweep.[0-10] */ if (cart_image != NULL) { RSL_write_pgm(outfile, cart_image, xdim, ydim); if (radar_verbose_flag) fprintf(stderr,"Wrote: %s\n", outfile); free (cart_image); } else { if (radar_verbose_flag) fprintf(stderr,"No image. cart_image for sweep %d is NULL.\n", i); } } } /***********************************************************************/ /* */ /* RSL_rebin_velocity_ray */ /* RSL_rebin_velocity_sweep */ /* RSL_rebin_velocity_volume */ /* */ /* By: John Merritt */ /* Space Applications Corporation */ /* April 30, 1994 */ /* */ /***********************************************************************/ void RSL_rebin_velocity_ray(Ray *r) { /* Rebin the velocity data to the range -nyquist, +nyquist. * 14 bins are created centered at 0. It sets the proper color look up * indexes. This function modifies Ray r. */ int i; float nyquist; float val /* val1 */; int ncbins = 15; /* Number of color bins */ float (*f)(Range x); Range (*invf)(float x); if (r == NULL) return; nyquist = r->h.nyq_vel; if (nyquist == 0.0) { fprintf(stderr, "RSL_rebin_velocity_ray: nyquist == 0.0\n"); fprintf(stderr, "RSL_rebin_velocity_ray: Unable to rebin.\n"); return; } f = r->h.f; invf = r->h.invf; for (i=0; ih.nbins; i++) { val = f(r->range[i]); if (val == RFVAL) { val = 16; } else if (val != BADVAL) { /* Okay, we want to shift the data to positive values then we re-scale them by the number of color bins/nyquist */ val = (int)(val/nyquist*(ncbins/2) + 1.0 + ncbins/2); } else { val = 0; } r->range[i] = invf(val); } } void RSL_rebin_velocity_sweep(Sweep *s) { /* Rebin the velocity data to the range -nyquist, +nyquist. * 14 bins are created centered at 0. It sets the proper color look up * indexes. This function modifies Sweep s. Use this function prior * RSL_sweep_to_cart. The binning is done in RSL_rebin_velocity_ray. */ int i; if (s == NULL) return; for (i=0; ih.nrays; i++) RSL_rebin_velocity_ray(s->ray[i]); } void RSL_rebin_velocity_volume(Volume *v) { /* Rebin the velocity data to the range -nyquist, +nyquist. * 14 bins are created centered at 0. It sets the proper color look up * indexes. This function modifies Volume v. Use this function prior * RSL_sweep_to_cart. The binning is done in RSL_rebin_velocity_ray. */ int i; if (v == NULL) return; for (i=0; ih.nsweeps; i++) RSL_rebin_velocity_sweep(v->sweep[i]); } /**********************************************************************/ /* */ /* RSL_carpi_to_cart */ /* */ /* Space Applications Corporation */ /* 17 Mar 1997 */ /**********************************************************************/ unsigned char *RSL_carpi_to_cart(Carpi *carpi, int xdim, int ydim, float range) { /* Converts carpi data from the native RSL 1_ or 2_byte format to unsigned char format for image generation. Also reverses the row order of the data so that displayed images come out right side up. */ int i, j, cart_index; unsigned char *cart_image = NULL; float val; if (carpi == NULL) return NULL; cart_image = (unsigned char *) calloc(xdim*ydim, sizeof(unsigned char)); for (j=0; jf(carpi->data[j][i]); if (val == BADVAL || val == NOTFOUND_V || val == NOTFOUND_H) cart_image[cart_index] = (unsigned char) 0; else if (val >= 0) cart_image[cart_index] = (unsigned char) val; else cart_image[cart_index] = (unsigned char) (256+val); /*2's complement.*/ } return(cart_image); } /**********************************************************************/ /* */ /* RSL_carpi_to_gif */ /* */ /* Space Applications Corporation */ /* 17 Mar 1997 */ /**********************************************************************/ void RSL_carpi_to_gif(Carpi *carpi, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (carpi == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_carpi_to_cart(carpi, xdim, ydim, range); RSL_write_gif(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_carpi_to_pict */ /* */ /* Space Applications Corporation */ /* 17 Mar 1997 */ /**********************************************************************/ void RSL_carpi_to_pict(Carpi *carpi, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (carpi == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_carpi_to_cart(carpi, xdim, ydim, range); RSL_write_pict(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_carpi_to_ppm */ /* */ /* Space Applications Corporation */ /* 17 Mar 1997 */ /**********************************************************************/ void RSL_carpi_to_ppm(Carpi *carpi, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (carpi == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_carpi_to_cart(carpi, xdim, ydim, range); RSL_write_ppm(outfile, cart_image, xdim, ydim, color_table); free(cart_image); } /**********************************************************************/ /* */ /* RSL_carpi_to_pgm */ /* */ /* Space Applications Corporation */ /* 17 Mar 1997 */ /**********************************************************************/ void RSL_carpi_to_pgm(Carpi *carpi, char *outfile, int xdim, int ydim, float range) { /* Currently range is not used. */ unsigned char *cart_image; /* Assumes the color table is already loaded. */ if (carpi == NULL) return; if (ncolors == 0) { fprintf(stderr, "No colors in color table. Load color table first.\n"); return; } cart_image = RSL_carpi_to_cart(carpi, xdim, ydim, range); RSL_write_pgm(outfile, cart_image, xdim, ydim); free(cart_image); } /**********************************************************************/ /* RSL_rebin_volume */ /* More generic version of RSL_rebin_velocity. Allows for centering */ /* +/- field like zdr or vel around zero. Width is the 1/2 width of */ /* what is to be centered; e.g., +/- 5, width=5. */ /* Space Applications Corporation */ /* July 13, 1997 */ /**********************************************************************/ void RSL_rebin_ray(Ray *r, int width) { int i; float nyquist, val; int ncbins = 15; /* Number of color bins */ float (*f)(Range x); Range (*invf)(float x); if (r == NULL) return; nyquist = width; if (nyquist == 0.0) { fprintf(stderr, "RSL_rebin_ray: nyquist == 0.0\n"); fprintf(stderr, "RSL_rebin_ray: Unable to rebin.\n"); return; } f = r->h.f; invf = r->h.invf; for (i=0; ih.nbins; i++) { val = f(r->range[i]); if (val == width+1) { val = ncbins + 1; } else if (val != BADVAL) { /* Okay, we want to shift the data to positive values then we re-scale them by the number of color bins/nyquist */ val = (int)(val/nyquist*(ncbins/2) + 1.0 + ncbins/2); } else { val = 0; } r->range[i] = invf(val); } } void RSL_rebin_sweep(Sweep *s, int width) { int i; if (s == NULL) return; for (i=0; ih.nrays; i++) RSL_rebin_ray(s->ray[i], width); } void RSL_rebin_volume(Volume *v, int width) { int i; if (v == NULL) return; for (i=0; ih.nsweeps; i++) RSL_rebin_sweep(v->sweep[i], width); } /**********************************************************************/ /* */ /* RSL_rebin_zdr_volume, _sweep, _ray */ /* */ /* Space Applications Corporation */ /**********************************************************************/ /* Maps valid zdr values from the real set [-6.0, 10.0] onto the set of integers {0, 1, 2, ..., 35}, which forms the set of indices into the zdr color table. Used in conjunction with gif image generation of zdr sweeps. Color coding: ------------- -6.0 <= zdr < -4.0 --> black -4.0 <= zdr < -2.0 --> gray -2.0 <= zdr < 0.0 --> blue 0.0 <= zdr < 2.0 --> green 2.0 <= zdr < 4.0 --> orange 4.0 <= zdr < 6.0 --> red 6.0 <= zdr < 8.0 --> pink 8.0 <= zdr < 10.0 --> white Space Applications Corporation July 13, 1997 */ void RSL_rebin_zdr_ray(Ray *r) { int i; float val; float (*f)(Range x); Range (*invf)(float x); if (r == NULL) return; f = r->h.f; invf = r->h.invf; for (i=0; ih.nbins; i++) { val = f(r->range[i]); if ((val >= -6.0) && (val < 8.4)) val = (floor) ((val + 6.0) * 2.5); else if (val < 10.0) val = 35.0; /* Make all these white. */ else val = 0; /* invalid zdr value */ r->range[i] = invf(val); } } void RSL_rebin_zdr_sweep(Sweep *s) { int i; if (s == NULL) return; for (i=0; ih.nrays; i++) RSL_rebin_zdr_ray(s->ray[i]); } void RSL_rebin_zdr_volume(Volume *v) { int i; if (v == NULL) return; for (i=0; ih.nsweeps; i++) RSL_rebin_zdr_sweep(v->sweep[i]); } rsl-v1.43/anyformat_to_radar.c0000644000102200007640000001426711747567337013421 00000000000000/* NASA/TRMM, Code 910.1. This is the TRMM Office Radar Software Library. Copyright (C) 1996, 1997 John H. Merritt Space Applications Corporation Vienna, Virginia This 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. This 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 this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * By John H. Merritt * Science Applications Corporation, Vienna, VA */ #include #include #include #include #include "rsl.h" void rsl_readflush(FILE *fp); /*********************************************************************/ /* */ /* RSL_filetype */ /* */ /*********************************************************************/ enum File_type RSL_filetype(char *infile) { /* Open the input file and peek at the first few bytes to determine * the type of file. * * UF - First two bytes 'UF' * - or 3,4 bytes 'UF' * - or 5,6 bytes 'UF'. This is the most common. * * WSR88D - First 8 bytes: 'ARCHIVE2' or 'AR2V0001' * * TOGA - ?? * NSIG - ?? * LASSEN - SUNRISE * RSL - RSL * MCGILL - P A B * RAPIC - /IMAGE: * RADTEC - 320 (decimal, in first two bytes) * RAINBOW - First two bytes: decimal 1, followed by 'H' */ FILE *fp; char magic[11]; if ((fp = fopen(infile, "r")) == NULL) { perror(infile); return UNKNOWN; } /* Read the magic bytes. */ fp = uncompress_pipe(fp); /* If gzip available. */ if (fread(magic, sizeof(magic), 1, fp) != 1) { char *magic_str = (char *)calloc(sizeof(magic)+1, sizeof(char)); memcpy(magic_str, magic, sizeof(magic)); fprintf(stderr,"Error fread: Magic is %s\n", magic_str); free (magic_str); perror("RSL_filetype"); /* Thanks to Thiago Biscaro for fixing defunct process problem. */ rsl_pclose(fp); return UNKNOWN; } /* Closes the stream and wait for associated processes to terminate (just like wait() ) to avoid defunct processes. The old rsl_readflush function wasn't doing this, N calls to anyformat_to_radar would generate N defunct processes associated with the main program --Thiago Biscaro */ rsl_pclose(fp); if (strncmp("ARCHIVE2.", magic, 9) == 0) return WSR88D_FILE; if (strncmp("AR2V000", magic, 7) == 0) return WSR88D_FILE; if (strncmp("UF", magic, 2) == 0) return UF_FILE; if (strncmp("UF", &magic[2], 2) == 0) return UF_FILE; if (strncmp("UF", &magic[4], 2) == 0) return UF_FILE; if ((int)magic[0] == 0x0e && (int)magic[1] == 0x03 && (int)magic[2] == 0x13 && (int)magic[3] == 0x01 ) return HDF_FILE; if (strncmp("RSL", magic, 3) == 0) return RSL_FILE; if ((int)magic[0] == 7) return NSIG_FILE_V1; if ((int)magic[1] == 7) return NSIG_FILE_V1; if ((int)magic[0] == 27) return NSIG_FILE_V2; if ((int)magic[1] == 27) return NSIG_FILE_V2; if (strncmp("/IMAGE:", magic, 7) == 0) return RAPIC_FILE; if ((int)magic[0] == 0x40 && (int)magic[1] == 0x01 ) return RADTEC_FILE; if ((int)magic[0] == 0x01 && magic[1] == 'H') return RAINBOW_FILE; if (strncmp("SUNRISE", &magic[4], 7) == 0) return LASSEN_FILE; /* The 'P A B' is just too specific to be a true magic number, but that's all * I've got. */ if (strncmp("P A B ", magic, 6) == 0) return MCGILL_FILE; /* Byte swapped ? */ if (strncmp(" P A B", magic, 6) == 0) return MCGILL_FILE; if (strncmp("SSWB", magic, 4) == 0) return DORADE_FILE; if (strncmp("VOLD", magic, 4) == 0) return DORADE_FILE; return UNKNOWN; } /*********************************************************************/ /* */ /* RSL_anyformat_to_radar */ /* */ /*********************************************************************/ Radar *RSL_anyformat_to_radar(char *infile, ...) { va_list ap; char *callid_or_file; Radar *radar; /* If it is detected that the input file is WSR88D, use the second argument * as the call id of the site, or the file name of the tape header file. * * Assumption: Input files are seekable. */ radar = NULL; switch (RSL_filetype(infile)) { case WSR88D_FILE: callid_or_file = NULL; va_start(ap, infile); callid_or_file = va_arg(ap, char *); va_end(ap); radar = RSL_wsr88d_to_radar(infile, callid_or_file); break; case UF_FILE: radar = RSL_uf_to_radar(infile); break; case TOGA_FILE: radar = RSL_toga_to_radar(infile); break; case NSIG_FILE_V1: radar = RSL_nsig_to_radar(infile); break; case NSIG_FILE_V2: radar = RSL_nsig2_to_radar(infile); break; case RAPIC_FILE: radar = RSL_rapic_to_radar(infile); break; case RADTEC_FILE: radar = RSL_radtec_to_radar(infile); break; case RSL_FILE: radar = RSL_read_radar(infile); break; #ifdef HAVE_LIBTSDISTK case HDF_FILE: radar = RSL_hdf_to_radar(infile); break; #endif case RAINBOW_FILE: radar = RSL_rainbow_to_radar(infile); break; case MCGILL_FILE: radar = RSL_mcgill_to_radar(infile); break; case LASSEN_FILE: radar = RSL_lassen_to_radar(infile); break; case DORADE_FILE: radar = RSL_dorade_to_radar(infile); break; default: fprintf(stderr, "Unknown input file type. File <%s> is not recognized by RSL.\n", infile); return NULL; } return radar; }