volpack-1.0b3/0000777000265600020320000000000010727044642010251 500000000000000volpack-1.0b3/config.h.in0000644000265600020320000000322210727044642012207 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 don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION volpack-1.0b3/vp_renderA.c0000644000265600020320000007702605701116542012425 00000000000000/* * vp_renderA.c * * Shear-warp volume rendering algorithm for affine view transformations. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.23 $ */ #include "vp_global.h" /*#define DUMP_SHADOW_VOLUME*/ /*#define DUMP_GRAY_VOLUME*/ extern void VPCompAC00G ANSI_ARGS((vpContext *vpc, int icount, int jcount, int k, double slice_depth_cueing_dbl, GrayIntPixel *intimage, double weightTLdbl, double weightBLdbl, double weightTRdbl, double weightBRdbl, unsigned char *run_lengths, void *voxel_data)); extern void VPCompAR00G ANSI_ARGS((vpContext *vpc, int icount, int jcount, int k, double slice_depth_cueing_dbl, GrayIntPixel *intimage, double weightTLdbl, double weightBLdbl, double weightTRdbl, double weightBRdbl, void *voxel_data, int voxel_istride, int voxel_jstride)); extern void VPWarpA101N ANSI_ARGS((GrayIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA110N ANSI_ARGS((GrayIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA111N ANSI_ARGS((GrayIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA301N ANSI_ARGS((RGBIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA330N ANSI_ARGS((RGBIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA331N ANSI_ARGS((RGBIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA330R ANSI_ARGS((RGBIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); extern void VPWarpA331R ANSI_ARGS((RGBIntPixel *in_image, int in_width, int in_height, int in_bytes_per_scan, unsigned char *out_image, int out_width, int out_height, int out_bytes_per_scan, vpMatrix3 warp_matrix)); #ifdef STATISTICS extern int vpResampleCount; extern int vpCompositeCount; extern int vpERTSkipCount; extern int vpERTSkipAgainCount; extern int vpERTUpdateCount; extern int vpSpecialZeroSkipCount; extern int vpRunFragmentCount; #endif /* * VPRenderAffine * * Render a classified volume with an affine viewing transformation. */ void VPRenderAffine(vpc, algorithm, composite_func) vpContext *vpc; int algorithm; /* USE_RLEVOLUME or USE_RAWVOLUME */ void (*composite_func)(); /* function to do the compositing */ { int icount; /* voxels per voxel scanline */ int jcount; /* voxel scanlines per voxel slice */ int kcount; /* voxel slices in the volume */ int istride; /* strides for each dimension of raw volume */ int jstride; int kstride; int k; /* voxel slice index */ int kstart, kstop; /* values of k for first and last slices */ int kincr; /* value to add to k to get to the next slice (either 1 or -1) */ RLEVoxels *rle_voxels; /* run-length encoded volume */ float slice_u, slice_v; /* sheared object space coordinates of the top-left corner of the current constant-k slice of the volume data */ int slice_u_int; /* integer part of slice_u and slice_v */ int slice_v_int; float slice_u_frac; /* fractional part of slice_u and slice_v */ float slice_v_frac; int slice_start_index; /* index of top-left int. image pixel */ float WgtTL, WgtBL, /* weights in the range 0..1 which give the */ WgtTR, WgtBR; /* fractional contribution of the */ /* neighboring voxels to the current */ /* intermediate image pixel */ int color_channels; /* number of color channels to compute */ float slice_depth_cueing; /* depth cueing factor for current slice */ float slice_dc_ratio; /* multiplier to get depth cueing factor for the next slice */ unsigned char *run_lengths; /* run lengths for slice */ void *voxel_data; /* voxel data for slice */ void *intimage; /* first intermediate image pixel for slice */ int scan_offset_index; /* index into scan_offsets for this slice */ float shadow_slice_u; /* top-left corner of voxel slice in shadow */ float shadow_slice_v; /* buffer coordinates */ int shadow_slice_u_int; /* integer part of shadow_slice_u/v */ int shadow_slice_v_int; int shadow_slice_start_index;/* index of top-left shadow buffer pixel */ GrayIntPixel *shadow_image; /* first shadow buffer pixel for slice */ int shadow_k; /* voxel slice number plus shadow bias */ #ifdef DUMP_SHADOW_VOLUME unsigned char *shadow_dump; #endif #ifdef DUMP_GRAY_VOLUME unsigned char *gray_dump; #endif #ifdef DUMP_SHADOW_VOLUME int dump_fd; int dump_value; #else #ifdef DUMP_GRAY_VOLUME int dump_fd; int dump_value; #endif #endif #ifdef DEBUG GrayIntPixel *trace_gray_ptr = &vpc->int_image.gray_intim[vpc->trace_u + vpc->trace_v*vpc->intermediate_width]; RGBIntPixel *trace_rgb_ptr = &vpc->int_image.rgb_intim[vpc->trace_u + vpc->trace_v*vpc->intermediate_width]; float vox_depth; #endif DECLARE_TIME(t0); DECLARE_TIME(t1); DECLARE_TIME(tA); DECLARE_TIME(tB); #ifdef STATISTICS vpResampleCount = 0; vpCompositeCount = 0; vpERTSkipCount = 0; vpERTSkipAgainCount = 0; vpERTUpdateCount = 0; vpSpecialZeroSkipCount = 0; vpRunFragmentCount = 0; #endif GET_TIME(vpc, tA); /* initialize for the fast classification algorithm */ if (algorithm == USE_RAWVOLUME && vpc->mm_octree != NULL) { ASSERT(vpc->raw_voxels != NULL); GET_TIME(vpc, t0); VPComputeSummedAreaTable(vpc); VPClassifyOctree(vpc); GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_CLSFY_OCTREE, t0, t1); } /* find size of volume */ if (algorithm == USE_RLEVOLUME) { switch (vpc->best_view_axis) { case VP_X_AXIS: rle_voxels = vpc->rle_x; break; case VP_Y_AXIS: rle_voxels = vpc->rle_y; break; case VP_Z_AXIS: rle_voxels = vpc->rle_z; break; default: VPBug("invalid viewing axis in AffineRender"); } icount = rle_voxels->ilen; jcount = rle_voxels->jlen; kcount = rle_voxels->klen; } else { switch (vpc->best_view_axis) { case VP_X_AXIS: icount = vpc->ylen; jcount = vpc->zlen; kcount = vpc->xlen; istride = vpc->ystride; jstride = vpc->zstride; kstride = vpc->xstride; break; case VP_Y_AXIS: icount = vpc->zlen; jcount = vpc->xlen; kcount = vpc->ylen; istride = vpc->zstride; jstride = vpc->xstride; kstride = vpc->ystride; break; case VP_Z_AXIS: icount = vpc->xlen; jcount = vpc->ylen; kcount = vpc->zlen; istride = vpc->xstride; jstride = vpc->ystride; kstride = vpc->zstride; break; default: VPBug("invalid viewing axis in AffineRender"); } } GET_TIME(vpc, t0); /* initialize intermediate image */ color_channels = vpc->color_channels; vpc->pad_int_to_maxwidth = 0; if (color_channels == 1) { bzero(vpc->int_image.gray_intim, vpc->intermediate_width * vpc->intermediate_height * sizeof(GrayIntPixel)); } else { ASSERT(color_channels == 3); bzero(vpc->int_image.rgb_intim, vpc->intermediate_width * vpc->intermediate_height * sizeof(RGBIntPixel)); } /* initialize shadow buffer */ if (vpc->enable_shadows) { vpc->pad_shadow_to_maxwidth = 0; bzero(vpc->shadow_buffer, vpc->shadow_width * vpc->shadow_height * sizeof(GrayIntPixel)); } #ifdef DUMP_SHADOW_VOLUME Alloc(vpc, shadow_dump, char *, vpc->shadow_width * vpc->shadow_height * kcount, "shadow_dump"); #endif #ifdef DUMP_GRAY_VOLUME Alloc(vpc, gray_dump, char *, vpc->intermediate_width * vpc->intermediate_height * kcount, "gray_dump"); #endif GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_CLEAR, t0, t1); /* initialize depth cueing */ slice_dc_ratio = VPSliceDepthCueRatio(vpc); slice_depth_cueing = 1.; #ifdef DEBUG Debug((vpc, VPDEBUG_DEPTHCUE, "depth cueing at cube corners:\n")); vox_depth = vpc->depth_000 + 0*vpc->depth_di + 0*vpc->depth_dj + 0*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", 0, 0, 0, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + icount*vpc->depth_di + 0*vpc->depth_dj + 0*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", icount, 0, 0, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + icount*vpc->depth_di + jcount*vpc->depth_dj + 0*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", icount, jcount, 0, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + 0*vpc->depth_di + jcount*vpc->depth_dj + 0*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", 0, jcount, 0, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + 0*vpc->depth_di + 0*vpc->depth_dj + kcount*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", 0, 0, kcount, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + icount*vpc->depth_di + 0*vpc->depth_dj + kcount*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", icount, 0, kcount, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + icount*vpc->depth_di + jcount*vpc->depth_dj + kcount*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", icount, jcount, kcount, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); vox_depth = vpc->depth_000 + 0*vpc->depth_di + jcount*vpc->depth_dj + kcount*vpc->depth_dk; if (vox_depth < 0.0) vox_depth = 0.0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d %3d: depth = %12.6f, factor = %12.6f\n", 0, jcount, kcount, vox_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - vox_depth)))); #endif /* DEBUG */ #ifdef DEBUG /* initialize pixel tracing */ if (vpc->trace_u != -1) { if (vpc->trace_u < 0 || vpc->trace_v < 0 || vpc->trace_u >= vpc->intermediate_width || vpc->trace_v >= vpc->intermediate_height) { printf("Traced pixel is out of bounds.\n"); } else { printf("Trace for pixel u=%d, v=%d", vpc->trace_u, vpc->trace_v); if (vpc->enable_shadows) printf(", shadow_k=%d", vpc->trace_shadow_k); printf(" (View %c, slice size %d,%d)\n", vpc->best_view_axis + 'X', icount, jcount); printf("Slice Slice TopLft BotLft "); printf("TopRgt BotRgt Compos.\n"); printf(" BRX/BRY Opc/Clr/Wgt Opc/Clr/Wgt Opc/Clr/Wgt "); printf("Opc/Clr/Wgt Opc/Clr\n"); } } #endif /* compute outer loop bounds */ if (vpc->reverse_slice_order) { kstart = kcount-1; kstop = -1; kincr = -1; } else { kstart = 0; kincr = 1; kstop = kcount; } shadow_k = kstart - vpc->shadow_bias * kincr; /* loop over slices of the voxel data in front-to-back order */ for (k = kstart; k != kstop; k += kincr) { ReportStatus(vpc, (double)(k - kstart)/(double)(kstop - kstart)); /* update shadow buffer */ if (vpc->enable_shadows && shadow_k >= 0 && shadow_k < kcount) { /* compute coordinates of slice in shadow buffer; shadow bias determines which slice (usually a few slices old in order to eliminate self-shadowing) */ shadow_slice_u = vpc->shadow_shear_i * shadow_k + vpc->shadow_trans_i; shadow_slice_v = vpc->shadow_shear_j * shadow_k + vpc->shadow_trans_j; shadow_slice_u_int = (int)ceil(shadow_slice_u) - 1; shadow_slice_v_int = (int)ceil(shadow_slice_v) - 1; shadow_slice_start_index = shadow_slice_u_int + shadow_slice_v_int*vpc->shadow_width; shadow_image = &vpc->shadow_buffer[shadow_slice_start_index]; /* compute resampling weights for voxel slice in shadow buffer */ slice_u_frac = shadow_slice_u - shadow_slice_u_int; slice_v_frac = shadow_slice_v - shadow_slice_v_int; WgtTL = slice_u_frac * slice_v_frac; WgtBL = slice_u_frac * ((float)1. - slice_v_frac); WgtTR = ((float)1. - slice_u_frac) * slice_v_frac; WgtBR = ((float)1. - slice_u_frac) * ((float)1. - slice_v_frac); /* composite voxel opacities into shadow buffer */ if (algorithm == USE_RLEVOLUME) { scan_offset_index = shadow_k * rle_voxels->scan_offsets_per_slice; run_lengths = rle_voxels->run_lengths + rle_voxels->scan_offsets[scan_offset_index].first_len; voxel_data = (void *)((char *)rle_voxels->data + rle_voxels->scan_offsets[scan_offset_index].first_data); VPCompAC00G(vpc, icount, jcount, shadow_k, slice_depth_cueing, shadow_image, WgtTL, WgtBL, WgtTR, WgtBR, run_lengths, voxel_data); } else { voxel_data = (void *)((char *)vpc->raw_voxels + shadow_k*kstride); VPCompAR00G(vpc, icount, jcount, shadow_k, slice_depth_cueing, shadow_image, WgtTL, WgtBL, WgtTR, WgtBR, voxel_data, istride, jstride); } } shadow_k += kincr; /* compute coordinates of top-left corner of voxel slice in intermediate image */ slice_u = vpc->shear_i * k + vpc->trans_i; slice_v = vpc->shear_j * k + vpc->trans_j; slice_u_int = (int)ceil(slice_u) - 1; slice_v_int = (int)ceil(slice_v) - 1; slice_start_index = slice_u_int + slice_v_int*vpc->intermediate_width; if (color_channels == 1) intimage = &vpc->int_image.gray_intim[slice_start_index]; else intimage = &vpc->int_image.rgb_intim[slice_start_index]; /* compute resampling weights for this slice */ slice_u_frac = slice_u - slice_u_int; slice_v_frac = slice_v - slice_v_int; WgtTL = slice_u_frac * slice_v_frac; WgtBL = slice_u_frac * ((float)1. - slice_v_frac); WgtTR = ((float)1. - slice_u_frac) * slice_v_frac; WgtBR = ((float)1. - slice_u_frac) * ((float)1. - slice_v_frac); /* compute coordinates of voxel slice in shadow buffer */ if (vpc->enable_shadows) { shadow_slice_u = vpc->shadow_shear_i * k + vpc->shadow_trans_i; shadow_slice_v = vpc->shadow_shear_j * k + vpc->shadow_trans_j; shadow_slice_u_int = (int)ceil(shadow_slice_u) - 1; shadow_slice_v_int = (int)ceil(shadow_slice_v) - 1; shadow_slice_start_index = shadow_slice_u_int + shadow_slice_v_int*vpc->shadow_width; shadow_image = &vpc->shadow_buffer[shadow_slice_start_index]; } /* find voxel data for this slice and composite */ if (algorithm == USE_RLEVOLUME) { scan_offset_index = k * rle_voxels->scan_offsets_per_slice; run_lengths = rle_voxels->run_lengths + rle_voxels->scan_offsets[scan_offset_index].first_len; voxel_data = (void *)((char *)rle_voxels->data + rle_voxels->scan_offsets[scan_offset_index].first_data); #ifdef INDEX_VOLUME composite_func(vpc, icount, jcount, k, slice_depth_cueing, intimage, WgtTL, WgtBL, WgtTR, WgtBR, run_lengths, voxel_data, rle_voxels->voxel_index + k * icount * jcount, shadow_image); #else composite_func(vpc, icount, jcount, k, slice_depth_cueing, intimage, WgtTL, WgtBL, WgtTR, WgtBR, run_lengths, voxel_data, shadow_image); #endif } else { voxel_data = (void *)((char *)vpc->raw_voxels + k*kstride); composite_func(vpc, icount, jcount, k, slice_depth_cueing, intimage, WgtTL, WgtBL, WgtTR, WgtBR, voxel_data, istride, jstride, shadow_image); } /* update depth cueing factor */ slice_depth_cueing *= slice_dc_ratio; #ifdef DUMP_SHADOW_VOLUME vpGetImage(vpc, shadow_dump + k * vpc->shadow_width * vpc->shadow_height, vpc->shadow_width, vpc->shadow_height, vpc->shadow_width, VP_ALPHA, VP_SHADOW_BUFFER); #endif #ifdef DUMP_GRAY_VOLUME vpGetImage(vpc, gray_dump + k * vpc->intermediate_width * vpc->intermediate_height, vpc->intermediate_width, vpc->intermediate_height, VP_LUMINANCE, VP_IMAGE_BUFFER); #endif } ReportStatus(vpc, 1.0); GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_COMPOSITE, t0, t1); #ifdef DEBUG /* print traced pixel before depth cueing */ if (vpc->trace_u != -1) { if (vpc->trace_u >= 0 && vpc->trace_v >= 0 && vpc->trace_u < vpc->intermediate_width && vpc->trace_v < vpc->intermediate_height) { if (color_channels == 1) { printf("Before depth cueing: opc = %.9f = %d", trace_gray_ptr->opcflt*255., (int)(trace_gray_ptr->opcflt*255.)); printf(" clr = %.9f = %d\n", trace_gray_ptr->clrflt, (int)trace_gray_ptr->clrflt); } else { printf("Before depth cueing: opc = %14.9f = %3d", trace_rgb_ptr->opcflt*255., (int)(trace_rgb_ptr->opcflt*255.)); printf(" r = %14.9f = %d\n", trace_rgb_ptr->rclrflt, (int)trace_rgb_ptr->rclrflt); printf(" "); printf(" g = %14.9f = %d\n", trace_rgb_ptr->gclrflt, (int)trace_rgb_ptr->gclrflt); printf(" "); printf(" b = %14.9f = %d\n", trace_rgb_ptr->bclrflt, (int)trace_rgb_ptr->bclrflt); } } } #endif /* depth cue the intermediate image */ if (vpc->dc_enable) { GET_TIME(vpc, t0); VPDepthCueIntImage(vpc, vpc->reverse_slice_order ? kcount-1 : 0); GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_DEPTHCUE, t0, t1); } #ifdef DEBUG /* print final value of traced pixel */ if (vpc->trace_u != -1) { if (vpc->trace_u >= 0 && vpc->trace_v >= 0 && vpc->trace_u < vpc->intermediate_width && vpc->trace_v < vpc->intermediate_height) { if (color_channels == 1) { printf("Final pixel value: opc = %.9f = %d", trace_gray_ptr->opcflt*255., (int)(trace_gray_ptr->opcflt*255.)); printf(" clr = %.9f = %d\n", trace_gray_ptr->clrflt, (int)trace_gray_ptr->clrflt); } else { printf("Final pixel value: opc = %14.9f = %3d", trace_rgb_ptr->opcflt*255., (int)(trace_rgb_ptr->opcflt*255.)); printf(" r = %14.9f = %d\n", trace_rgb_ptr->rclrflt, (int)trace_rgb_ptr->rclrflt); printf(" "); printf(" g = %14.9f = %d\n", trace_rgb_ptr->gclrflt, (int)trace_rgb_ptr->gclrflt); printf(" "); printf(" b = %14.9f = %d\n", trace_rgb_ptr->bclrflt, (int)trace_rgb_ptr->bclrflt); } } } #endif /* warp the intermediate image into the final image */ GET_TIME(vpc, t0); switch (vpc->pixel_type) { case VP_ALPHA: if (color_channels == 1) { VPWarpA101N(vpc->int_image.gray_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(GrayIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); } else { VPWarpA301N(vpc->int_image.rgb_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(RGBIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); } break; case VP_LUMINANCE: ASSERT(color_channels == 1); VPWarpA110N(vpc->int_image.gray_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(GrayIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; case VP_LUMINANCEA: ASSERT(color_channels == 1); VPWarpA111N(vpc->int_image.gray_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(GrayIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; case VP_RGB: ASSERT(color_channels == 3); VPWarpA330N(vpc->int_image.rgb_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(RGBIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; case VP_RGBA: ASSERT(color_channels == 3); VPWarpA331N(vpc->int_image.rgb_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(RGBIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; case VP_BGR: ASSERT(color_channels == 3); VPWarpA330R(vpc->int_image.rgb_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(RGBIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; case VP_ABGR: ASSERT(color_channels == 3); VPWarpA331R(vpc->int_image.rgb_intim, vpc->intermediate_width, vpc->intermediate_height, sizeof(RGBIntPixel) * (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width:vpc->intermediate_width), vpc->image, vpc->image_width, vpc->image_height, vpc->image_bytes_per_scan, vpc->warp_2d); break; default: VPBug("bad pixel type"); } GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_WARP, t0, t1); GET_TIME(vpc, tB); STORE_TIME(vpc, VPTIMER_RENDER, tA, tB); #ifdef DUMP_SHADOW_VOLUME printf("Dumping shadow map images to shadow.dump...."); fflush(stdout); if ((dump_fd = creat("shadow.dump", 0644)) < 0) VPBug("open failed"); dump_value = vpc->shadow_width; write(dump_fd, &dump_value, sizeof(int)); dump_value = vpc->shadow_height; write(dump_fd, &dump_value, sizeof(int)); dump_value = kcount; write(dump_fd, &dump_value, sizeof(int)); write(dump_fd, shadow_dump, vpc->shadow_width * vpc->shadow_height * kcount); close(dump_fd); printf("\n"); Dealloc(vpc, shadow_dump); #endif #ifdef DUMP_GRAY_VOLUME printf("Dumping grayscale intermediate images to gray.dump...."); fflush(stdout); if ((dump_fd = creat("gray.dump", 0644)) < 0) VPBug("open failed"); dump_value = vpc->intermediate_width; write(dump_fd, &dump_value, sizeof(int)); dump_value = vpc->intermediate_height; write(dump_fd, &dump_value, sizeof(int)); dump_value = kcount; write(dump_fd, &dump_value, sizeof(int)); write(dump_fd, gray_dump, vpc->intermediate_width * vpc->intermediate_height * kcount); close(dump_fd); printf("\n"); Dealloc(vpc, gray_dump); #endif } #ifdef DEBUG /* * vpPrintRayPath * * Print a trace of the voxels that contribute to the pixel specified * with vpTracePixel. */ vpResult vpPrintRayPath(vpc) vpContext *vpc; { int icount; /* voxels per voxel scanline */ int jcount; /* voxel scanlines per voxel slice */ int kcount; /* voxel slices in the volume */ int k; /* voxel slice index */ int kstart, kstop; /* values of k for first and last slices */ int kincr; /* value to add to k to get to the next slice (either 1 or -1) */ float slice_u, slice_v; /* sheared object space coordinates of the top-left corner of the current constant-k slice of the volume data */ int slice_u_int; /* integer part of slice_u and slice_v */ int slice_v_int; float slice_u_frac; /* fractional part of slice_u and slice_v */ float slice_v_frac; float WgtTL, WgtBL, /* weights in the range 0..1 which give the */ WgtTR, WgtBR; /* fractional contribution of the */ /* neighboring voxels to the current */ /* intermediate image pixel */ int i, j; /* voxel coordinates in current slice of the voxel to the BR of the ray */ int shadow_trace_u; /* coords. of shadow buffer pixel to trace */ int shadow_trace_v; int retcode; /* check for errors and initialize */ if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); if (vpc->trace_u < 0 || vpc->trace_v < 0 || vpc->trace_u >= vpc->intermediate_width || vpc->trace_v >= vpc->intermediate_height) { printf("Traced pixel is out of bounds.\n"); return(VP_OK); } /* find size of volume */ switch (vpc->best_view_axis) { case VP_X_AXIS: icount = vpc->ylen; jcount = vpc->zlen; kcount = vpc->xlen; break; case VP_Y_AXIS: icount = vpc->zlen; jcount = vpc->xlen; kcount = vpc->ylen; break; case VP_Z_AXIS: icount = vpc->xlen; jcount = vpc->ylen; kcount = vpc->zlen; break; default: VPBug("invalid viewing axis in vpPrintRayPath"); } /* print column headings */ printf("Ray path for pixel u=%d, v=%d", vpc->trace_u, vpc->trace_v); if (vpc->enable_shadows) printf(", shadow_k=%d", vpc->trace_shadow_k); printf(" (View %c, slice size %d,%d)\n", vpc->best_view_axis + 'X', icount, jcount); printf("Slice TopLft BotLft TopRgt"); printf(" BotRgt\n"); printf(" _X_/_Y_/_Z_/Wgt _X_/_Y_/_Z_/Wgt _X_/_Y_/_Z_/Wgt"); printf(" _X_/_Y_/_Z_/Wgt\n"); /* compute outer loop bounds */ if (vpc->reverse_slice_order) { kstart = kcount-1; kstop = -1; kincr = -1; } else { kstart = 0; kincr = 1; kstop = kcount; } /* loop over slices of the voxel data in front-to-back order */ for (k = kstart; k != kstop; k += kincr) { /* compute coordinates of top-left corner of voxel slice in intermediate image */ slice_u = vpc->shear_i * k + vpc->trans_i; slice_v = vpc->shear_j * k + vpc->trans_j; slice_u_int = (int)ceil(slice_u) - 1; slice_v_int = (int)ceil(slice_v) - 1; /* compute resampling weights for this slice */ slice_u_frac = slice_u - slice_u_int; slice_v_frac = slice_v - slice_v_int; WgtTL = slice_u_frac * slice_v_frac; WgtBL = slice_u_frac * ((float)1. - slice_v_frac); WgtTR = ((float)1. - slice_u_frac) * slice_v_frac; WgtBR = ((float)1. - slice_u_frac) * ((float)1. - slice_v_frac); /* compute intersection of the ray with this slice */ i = vpc->trace_u - slice_u_int; j = vpc->trace_v - slice_v_int; /* print ray location at this slice */ printf("[%3d]", k); switch (vpc->best_view_axis) { case VP_X_AXIS: printf("%4d%4d%4d %3d ", k, i-1, j-1, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", k, i-1, j, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", k, i, j-1, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", k, i, j, (int)(WgtBR*100.)); break; case VP_Y_AXIS: printf("%4d%4d%4d %3d ", j-1, k, i-1, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", j, k, i-1, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", j-1, k, i, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", j, k, i, (int)(WgtBR*100.)); break; case VP_Z_AXIS: printf("%4d%4d%4d %3d ", i-1, j-1, k, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", i-1, j, k, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", i, j-1, k, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", i, j, k, (int)(WgtBR*100.)); break; } } /* for k */ if (!vpc->enable_shadows) return(VP_OK); /* compute coordinates of shadow buffer pixel to trace */ shadow_trace_u = vpc->trace_u + (int)ceil(vpc->shadow_shear_i*vpc->trace_shadow_k+vpc->shadow_trans_i)- (int)ceil(vpc->shear_i * vpc->trace_shadow_k + vpc->trans_i); shadow_trace_v = vpc->trace_v + (int)ceil(vpc->shadow_shear_j*vpc->trace_shadow_k+vpc->shadow_trans_j)- (int)ceil(vpc->shear_j * vpc->trace_shadow_k + vpc->trans_j); /* print column headings for shadow trace */ printf("\nShadow Ray Path (intersecting traced pixel at k=%d):\n", vpc->trace_shadow_k); printf("Slice TopLft BotLft TopRgt"); printf(" BotRgt\n"); printf(" _X_/_Y_/_Z_/Wgt _X_/_Y_/_Z_/Wgt _X_/_Y_/_Z_/Wgt"); printf(" _X_/_Y_/_Z_/Wgt\n"); /* loop over slices of the voxel data in front-to-back order */ for (k = kstart; k != kstop; k += kincr) { /* compute coordinates of top-left corner of voxel slice in intermediate image */ slice_u = vpc->shadow_shear_i * k + vpc->shadow_trans_i; slice_v = vpc->shadow_shear_j * k + vpc->shadow_trans_j; slice_u_int = (int)ceil(slice_u) - 1; slice_v_int = (int)ceil(slice_v) - 1; /* compute resampling weights for this slice */ slice_u_frac = slice_u - slice_u_int; slice_v_frac = slice_v - slice_v_int; WgtTL = slice_u_frac * slice_v_frac; WgtBL = slice_u_frac * ((float)1. - slice_v_frac); WgtTR = ((float)1. - slice_u_frac) * slice_v_frac; WgtBR = ((float)1. - slice_u_frac) * ((float)1. - slice_v_frac); /* compute intersection of the ray with this slice */ i = shadow_trace_u - slice_u_int; j = shadow_trace_v - slice_v_int; /* print ray location at this slice */ printf("[%3d]", k); switch (vpc->best_view_axis) { case VP_X_AXIS: printf("%4d%4d%4d %3d ", k, i-1, j-1, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", k, i-1, j, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", k, i, j-1, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", k, i, j, (int)(WgtBR*100.)); break; case VP_Y_AXIS: printf("%4d%4d%4d %3d ", j-1, k, i-1, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", j, k, i-1, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", j-1, k, i, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", j, k, i, (int)(WgtBR*100.)); break; case VP_Z_AXIS: printf("%4d%4d%4d %3d ", i-1, j-1, k, (int)(WgtTL*100.)); printf("%4d%4d%4d %3d ", i-1, j, k, (int)(WgtBL*100.)); printf("%4d%4d%4d %3d ", i, j-1, k, (int)(WgtTR*100.)); printf("%4d%4d%4d %3d\n", i, j, k, (int)(WgtBR*100.)); break; } } /* for k */ return(VP_OK); } #endif /* DEBUG */ volpack-1.0b3/vp_check.c0000644000265600020320000002022505701116535012111 00000000000000/* * vp_check.c * * Consistency and error checking routines. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.18 $ */ #include "vp_global.h" /* error strings for vpGetErrorString() */ static char *ErrorString[] = { "limit exceeded", "singular matrix or vector", "I/O error", "invalid buffer size", "invalid image definition", "invalid shader definition", "invalid classifier definition", "invalid volume definition", "invalid voxel definition", "invalid option", "argument out of range", "invalid file", "cannot compute shadow buffer", }; /* * VPCheckVoxelFields * * Check the voxel field information for validity. */ vpResult VPCheckVoxelFields(vpc) vpContext *vpc; { int f; int size, offset; if (vpc->raw_bytes_per_voxel <= 0) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); if (vpc->num_voxel_fields <= 0) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); for (f = 0; f < vpc->num_voxel_fields; f++) { size = vpc->field_size[f]; offset = vpc->field_offset[f]; if (size != 1 && size != 2 && size != 4) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); if (offset < 0 || offset + size > vpc->raw_bytes_per_voxel) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); if (f > 0 && offset < vpc->field_size[f-1] + vpc->field_offset[f-1]) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); } return(VP_OK); } /* * VPCheckRawVolume * * Check the raw volume for consistency. */ vpResult VPCheckRawVolume(vpc) vpContext *vpc; { int size, offset, retcode; if ((retcode = VPCheckVoxelFields(vpc)) != VP_OK) return(retcode); if (vpc->xlen <= 0 || vpc->ylen <= 0 || vpc->zlen <= 0) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); if (vpc->raw_voxels == NULL) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); if (vpc->raw_bytes_per_voxel * vpc->xlen * vpc->ylen * vpc->zlen != vpc->raw_voxels_size) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); return(VP_OK); } /* * VPCheckClassifiedVolume * * Check the classified volume for consistency. */ vpResult VPCheckClassifiedVolume(vpc, axis) vpContext *vpc; int axis; { int retcode; if ((retcode = VPCheckVoxelFields(vpc)) != VP_OK) return(retcode); if (vpc->xlen <= 0 || vpc->ylen <= 0 || vpc->zlen <= 0) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); if (vpc->rle_bytes_per_voxel == 0) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); switch (axis) { case VP_X_AXIS: if (vpc->rle_x == NULL) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); ASSERT(vpc->rle_x->ilen == vpc->ylen); ASSERT(vpc->rle_x->jlen == vpc->zlen); ASSERT(vpc->rle_x->klen == vpc->xlen); break; case VP_Y_AXIS: if (vpc->rle_y == NULL) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); ASSERT(vpc->rle_y->ilen == vpc->zlen); ASSERT(vpc->rle_y->jlen == vpc->xlen); ASSERT(vpc->rle_y->klen == vpc->ylen); break; case VP_Z_AXIS: if (vpc->rle_z == NULL) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); ASSERT(vpc->rle_z->ilen == vpc->xlen); ASSERT(vpc->rle_z->jlen == vpc->ylen); ASSERT(vpc->rle_z->klen == vpc->zlen); break; default: VPBug("bad axis in VPCheckClassifiedVolume"); } return(VP_OK); } /* * VPCheckClassifier * * Check the classification parameters for consistency. */ vpResult VPCheckClassifier(vpc) vpContext *vpc; { int p, f; int size, offset, retcode; if ((retcode = VPCheckVoxelFields(vpc)) != VP_OK) return(retcode); if (vpc->num_shade_fields <= 0 || vpc->num_shade_fields > vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); if (vpc->num_clsfy_params <= 0 || vpc->num_clsfy_params > vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); for (p = 0; p < vpc->num_clsfy_params; p++) { f = vpc->param_field[p]; if (f < 0 || f >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); if (vpc->clsfy_table[p] == NULL || vpc->clsfy_table_size[p] != (vpc->field_max[f]+1)*sizeof(float)) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); if (p > 0 && f <= vpc->param_field[p-1]) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); } return(VP_OK); } /* * VPCheckShader * * Check the shading parameters for consistency. */ vpResult VPCheckShader(vpc) vpContext *vpc; { if (vpc->shading_mode == LOOKUP_SHADER) { if (vpc->color_field < 0 || vpc->color_field >= vpc->num_voxel_fields || vpc->color_field >= vpc->num_shade_fields) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->shade_color_table == NULL) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->shade_color_table_size != vpc->color_channels*sizeof(float)* (vpc->field_max[vpc->color_field]+1)*vpc->num_materials) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->field_size[vpc->color_field] != 2) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->num_materials < 1) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->num_materials > 1) { if (vpc->weight_field < 0 || vpc->weight_field >= vpc->num_voxel_fields || vpc->weight_field >= vpc->num_shade_fields) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->shade_weight_table == NULL) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->shade_weight_table_size != (vpc->field_max[vpc->weight_field]+1) * sizeof(float) * vpc->num_materials) return(VPSetError(vpc, VPERROR_BAD_SHADER)); if (vpc->field_size[vpc->weight_field] != 1) return(VPSetError(vpc, VPERROR_BAD_SHADER)); } } return(VP_OK); } /* * VPCheckImage * * Check the image buffer for validity. */ vpResult VPCheckImage(vpc) vpContext *vpc; { if (vpc->image == NULL || vpc->image_width <= 0 || vpc->image_height <= 0) return(VPSetError(vpc, VPERROR_BAD_IMAGE)); switch (vpc->pixel_type) { case VP_ALPHA: break; case VP_LUMINANCE: case VP_LUMINANCEA: if (vpc->color_channels != 1) return(VPSetError(vpc, VPERROR_BAD_OPTION)); break; case VP_RGB: case VP_BGR: case VP_RGBA: case VP_ABGR: if (vpc->color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_OPTION)); break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * VPCheckShadows * * Check the shadow specification for validity. */ vpResult VPCheckShadows(vpc) vpContext *vpc; { if (vpc->enable_shadows) { if (vpc->shadow_light_num < VP_LIGHT0 || vpc->shadow_light_num > VP_LIGHT5) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (!vpc->light_enable[vpc->shadow_light_num - VP_LIGHT0]) vpc->enable_shadows = 0; if (vpc->shadow_color_table_size != vpc->shade_color_table_size || vpc->shadow_color_table == NULL) return(VPSetError(vpc, VPERROR_BAD_SIZE)); } return(VP_OK); } /* * vpGetError * * Return the error code from the first invalid command since the last * call to vpGetError(). */ vpResult vpGetError(vpc) vpContext *vpc; { vpResult code; code = vpc->error_code; vpc->error_code = VP_OK; return(code); } /* * vpGetErrorString * * Return a descriptive string for an error code. */ char * vpGetErrorString(code) vpResult code; { if (code == VP_OK) return("no error"); else if (code < VPERROR_FIRST || code > VPERROR_LAST) return(NULL); else return(ErrorString[code - VPERROR_FIRST]); } /* * VPSetError * * Set the error code in vpc. */ vpResult VPSetError(vpc, code) vpContext *vpc; vpResult code; { if (vpc->error_code == VP_OK) vpc->error_code = code; return(code); } volpack-1.0b3/README0000644000265600020320000001430405701366404011046 00000000000000 VolPack version 1.0beta3 ------------------------ Phil Lacroute volpack@graphics.stanford.edu 16 December 1994 1. Introduction --------------- VolPack is a portable library of fast volume rendering algorithms that produce high-quality images. 2. Installation --------------- To build the library, do the following: A. Type "./configure" in this directory. This will run a shell script that determines the features of your operating system and then automatically chooses compiler flags and configuration constants for VolPack. Configure takes a number of options, but only the commonly-used ones are described here. You can specify the top-level installation directory with the "--prefix=" option, and the top-level installation directory for architecture-dependent binaries with "--exec_prefix=". Both options default to /usr/local. If you want, you can look at the Makefile configure builds and override some of the options. B. Type "make". This creates a library archive call "libvolpack.a". C. To compile the example programs type "make examples", or move to the examples directory and type "make". D. Type "make install" to install the library, include files, and manual entries. E. Look at the User's Guide in the "doc" directory for a tutorial introduction, and look at the examples programs in the "examples" directory (see examples/README). If you have a version of "m4" that does not understand the -D option then the compilation will fail (usually "make" will appear to hang after the first call to m4). Some systems have two versions of m4; you can choose the correct one by editting the "M4" macro in Makefile.in or by setting the M4 environment variable to the correct path before running configure. You can also install GNU m4. If your optimizer has trouble or takes a long time on some of the files you may want to use a lower optimization level for them. All of the files with names like vp_comp*.c are special-case versions of the rendering routine and you may choose to optimize only the ones you plan to use frequently. An important note for HP-UX users: The math library rint() function is broken in HP-UX 9.01 (and maybe other releases), causing the VolPack test programs to generate blank images. This is fixed by HP patch "PHSS_3597", which HP-UX users can get from HP support. 3. Documentation ---------------- The doc directory contains a user's guide to VolPack in HTML format (volpack.html) which you can read using Mosaic or any other Web browser. A PostScript version is also available. The man directory contains manual pages for each routine in the library. 4. Support ---------- If you have problems, bug reports or bug fixes, please send mail to: volpack@graphics.stanford.edu The author makes no commitment to fix bugs or provide support. However, future releases with fixes and enhancements are planned. If you like the library then drop us a note describing what you use it for! If you decide to use the software then please add yourself to our mailing list so we can tell you about bug fixes and new versions of the software. Just send a message to majordomo@lists.stanford.edu with the message body: subscribe volpack-announce 5. Data Sets and Other Goodies ------------------------------ One sample data set is provided in the examples directory. Some larger data sets and a more complete demonstration application, vprender, are available from the Stanford Computer Graphics Laboratory's ftp site: graphics.stanford.edu:pub/volpack or http://www-graphics.stanford.edu/ 6. Changes ---------- Release 1.0beta3 includes the following additions to release 1.0beta2: - a new shader for rendering shadows (see vpSetShadowLookupShader) - filtering routines for resampling volumes to different resolutions - the capability to produce images with different pixel formats, including formats with alpha channels - several important bug fixes, including a problem with depth cueing that caused "flashing" artifacts in rotation sequences - upgraded configuration script to autoconf 2.0 for even easier installation See the "changes" file for a complete list. There are minor incompatible changes to the functions vpSetImage and vpGetImage. 7. Copyright ------------ VolPack is covered by the following copyright notice: Copyright (c) 1994 The Board of Trustees of The Leland Stanford Junior University. All rights reserved. Permission to use, copy, modify and distribute this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice and this permission notice appear in all copies of this software and that you do not sell the software. Commercial licensing is available by contacting the author. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 8. Credits ---------- VolPack was written by Phil Lacroute at the Computer Graphics Laboratory, Stanford University. The algorithms are based on Phil's Ph.D. thesis research and are described in the following paper: Philippe Lacroute and Marc Levoy, Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transformation, Proc. SIGGRAPH '94 (Orlando, Florida, July 24-29, 1994). In Computer Graphics Proceedings, Annual Conference Series, 1994, ACM SIGGRAPH, pp. 451-458. If you publish a rendering made using VolPack and you would like to make an attribution, the following form is suggested: Image generated using the Stanford VolPack volume renderer. An appropriate longer attribution could omit the word Stanford but would include a citation of the SIGGRAPH '94 paper: Image generated using the VolPack volume renderer [#]. [#] Philippe Lacroute and Marc Levoy, Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transformation, Proc. SIGGRAPH '94 (Orlando, Florida, July 24-29, 1994). In Computer Graphics Proceedings, Annual Conference Series, 1994, ACM SIGGRAPH, pp. 451-458. volpack-1.0b3/vp_renderB.c0000644000265600020320000006035605701116543012425 00000000000000/* * vp_renderB.c * * Brute-force shear-warp volume rendering algorithm. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.28 $ */ #include "vp_global.h" static void AffineBruteForceRender ANSI_ARGS((vpContext *vpc)); static void ClassifySlice ANSI_ARGS((vpContext *vpc, int slicenum, float *opc_slice)); static void ShadeSlice ANSI_ARGS((vpContext *vpc, int slicenum, float *clr_slice)); static void ScaleColors ANSI_ARGS((double scale, float *clr_slice, int width, int height, int color_channels)); static void AlphaScaleColors ANSI_ARGS((float *opc_slice, float *clr_slice, int width, int height, int color_channels)); static void DepthCueSlice ANSI_ARGS((vpContext *vpc, float *clr_slice, int width, int height, int color_channels, double depth_00k, double depth_di, double depth_dj)); static void TranslateSlice ANSI_ARGS((float *opc_slice, float *clr_slice, int width, int height, double WgtTL_d, double WgtBL_d, double WgtTR_d, double WgtBR_d, int color_channels, float *resamp_opc_slice, float *resmp_clr_slice)); static void CompositeSlice ANSI_ARGS((float *resamp_opc, float *resamp_clr, int width, int height, int color_channels, void *int_image_ptr, int int_image_width, double min_opacity)); static void AffineBruteForceWarp ANSI_ARGS((vpContext *vpc)); /* * vpBruteForceRender * * Render an unclassified volume using the basic shear-warp algorithm * without any optimizations (no spatial data structure is used and * coherence is ignored). Use this routine as a standard for * correctness checking. */ vpResult vpBruteForceRender(vpc) vpContext *vpc; { int retcode; /* check for errors and initialize */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckClassifier(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckShader(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckImage(vpc)) != VP_OK) return(retcode); if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); /* render */ if (vpc->affine_view) AffineBruteForceRender(vpc); else return(VPSetError(vpc, VPERROR_BAD_OPTION)); return(VP_OK); } /* * AffineBruteForceRender * * Render an unclassified volume using the brute-force shear-warp * algorithm for an affine view transformation. */ static void AffineBruteForceRender(vpc) vpContext *vpc; { int icount; /* voxels per voxel scanline */ int jcount; /* voxel scanlines per voxel slice */ int kcount; /* voxel slices in the volume */ int k; /* voxel slice index */ int kstart, kstop; /* values of k for first and last slices */ int kincr; /* value to add to k to get to the next slice (either 1 or -1) */ float slice_u, slice_v; /* sheared object space coordinates of the top-left corner of the current constant-k slice of the volume data */ int slice_u_int; /* integer part of slice_u and slice_v */ int slice_v_int; float slice_u_frac; /* fractional part of slice_u and slice_v */ float slice_v_frac; int slice_start_index; /* index of top-left int. image pixel */ float WgtTL, WgtBL, /* weights in the range 0..1 which give the */ WgtTR, WgtBR; /* fractional contribution of the */ /* neighboring voxels to the current */ /* intermediate image pixel */ int color_channels; /* number of color channels to compute */ float *opc_slice; /* opacities after correction for viewpoint */ float *resamp_opc_slice; /* opacities after resampling */ float *clr_slice; /* colors for current voxel slice */ float *resamp_clr_slice; /* colors after resampling */ #ifdef FAST_DEPTH_CUEING float slice_depth_cueing; /* depth cueing factor for current slice */ float slice_dc_ratio; /* multiplier to get depth cueing factor for the next slice */ #endif void *intim; /* intermediate image pointer */ Debug((vpc, VPDEBUG_RENDER, "Algorithm: affine brute force\n")); /* find size of volume */ switch (vpc->best_view_axis) { case VP_X_AXIS: icount = vpc->ylen; jcount = vpc->zlen; kcount = vpc->xlen; break; case VP_Y_AXIS: icount = vpc->zlen; jcount = vpc->xlen; kcount = vpc->ylen; break; case VP_Z_AXIS: icount = vpc->xlen; jcount = vpc->ylen; kcount = vpc->zlen; break; default: VPBug("invalid viewing axis in AffineBruteForceRender"); } /* initialize intermediate image */ color_channels = vpc->color_channels; vpc->pad_int_to_maxwidth = 0; if (color_channels == 1) { bzero(vpc->int_image.gray_intim, vpc->intermediate_width * vpc->intermediate_height * sizeof(GrayIntPixel)); } else { ASSERT(color_channels == 3); bzero(vpc->int_image.rgb_intim, vpc->intermediate_width * vpc->intermediate_height * sizeof(RGBIntPixel)); } /* allocate memory for shaded and resampled voxel slices */ Alloc(vpc, opc_slice, float *, icount*jcount*sizeof(float), "opc_slice"); Alloc(vpc, resamp_opc_slice, float *, (icount+1)*(jcount+1)*sizeof(float), "resamp_opc_slice"); Alloc(vpc, clr_slice, float *, color_channels*icount*jcount*sizeof(float), "clr_slice"); Alloc(vpc, resamp_clr_slice, float *, color_channels*(icount+1)*(jcount+1)*sizeof(float), "resamp_clr_slice"); #ifdef FAST_DEPTH_CUEING /* initialize depth cueing */ if (vpc->dc_enable) { slice_dc_ratio = VPSliceDepthCueRatio(vpc); slice_depth_cueing = 1.; } #endif /* compute outer loop bounds */ if (vpc->reverse_slice_order) { kstart = kcount-1; kstop = -1; kincr = -1; } else { kstart = 0; kincr = 1; kstop = kcount; } /* loop over slices of the voxel data in front-to-back order */ for (k = kstart; k != kstop; k += kincr) { ReportStatus(vpc, (double)(k - kstart) / (double)(kstop - kstart)); /* compute coordinates of top-left corner of slice in sheared object space */ slice_u = vpc->shear_i * k + vpc->trans_i; slice_v = vpc->shear_j * k + vpc->trans_j; slice_u_int = (int)ceil(slice_u) - 1; slice_v_int = (int)ceil(slice_v) - 1; /* compute resampling weights for this slice */ slice_u_frac = slice_u - slice_u_int; slice_v_frac = slice_v - slice_v_int; WgtTL = slice_u_frac * slice_v_frac; WgtBL = slice_u_frac * ((float)1. - slice_v_frac); WgtTR = ((float)1. - slice_u_frac) * slice_v_frac; WgtBR = ((float)1. - slice_u_frac) * ((float)1. - slice_v_frac); /* classify the slice of voxels */ ClassifySlice(vpc, k, opc_slice); /* shade the slice of voxels */ ShadeSlice(vpc, k, clr_slice); /* perform depth cueing on the slice */ if (vpc->dc_enable) { #ifdef FAST_DEPTH_CUEING ScaleColors(slice_depth_cueing, clr_slice, icount, jcount, color_channels); slice_depth_cueing *= slice_dc_ratio; #else DepthCueSlice(vpc, clr_slice, icount, jcount, color_channels, vpc->depth_000 + k*vpc->depth_dk, vpc->depth_di, vpc->depth_dj); #endif } /* weight the voxels colors by the voxel opacities */ AlphaScaleColors(opc_slice, clr_slice, icount, jcount, color_channels); /* resample the slice of voxels */ TranslateSlice(opc_slice, clr_slice, icount, jcount, WgtTL, WgtBL, WgtTR, WgtBR, color_channels, resamp_opc_slice, resamp_clr_slice); /* composite the slice of resampled voxels */ slice_start_index = slice_u_int + slice_v_int*vpc->intermediate_width; if (color_channels == 1) intim = &vpc->int_image.gray_intim[slice_start_index]; else intim = &vpc->int_image.rgb_intim[slice_start_index]; CompositeSlice(resamp_opc_slice, resamp_clr_slice, icount+1, jcount+1, color_channels, intim, vpc->intermediate_width, vpc->min_opacity); } ReportStatus(vpc, 1.0); #ifdef FAST_DEPTH_CUEING /* depth cue the intermediate image */ if (vpc->dc_enable) VPDepthCueIntImage(vpc, vpc->reverse_slice_order ? kcount-1 : 0); #endif /* warp the intermediate image into the final image */ AffineBruteForceWarp(vpc); /* clean up */ Dealloc(vpc, opc_slice); Dealloc(vpc, resamp_opc_slice); Dealloc(vpc, clr_slice); Dealloc(vpc, resamp_clr_slice); } /* * ClassifySlice * * Classify a slice of voxels. */ static void ClassifySlice(vpc, slicenum, opc_slice) vpContext *vpc; int slicenum; float *opc_slice; { switch (vpc->best_view_axis) { case VP_X_AXIS: VPClassifyBlock(vpc, 1, slicenum, 0, 0, slicenum, vpc->ylen-1, vpc->zlen-1, opc_slice, 0, sizeof(float), vpc->ylen*sizeof(float)); break; case VP_Y_AXIS: VPClassifyBlock(vpc, 1, 0, slicenum, 0, vpc->xlen-1, slicenum, vpc->zlen-1, opc_slice, vpc->zlen*sizeof(float), 0, sizeof(float)); break; case VP_Z_AXIS: VPClassifyBlock(vpc, 1, 0, 0, slicenum, vpc->xlen-1, vpc->ylen-1, slicenum, opc_slice, sizeof(float), vpc->xlen*sizeof(float), 0); break; } } /* * ShadeSlice * * Shade a slice of voxels. */ static void ShadeSlice(vpc, slicenum, clr_slice) vpContext *vpc; int slicenum; float *clr_slice; { int color_bytes; color_bytes = sizeof(float) * vpc->color_channels; switch (vpc->best_view_axis) { case VP_X_AXIS: VPShadeBlock(vpc, slicenum, 0, 0, slicenum, vpc->ylen-1, vpc->zlen-1, clr_slice, 0, color_bytes, vpc->ylen*color_bytes); break; case VP_Y_AXIS: VPShadeBlock(vpc, 0, slicenum, 0, vpc->xlen-1, slicenum, vpc->zlen-1, clr_slice, vpc->zlen*color_bytes, 0, color_bytes); break; case VP_Z_AXIS: VPShadeBlock(vpc, 0, 0, slicenum, vpc->xlen-1, vpc->ylen-1, slicenum, clr_slice, color_bytes, vpc->xlen*color_bytes, 0); break; } } /* * ScaleColors * * Weight voxel colors by a constant factor for the whole slice. */ static void ScaleColors(scale, clr_slice, width, height, color_channels) double scale; float *clr_slice; int width; int height; int color_channels; { int i, j; float s; s = scale; for (j = 0; j < height; j++) { for (i = 0; i < width; i++) { if (color_channels == 1) { clr_slice[0] *= s; } else { clr_slice[0] *= s; clr_slice[1] *= s; clr_slice[2] *= s; } clr_slice += color_channels; } } } /* * AlphaScaleColors * * Weight voxel colors by voxels opacities. */ static void AlphaScaleColors(opc_slice, clr_slice, width, height, color_channels) float *opc_slice; /* 2D array of opacities (width by height) */ float *clr_slice; /* 2D array of colors (width by height) */ int width; /* size of voxel slice */ int height; int color_channels; /* number of color channels in clr_slice */ { int i, j; for (j = 0; j < height; j++) { for (i = 0; i < width; i++) { if (color_channels == 1) { clr_slice[0] *= opc_slice[0]; } else { clr_slice[0] *= opc_slice[0]; clr_slice[1] *= opc_slice[0]; clr_slice[2] *= opc_slice[0]; } clr_slice += color_channels; opc_slice++; } } } /* * DepthCueSlice * * Apply depth cueing factor to each voxel in a slice. */ static void DepthCueSlice(vpc, clr_slice, width, height, color_channels, depth_00k, depth_di, depth_dj) vpContext *vpc; float *clr_slice; int width; int height; int color_channels; double depth_00k; /* depth of top-left voxel in slice */ double depth_di, depth_dj; /* change in depth for unit change in i/j directions */ { int i, j; double depth, depth_0jk, factor; double dc_front_factor, dc_density; dc_front_factor = vpc->dc_front_factor; dc_density = vpc->dc_density; depth_0jk = depth_00k; for (j = 0; j < height; j++) { depth = depth_0jk; for (i = 0; i < width; i++) { if (depth < 0.0) factor = dc_front_factor * exp(-dc_density); else factor = dc_front_factor * exp(-dc_density * (1.0 - depth)); if (color_channels == 1) { clr_slice[0] *= factor; } else { clr_slice[0] *= factor; clr_slice[1] *= factor; clr_slice[2] *= factor; } clr_slice += color_channels; depth += depth_di; } depth_0jk += depth_dj; } } /* * TranslateSlice * * Translate and resample a slice of voxels. */ static void TranslateSlice(opc_slice, clr_slice, width, height, WgtTL_d, WgtBL_d, WgtTR_d, WgtBR_d, color_channels, resamp_opc_slice, resamp_clr_slice) float *opc_slice; /* 2D array of opacities (width by height) */ float *clr_slice; /* 2D array of colors (width by height) */ int width; /* size of voxel slice */ int height; double WgtTL_d; /* resampling weights */ double WgtBL_d; double WgtTR_d; double WgtBR_d; int color_channels; /* number of color channels in clr_slice */ float *resamp_opc_slice;/* 2D array for storing resampled opacities (width+1 by height+1) */ float *resamp_clr_slice;/* 2D array for storing resampled colors (width+1 by height+1) */ { int i, j; float WgtTL, WgtBL, WgtTR, WgtBR; float OpcAcc, RClrAcc, GClrAcc, BClrAcc; WgtTL = WgtTL_d; WgtBL = WgtBL_d; WgtTR = WgtTR_d; WgtBR = WgtBR_d; for (j = 0; j <= height; j++) { for (i = 0; i <= width; i++) { OpcAcc = 0.; RClrAcc = 0.; GClrAcc = 0.; BClrAcc = 0.; if (i > 0 && j > 0) { OpcAcc += WgtTL * opc_slice[-1-width]; if (color_channels == 1) { RClrAcc += WgtTL * clr_slice[-1-width]; } else { RClrAcc += WgtTL * clr_slice[3*(-1-width)]; GClrAcc += WgtTL * clr_slice[3*(-1-width)+1]; BClrAcc += WgtTL * clr_slice[3*(-1-width)+2]; } } if (i > 0 && j < height) { OpcAcc += WgtBL * opc_slice[-1]; if (color_channels == 1) { RClrAcc += WgtBL * clr_slice[-1]; } else { RClrAcc += WgtBL * clr_slice[3*(-1)]; GClrAcc += WgtBL * clr_slice[3*(-1)+1]; BClrAcc += WgtBL * clr_slice[3*(-1)+2]; } } if (i < width && j > 0) { OpcAcc += WgtTR * opc_slice[-width]; if (color_channels == 1) { RClrAcc += WgtTR * clr_slice[-width]; } else { RClrAcc += WgtTR * clr_slice[3*(-width)]; GClrAcc += WgtTR * clr_slice[3*(-width)+1]; BClrAcc += WgtTR * clr_slice[3*(-width)+2]; } } if (i < width && j < height) { OpcAcc += WgtBR * opc_slice[0]; if (color_channels == 1) { RClrAcc += WgtBR * clr_slice[0]; } else { RClrAcc += WgtBR * clr_slice[3*(0)]; GClrAcc += WgtBR * clr_slice[3*(0)+1]; BClrAcc += WgtBR * clr_slice[3*(0)+2]; } } *resamp_opc_slice = OpcAcc; if (color_channels == 1) { *resamp_clr_slice = RClrAcc; } else { resamp_clr_slice[0] = RClrAcc; resamp_clr_slice[1] = GClrAcc; resamp_clr_slice[2] = BClrAcc; } resamp_opc_slice++; resamp_clr_slice += color_channels; if (i != width) { opc_slice++; clr_slice += color_channels;; } } } } /* * CompositeSlice * * Composite a resampled slice of voxels into the intermediate image. */ static void CompositeSlice(resamp_opc, resamp_clr, width, height, color_channels, int_image_ptr, int_image_width, min_opacity) float *resamp_opc; /* array of resampled opacities (width by height) */ float *resamp_clr; /* array of resampled colors (width by height) */ int width; /* size of resampled voxel arrays */ int height; int color_channels; /* number of color channels */ void *int_image_ptr; /* pointer to intermediate image pixel corresponding to top-left resampled voxel */ int int_image_width; /* number of pixels in intermediate image scanline */ double min_opacity; /* low opacity threshold */ { int i, j; float old_opc, old_r, old_g, old_b; float new_opc, new_r, new_g, new_b; GrayIntPixel *gray_intim; RGBIntPixel *rgb_intim; if (color_channels == 1) gray_intim = int_image_ptr; else rgb_intim = int_image_ptr; for (j = 0; j < height; j++) { for (i = 0; i < width; i++) { if (*resamp_opc > min_opacity) { if (color_channels == 1) { old_opc = gray_intim->opcflt; old_r = gray_intim->clrflt; new_opc = old_opc + *resamp_opc * ((float)1. - old_opc); new_r = old_r + *resamp_clr * ((float)1. - old_opc); gray_intim->opcflt = new_opc; gray_intim->clrflt = new_r; } else { old_opc = rgb_intim->opcflt; old_r = rgb_intim->rclrflt; old_g = rgb_intim->gclrflt; old_b = rgb_intim->bclrflt; new_opc = old_opc + *resamp_opc * ((float)1. - old_opc); new_r = old_r + resamp_clr[0] * ((float)1. - old_opc); new_g = old_g + resamp_clr[1] * ((float)1. - old_opc); new_b = old_b + resamp_clr[2] * ((float)1. - old_opc); rgb_intim->opcflt = new_opc; rgb_intim->rclrflt = new_r; rgb_intim->gclrflt = new_g; rgb_intim->bclrflt = new_b; } } resamp_opc++; if (color_channels == 1) { resamp_clr++; gray_intim++; } else { resamp_clr += 3; rgb_intim++; } } /* for i */ if (color_channels == 1) gray_intim += int_image_width - width; else rgb_intim += int_image_width - width; } /* for j */ } /* * AffineBruteForceWarp * * Warp the intermediate image into the final image (brute-force version, * affine transformations only). */ static void AffineBruteForceWarp(vpc) vpContext *vpc; { unsigned char *int_image; /* pointer to start of intermediate image (GrayIntPixel or RGBIntPixel) */ int int_width; /* size of intermediate image */ int int_height; int int_scanbytes; /* bytes per scanline in intermediate image */ unsigned char *image; /* final image pixel */ int i, j; /* coordinates of final image pixel */ float int_i_flt, int_j_flt; /* position of final image pixel in intermediate image coordinates */ float int_i_int, int_j_int; /* truncated int_i_flt, int_j_flt */ int int_i, int_j; /* integer int_i_int, int_j_int */ double alpha_i, alpha_j; /* separable interpolation weights */ double wgt; /* interpolation weight */ GrayIntPixel *gray_pix; /* intermediate image pixel (grayscale) */ RGBIntPixel *rgb_pix; /* intermediate image pixel (RGB) */ double denom; double ma, mb, mc, md, me, mf; float r, g, b, alpha; int r_int, g_int, b_int, alpha_int; int color_channels; /* number of color channels in int. image */ int pixel_type; /* type of output image pixel */ /* initialize */ color_channels = vpc->color_channels; pixel_type = vpc->pixel_type; int_width = vpc->intermediate_width; int_height = vpc->intermediate_height; if (vpc->color_channels == 1) { int_image = (unsigned char *)vpc->int_image.gray_intim; if (vpc->pad_int_to_maxwidth) int_scanbytes = vpc->max_intermediate_width*sizeof(GrayIntPixel); else int_scanbytes = vpc->intermediate_width*sizeof(GrayIntPixel); } else { int_image = (unsigned char *)vpc->int_image.rgb_intim; if (vpc->pad_int_to_maxwidth) int_scanbytes = vpc->max_intermediate_width*sizeof(RGBIntPixel); else int_scanbytes = vpc->intermediate_width*sizeof(RGBIntPixel); } /* compute transformation from final image pixel to intermediate image pixel */ denom = 1. / (vpc->warp_2d[0][0]*vpc->warp_2d[1][1] - vpc->warp_2d[0][1]*vpc->warp_2d[1][0]); ma = vpc->warp_2d[1][1] * denom; mb = -vpc->warp_2d[0][1] * denom; mc = (vpc->warp_2d[0][1]*vpc->warp_2d[1][2] - vpc->warp_2d[1][1]*vpc->warp_2d[0][2]) * denom; md = -vpc->warp_2d[1][0] * denom; me = vpc->warp_2d[0][0] * denom; mf = (vpc->warp_2d[1][0]*vpc->warp_2d[0][2] - vpc->warp_2d[0][0]*vpc->warp_2d[1][2]) * denom; /* loop over the pixels of the final image */ for (j = 0; j < vpc->image_height; j++) { image = (unsigned char *)vpc->image + j*vpc->image_bytes_per_scan; for (i = 0; i < vpc->image_width; i++) { /* reverse-map final image pixel into intermediate image */ int_i_flt = ma*i + mb*j + mc; int_j_flt = md*i + me*j + mf; /* compute interpolation weights */ int_i_int = floor(int_i_flt); int_j_int = floor(int_j_flt); alpha_i = int_i_flt - int_i_int; alpha_j = int_j_flt - int_j_int; int_i = (int)int_i_int; int_j = (int)int_j_int; /* interpolate */ r = 0; g = 0; b = 0; alpha = 0; if (int_i >= 0 && int_i < int_width && int_j >= 0 && int_j < int_height) { wgt = (1. - alpha_i) * (1. - alpha_j); if (color_channels == 1) { gray_pix = (GrayIntPixel *)(int_image + int_j* int_scanbytes) + int_i; r += gray_pix->clrflt*wgt; alpha += gray_pix->opcflt*wgt; } else { rgb_pix = (RGBIntPixel *)(int_image + int_j* int_scanbytes) + int_i; r += rgb_pix->rclrflt*wgt; g += rgb_pix->gclrflt*wgt; b += rgb_pix->bclrflt*wgt; alpha += rgb_pix->opcflt*wgt; } } if (int_i >= 0 && int_i < int_width && int_j >= -1 && int_j < int_height-1) { wgt = (1. - alpha_i) * alpha_j; if (color_channels == 1) { gray_pix = (GrayIntPixel *)(int_image + (int_j+1)* int_scanbytes) + int_i; r += gray_pix->clrflt*wgt; alpha += gray_pix->opcflt*wgt; } else { rgb_pix = (RGBIntPixel *)(int_image + (int_j+1)* int_scanbytes) + int_i; r += rgb_pix->rclrflt*wgt; g += rgb_pix->gclrflt*wgt; b += rgb_pix->bclrflt*wgt; alpha += rgb_pix->opcflt*wgt; } } if (int_i >= -1 && int_i < int_width-1 && int_j >= 0 && int_j < int_height) { wgt = alpha_i * (1. - alpha_j); if (color_channels == 1) { gray_pix = (GrayIntPixel *)(int_image + int_j* int_scanbytes) + int_i+1; r += gray_pix->clrflt*wgt; alpha += gray_pix->opcflt*wgt; } else { rgb_pix = (RGBIntPixel *)(int_image + int_j* int_scanbytes) + int_i+1; r += rgb_pix->rclrflt*wgt; g += rgb_pix->gclrflt*wgt; b += rgb_pix->bclrflt*wgt; alpha += rgb_pix->opcflt*wgt; } } if (int_i >= -1 && int_i < int_width-1 && int_j >= -1 && int_j < int_height-1) { wgt = alpha_i * alpha_j; if (color_channels == 1) { gray_pix = (GrayIntPixel *)(int_image + (int_j+1)* int_scanbytes) + int_i+1; r += gray_pix->clrflt*wgt; alpha += gray_pix->opcflt*wgt; } else { rgb_pix = (RGBIntPixel *)(int_image + (int_j+1)* int_scanbytes) + int_i+1; r += rgb_pix->rclrflt*wgt; g += rgb_pix->gclrflt*wgt; b += rgb_pix->bclrflt*wgt; alpha += rgb_pix->opcflt*wgt; } } /* clamp the pixel */ if (alpha > 255.) alpha_int = 255; else if (alpha < 0.) alpha_int = 0; else alpha_int = alpha; if (r > 255.) r_int = 255; else if (r < 0) r_int = 0; else r_int = r; if (color_channels == 3) { if (g > 255.) g_int = 255; else if (g < 0.) g_int = 0; else g_int = g; if (b > 255.) b_int = 255; else if (b < 0.) b_int = 0; else b_int = b; } /* store the pixel */ switch (pixel_type) { case VP_ALPHA: *image++ = alpha_int; break; case VP_LUMINANCE: *image++ = r_int; break; case VP_LUMINANCEA: *image++ = r_int; *image++ = alpha_int; break; case VP_RGB: *image++ = r_int; *image++ = g_int; *image++ = b_int; break; case VP_RGBA: *image++ = r_int; *image++ = g_int; *image++ = b_int; *image++ = alpha_int; break; case VP_BGR: *image++ = b_int; *image++ = g_int; *image++ = r_int; break; case VP_ABGR: *image++ = alpha_int; *image++ = b_int; *image++ = g_int; *image++ = r_int; break; default: VPBug("bad pixel type"); } } /* for i */ } /* for j */ } #ifdef DEBUG StoreFloatImage(data, width, height, scale, filename) float *data; /* array of input data */ int width, height; /* size of array */ double scale; /* factor for scaling pixel values */ char *filename; /* name of file to store result */ { unsigned char *image, *imptr; int i, j; image = (unsigned char *)malloc(width*height); imptr = image; for (j = 0; j < height; j++) { for (i = 0; i < width; i++) { *imptr++ = (int)rint(scale * *data++); } } VprWriteGrayscaleTIFF(filename, width, height, width, image); free(image); } #endif volpack-1.0b3/Makefile.in0000644000265600020320000007253110727044632012241 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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@ # Makefile.am for volpack # Andreas Tille and Daniel Leidert # GPL VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ config.guess config.sub depcomp install-sh ltmain.sh missing 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 config.status.lineno mkinstalldirs = $(install_sh) -d 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) libvolpack_la_LIBADD = dist_libvolpack_la_OBJECTS = vp_check.lo vp_context.lo vp_extract.lo \ vp_file.lo vp_linalg.lo vp_octree.lo vp_renderA.lo \ vp_renderB.lo vp_renderC.lo vp_renderR.lo vp_resample.lo \ vp_rle.lo vp_shade.lo vp_transpose.lo vp_util.lo vp_view.lo \ vp_warp.lo am__objects_1 = vp_compAC11B.lo vp_compAC31B.lo vp_compAC32B.lo \ vp_compAR11B.lo vp_compAR31B.lo vp_compAR32B.lo am__objects_2 = vp_compAC1NB.lo vp_compAC3NB.lo vp_compAR1NB.lo \ vp_compAR3NB.lo vp_compAC1PB.lo vp_compAC3PB.lo \ vp_compAR1PB.lo vp_compAR3PB.lo vp_compAC00G.lo \ vp_compAR00G.lo vp_compAC1NS.lo vp_compAC3NS.lo \ vp_compAR1NS.lo vp_compAR3NS.lo $(am__objects_1) am__objects_3 = vp_warpA101N.lo vp_warpA301N.lo vp_warpA110N.lo \ vp_warpA111N.lo vp_warpA330N.lo vp_warpA331N.lo \ vp_warpA330R.lo vp_warpA331R.lo nodist_libvolpack_la_OBJECTS = $(am__objects_2) $(am__objects_3) libvolpack_la_OBJECTS = $(dist_libvolpack_la_OBJECTS) \ $(nodist_libvolpack_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ 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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dist_libvolpack_la_SOURCES) \ $(nodist_libvolpack_la_SOURCES) DIST_SOURCES = $(dist_libvolpack_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-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@ 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@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBVOLPACK_VERSION_INFO = @LIBVOLPACK_VERSION_INFO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ MFLAGS = @MFLAGS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OFLAGS = @OFLAGS@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = doc man examples EXTRA_DIST = no_edit_header vp_compA.m4 vp_warpA.m4 makeopts CLEANFILES = $(COMP_SRCS) $(WARP_SRCS) vp_opts.c AM_CFLAGS = $(AC_FLAGS) $(CCOPT_FLAGS) $(MFLAGS) \ $(PROTO_FLAG) $(UNROLL_FLAG) $(OPT_FLAGS) AM_LDFLAGS = -version-info @LIBVOLPACK_VERSION_INFO@ # Make sure, the library and source files are build first. BUILT_SOURCES = vp_opts.c $(COMP_SRCS) $(WARP_SRCS) $(lib_LTLIBRARIES) lib_LTLIBRARIES = libvolpack.la dist_libvolpack_la_SOURCES = volpack.h vp_global.h patchlevel.h \ vp_check.c vp_context.c vp_extract.c vp_file.c vp_linalg.c vp_octree.c \ vp_renderA.c vp_renderB.c vp_renderC.c vp_renderR.c vp_resample.c \ vp_rle.c vp_shade.c vp_transpose.c vp_util.c vp_view.c vp_warp.c nodist_libvolpack_la_SOURCES = $(COMP_SRCS) $(WARP_SRCS) # list of optional C source files to build with code specialized # for particular shaders and resampling filters OPT_SRCS = vp_compAC11B.c vp_compAC31B.c vp_compAC32B.c \ vp_compAR11B.c vp_compAR31B.c vp_compAR32B.c # C define flags corresponding to COMP_SRCS; these tell the dispatch # routines in the library which object files are available OPT_FLAGS = -DCOMP_AC11B -DCOMP_AC31B -DCOMP_AC32B \ -DCOMP_AR11B -DCOMP_AR31B -DCOMP_AR32B COMP_SRCS = vp_compAC1NB.c vp_compAC3NB.c vp_compAR1NB.c vp_compAR3NB.c \ vp_compAC1PB.c vp_compAC3PB.c vp_compAR1PB.c vp_compAR3PB.c \ vp_compAC00G.c vp_compAR00G.c vp_compAC1NS.c vp_compAC3NS.c \ vp_compAR1NS.c vp_compAR3NS.c $(OPT_SRCS) WARP_SRCS = vp_warpA101N.c vp_warpA301N.c vp_warpA110N.c vp_warpA111N.c \ vp_warpA330N.c vp_warpA331N.c vp_warpA330R.c vp_warpA331R.c COMP_IN = no_edit_header vp_compA.m4 WARP_IN = no_edit_header vp_warpA.m4 ESRC = vp_raycast.c EOBJ = vp_raycast.o MAINTAINERCLEANFILES = autom4te.cache all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj 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) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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) $(AM_MAKEFLAGS) 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) @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 libvolpack.la: $(libvolpack_la_OBJECTS) $(libvolpack_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libvolpack_la_OBJECTS) $(libvolpack_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC00G.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC11B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC1NB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC1NS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC1PB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC31B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC32B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC3NB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC3NS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAC3PB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR00G.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR11B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR1NB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR1NS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR1PB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR31B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR32B.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR3NB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR3NS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_compAR3PB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_extract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_linalg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_octree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_renderA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_renderB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_renderC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_renderR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_rle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_shade.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_transpose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_view.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA101N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA110N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA111N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA301N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA330N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA330R.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA331N.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vp_warpA331R.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 # 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" $(RECURSIVE_CLEAN_TARGETS): @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) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 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" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(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 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 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-dvi: install-dvi-recursive install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive 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-libLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool 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-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES vp_opts.c: makeopts Makefile ./makeopts vp_opts.c $(CFLAGS) $(COMP_SRCS): $(COMP_IN) $(M4) -DSourceFile=$@ $^ > $@ $(WARP_SRCS): $(WARP_IN) $(M4) -DSourceFile=$@ $^ > $@ # 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: volpack-1.0b3/no_edit_header0000644000265600020320000000156205611026331013034 00000000000000/* * DO NOT EDIT THIS FILE! It was created automatically by m4. */ /* * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ volpack-1.0b3/volpack.h0000644000265600020320000006140305701116552011775 00000000000000/* * volpack.h * * Header file for VolPack. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ #ifndef _VOLPACK #define _VOLPACK /******************************************************************* * Definitions to customize declarations for different C dialects. * *******************************************************************/ #ifdef __STDC__ #ifndef NO_PROTOTYPE #define ANSI_C #endif #endif #ifdef __cplusplus #define ANSI_C #define EXTERN extern "C" #else #define EXTERN extern #endif #ifdef ANSI_C #define ANSI_ARGS(x) x #else #define ANSI_ARGS(x) () #endif /******************************************************************* * Configuration constants. * *******************************************************************/ #define VP_EPS 1.0e-11 /* smallest reasonable nonzero number */ #define VP_MAX_VOLUME_DIM 1024 /* maximum length of a voxel scanline */ #define VP_MAX_FIELDS 6 /* maximum number of fields in a voxel */ #define VP_MAX_MATERIAL 6 /* maximum number of materials in a volume */ #define VP_MAX_LIGHTS 6 /* maximum number of lights */ /* magic numbers for disk files */ #define VP_CVFILE_MAGIC 0x4F4F5F5F /* classified volume file */ #define VP_OCTFILE_MAGIC 0x4F4F6F6F /* min-max octree file */ #define VP_RVFILE_MAGIC 0x4F4F7F7F /* raw volume file */ #define VP_VPCFILE_MAGIC 0x4F4F8F8F /* rendering context dump */ #define VP_VERSION "1.1" /* version string */ #define VP_MAJOR_VERSION 1 /* major version number */ #define VP_MINOR_VERSION 1 /* minor version number */ /******************************************************************* * Global constants. * *******************************************************************/ /* options for vpGet* and vpSet* */ #define VP_XLEN 1000 /* x dimension of volume */ #define VP_YLEN 1001 /* y dimension of volume */ #define VP_ZLEN 1002 /* z dimension of volume */ #define VP_BYTES_PER_VOXEL 1003 /* size of raw voxel in bytes */ #define VP_VOXEL_FIELD_COUNT 1004 /* number of fields in a voxel */ #define VP_SHADE_FIELD_COUNT 1005 /* number of fields for shading */ #define VP_FIELD_SIZES 1006 /* size of each field */ #define VP_FIELD_OFFSETS 1007 /* byte offsets for each field */ #define VP_FIELD_MAXES 1008 /* max. value for each field */ #define VP_VOXEL_DATA 1009 /* pointer to voxel data */ #define VP_VOXEL_DATA_SIZE 1010 /* size of voxel data in bytes */ #define VP_VOXEL_XSTRIDE 1011 /* voxel data strides */ #define VP_VOXEL_YSTRIDE 1012 /* voxel data strides */ #define VP_VOXEL_ZSTRIDE 1013 /* voxel data strides */ #define VP_MIN_VOXEL_OPACITY 1014 /* thresh. for classification */ #define VP_CLASSIFY_FIELD_COUNT 1015 /* number of fields for classifier */ #define VP_CLASSIFY_FIELDS 1016 /* classification field numbers */ #define VP_CLASSIFY_TABLES 1017 /* classification tables */ #define VP_CLASSIFY_TABLE_SIZES 1018 /* classification table sizes */ #define VP_COLOR_CHANNELS 1019 /* number of color channels */ #define VP_SHADE_FUNC 1020 /* shading callback */ #define VP_GRAY_SHADE_FUNC 1021 /* grayscale shading function */ #define VP_RGB_SHADE_FUNC 1022 /* RGB shading function */ #define VP_SHADE_COLOR_TABLE 1023 /* shading color lookup table */ #define VP_SHADE_COLOR_SIZE 1024 /* size of shading color table */ #define VP_SHADE_WEIGHT_TABLE 1025 /* shading weight lookup table */ #define VP_SHADE_WEIGHT_SIZE 1026 /* size of shading weight table */ #define VP_SHADE_COLOR_FIELD 1027 /* field for color table index */ #define VP_SHADE_WEIGHT_FIELD 1028 /* field for weight table index */ #define VP_LIGHT_BOTH_SIDES 1029 /* use two-sided lighting */ #define VP_REVERSE_SURFACE_SIDES 1030 /* reverse interior and exterior */ #define VP_DEPTH_CUE 1031 /* depth cueing */ #define VP_DEPTH_CUE_FRONT 1032 /* depth cueing front factor */ #define VP_DEPTH_CUE_DENSITY 1034 /* depth cueing density */ #define VP_DEPTH_CUE_TABLE_SIZE 1035 /* # of entries in depth-cue table */ #define VP_DEPTH_CUE_SIZE_HINT 1036 /* hint for # of entries */ #define VP_DEPTH_CUE_QUANTIZATION 1037 /* smallest resolvable depth */ #define VP_CONCAT_MODE 1038 /* VP_CONCAT_LEFT or VP_CONCAT_RIGHT */ #define VP_IMAGE 1039 /* image array */ #define VP_IMAGE_WIDTH 1040 /* image width */ #define VP_IMAGE_HEIGHT 1041 /* image height */ #define VP_IMAGE_SCAN_SIZE 1042 /* bytes per scan in image */ #define VP_MAX_RAY_OPACITY 1043 /* thresh. for early ray termination */ #define VP_VIEW_AXIS 1044 /* principal viewing axis */ #define VP_INTERMEDIATE_WIDTH 1045 /* width of intermediate image */ #define VP_INTERMEDIATE_HEIGHT 1046 /* height of intermediate image */ #define VP_INTERMEDIATE_COLOR 1047 /* color channels in int. image */ #define VP_INT_WIDTH_HINT 1048 /* hint for intermediate image */ #define VP_INT_HEIGHT_HINT 1049 /* hint for intermediate height */ #define VP_VIEW_X_AXIS 1050 /* enable X viewing axis */ #define VP_VIEW_Y_AXIS 1051 /* enable Y viewing axis */ #define VP_VIEW_Z_AXIS 1052 /* enable Z viewing axis */ #define VP_VIEW_X_SIZE 1053 /* size of X view data */ #define VP_VIEW_Y_SIZE 1054 /* size of Y view data */ #define VP_VIEW_Z_SIZE 1055 /* size of Z view data */ #define VP_MMOCTREE_THRESHOLDS 1056 /* thresholds for min-max octree */ #define VP_MMOCTREE_SIZE 1057 /* size of min-max octree */ #define VP_LOG_ALLOC_FUNC 1058 /* function to log allocations */ #define VP_LOG_FREE_FUNC 1059 /* function to log deallocations */ #define VP_STATUS_FUNC 1060 /* function to give progress reports */ #define VP_READ_FUNC 1061 /* function to read from file */ #define VP_WRITE_FUNC 1062 /* function to write to file */ #define VP_MMAP_FUNC 1063 /* function to memory map a file */ #define VP_CLIENT_FUNC 1064 /* client data */ #define VP_MATERIAL_COUNT 1065 /* number of materials */ #define VP_CURRENT_MATRIX 1066 /* current transformation matrix */ #define VP_CLIENT_DATA 1067 /* client data */ #define VP_SHADOW 1068 /* enable shadows */ #define VP_SHADOW_LIGHT 1069 /* light number for shadows */ #define VP_SHADOW_WIDTH_HINT 1070 /* hint for width of shadow buffer */ #define VP_SHADOW_HEIGHT_HINT 1071 /* hint for height of shadow buffer */ #define VP_SHADOW_WIDTH 1072 /* width of shadow image */ #define VP_SHADOW_HEIGHT 1073 /* height of shadow image */ #define VP_SHADOW_COLOR_TABLE 1074 /* shadow color lookup table */ #define VP_SHADOW_COLOR_SIZE 1075 /* size of shadow color table */ #define VP_SHADOW_BIAS 1076 /* shadow bias distance */ #define VP_PIXEL_TYPE 1077 /* image pixel type */ #define VP_CLAMP_SHADE_TABLE 1078 /* clamp shade table entries */ #define VP_COMPOSITE_ORDER 1079 /* slice compositing order */ #define VP_AXIS_OVERRIDE 1080 /* override for best_view_axis */ #define VP_TRACE_SHADOW_K 1081 /* slice number for shadow tracing */ /* light numbers for vpSetLight */ #define VP_LIGHT0 2000 #define VP_LIGHT1 2001 #define VP_LIGHT2 2002 #define VP_LIGHT3 2003 #define VP_LIGHT4 2004 #define VP_LIGHT5 2005 /* property codes for vpSetLight */ #define VP_COLOR 2100 /* light color */ #define VP_DIRECTION 2101 /* light direction */ /* material numbers for vpSetMaterial */ #define VP_MATERIAL0 2200 #define VP_MATERIAL1 2201 #define VP_MATERIAL2 2202 #define VP_MATERIAL3 2203 #define VP_MATERIAL4 2204 #define VP_MATERIAL5 2205 /* property codes for vpSetMaterial */ #define VP_AMBIENT 2300 /* ambient material coefficients */ #define VP_DIFFUSE 2301 /* diffuse material coefficients */ #define VP_SPECULAR 2302 /* specular material coefficients */ #define VP_SHINYNESS 2303 /* specular exponent */ /* projection types for vpWindow and vpWindowPHIGS */ #define VP_PARALLEL 2400 /* parallel projection */ #define VP_PERSPECTIVE 2401 /* perspective projection */ /* volume type codes for vpExtract */ #define VP_RAW_VOLUME 2500 /* unclassified volume */ #define VP_CLASSIFIED_VOLUME 2501 /* classified volume, optimal view */ #define VP_CLX_VOLUME 2502 /* classified volume, X view */ #define VP_CLY_VOLUME 2503 /* classified volume, Y view */ #define VP_CLZ_VOLUME 2504 /* classified volume, Z view */ /* matrix concatenation modes for vpSeti(VP_CONCAT_MODE) */ #define VP_CONCAT_RIGHT 2600 /* concatenate matrices on right */ #define VP_CONCAT_LEFT 2601 /* concatenate matrices on left */ /* surface side codes for vpSetMaterial (these are bit fields) */ #define VP_EXTERIOR 1 #define VP_INTERIOR 2 #define VP_BOTH_SIDES (VP_EXTERIOR | VP_INTERIOR) /* principal axes (used as array indexes) */ #define VP_X_AXIS 0 #define VP_Y_AXIS 1 #define VP_Z_AXIS 2 #define VP_NO_AXIS -1 /* transformation matrices (used as array indexes) */ #define VP_MODEL 0 /* modelling transform (object -> world) */ #define VP_VIEW 1 /* viewing transform (world -> eye) */ #define VP_PROJECT 2 /* projection transform (eye -> clip) */ #define VP_SCREEN 8 /* screen transform (object -> screen) */ /* special field type codes */ #define VP_SKIP_FIELD -1 /* ignore a field */ #define VP_OPACITY_FIELD -2 /* compute opacity */ #define VP_CORRECTED_OPAC_FIELD -3 /* compute opac. corrected for view */ #define VP_COLOR_FIELD -4 /* compute color */ /* buffer codes */ #define VP_IMAGE_BUFFER 4000 /* intermediate image buffer */ #define VP_SHADOW_BUFFER 4001 /* shadow buffer */ /* pixel formats */ #define VP_ALPHA 5000 /* opacity */ #define VP_LUMINANCE 5001 /* grayscale color */ #define VP_LUMINANCEA 5002 /* grayscale color + opacity */ #define VP_RGB 5003 /* RGB color */ #define VP_RGBA 5004 /* RGB color + opacity */ #define VP_BGR 5005 /* RGB color, reverse byte order */ #define VP_ABGR 5006 /* RGB color + opacity, reverse order*/ /* voxel fields computed by vpScanlineNormals */ #define VP_NORM_SIZE 2 /* 2 byte normal index */ #define VP_SCALAR_SIZE 1 /* 1 byte scalar value */ #define VP_GRAD_SIZE 1 /* 1 byte gradient magnitude */ #define VP_NORM_MAX 7923 /* maximum value of a 13 bit normal */ #define VP_SCALAR_MAX 255 /* maximum value of a scalar */ #define VP_GRAD_MAX 221 /* maximum value of a gradient */ #define VP_OPACITY_MAX 255 /* maximum value of an opacity */ /* data types */ #define VP_UCHAR 1200 /* unsigned char */ #define VP_USHORT 1201 /* unsigned short */ #define VP_FLOAT 1202 /* float */ /* filter types */ #define VP_BOX_FILTER 1300 /* box filter */ #define VP_LINEAR_FILTER 1301 /* linear filter (triangle) */ #define VP_GAUSSIAN_FILTER 1302 /* gaussian, sigma defined below */ #define VP_BSPLINE_FILTER 1303 /* cubic bspline filter */ #define VP_MITCHELL_FILTER 1304 /* Mitchell bicubic filter */ #define VP_GAUSSIAN_SIGMA 0.4 /******************************************************************* * Macros. * *******************************************************************/ /* set fields of a vector */ #define vpSetVector3(v, v0, v1, v2) v[0]=v0; v[1]=v1; v[2]=v2 #define vpSetVector4(v, v0, v1, v2, v3) v[0]=v0; v[1]=v1; v[2]=v2; v[3]=v3 /* compute an offset to a field in a structure */ #define vpFieldOffset(ptr, field) ((char *)&(ptr)->field - (char *)(ptr)) /******************************************************************* * Data type definitions. * *******************************************************************/ typedef unsigned vpResult; /* result code */ typedef double vpVector3[3]; /* 3 element vector */ typedef double vpVector4[4]; /* 4 element vector */ typedef double vpMatrix3[3][3]; /* 3 by 3 element matrix */ typedef double vpMatrix4[4][4]; /* 4 by 4 element matrix */ typedef struct _vp_context vpContext; /******************************************************************* * Debugging codes. * *******************************************************************/ #define VPDEBUG_VIEW 0 /* view transform calculations */ #define VPDEBUG_RENDER 1 /* high-level rendering stages */ #define VPDEBUG_RBUF 2 /* render buffer allocation */ #define VPDEBUG_OPCCORRECT 3 /* opacity correction */ #define VPDEBUG_DEPTHCUE 4 /* depth cueing */ #define VPDEBUG_PYRAMID 5 /* pyramid construction */ #define VPDEBUG_OCTREE 6 /* octree construction */ #define VPDEBUG_CLSFYOCTREE 7 /* octree classification */ #define VPDEBUG_OCTREERUNS 8 /* runs computed from octree */ #define VPDEBUG_OCTREETRAVERSE 9 /* octree traversal */ #define VPDEBUG_TRANSPOSE 10 /* volume transposing */ #define VPDEBUG_COMPOSITE 11 /* compositing */ #define VPDEBUG_SHADOW 12 /* shadows */ #define VPDEBUG_COUNT 13 /* total number of codes */ /******************************************************************* * Timer codes. * *******************************************************************/ #define VPTIMER_SHADE 0 /* compute shading lookup table */ #define VPTIMER_COMPOSITE 1 /* compositing loop */ #define VPTIMER_DEPTHCUE 2 /* depth cueing fixup loop */ #define VPTIMER_WARP 3 /* 2D warp */ #define VPTIMER_TRAVERSE_RUNS 4 /* traverse runs during compositing */ #define VPTIMER_PROCESS_VOXELS 5 /* process voxels during compositing */ #define VPTIMER_ERT 6 /* early ray termination overhead */ #define VPTIMER_CLSFY_OCTREE 7 /* classify octree nodes */ #define VPTIMER_TRAVERSE_OCTREE 8 /* traverse octree nodes */ #define VPTIMER_RENDER 9 /* render */ #define VPTIMER_CLEAR 10 /* clear intermediate image */ #define VPTIMER_COUNT 11 /* total number of codes */ /******************************************************************* * Error codes. * *******************************************************************/ #define VP_OK 0 /* successful return */ #define VPERROR_FIRST 1000 #define VPERROR_LIMIT_EXCEEDED 1000 /* exceeded a built-in limit */ #define VPERROR_SINGULAR 1001 /* singular vector or matrix */ #define VPERROR_IO 1002 /* file I/O error */ #define VPERROR_BAD_SIZE 1003 /* invalid buffer size */ #define VPERROR_BAD_IMAGE 1004 /* invalid image definition */ #define VPERROR_BAD_SHADER 1005 /* invalid shader definition */ #define VPERROR_BAD_CLASSIFIER 1006 /* invalid classifier definition */ #define VPERROR_BAD_VOLUME 1007 /* invalid volume definition */ #define VPERROR_BAD_VOXEL 1008 /* invalid voxel definition */ #define VPERROR_BAD_OPTION 1009 /* invalid option code */ #define VPERROR_BAD_VALUE 1010 /* argument out of range */ #define VPERROR_BAD_FILE 1011 /* file has bad magic number */ #define VPERROR_BAD_SHADOW 1012 /* cannot compute shadow buffer */ #define VPERROR_LAST 1012 /******************************************************************* * Global variables. * *******************************************************************/ EXTERN char *vpCompilerOptions; /******************************************************************* * Function declarations. * *******************************************************************/ /* contexts */ EXTERN vpContext * vpCreateContext ANSI_ARGS((void)); EXTERN void vpDestroyContext ANSI_ARGS((vpContext *vpc)); /* volumes */ EXTERN vpResult vpSetVolumeSize ANSI_ARGS((vpContext *vpc, int xlen, int ylen, int zlen)); EXTERN vpResult vpSetVoxelSize ANSI_ARGS((vpContext *vpc, int bytes_per_voxel, int num_voxel_fields, int num_shade_fields, int num_clsfy_fields)); EXTERN vpResult vpSetVoxelField ANSI_ARGS((vpContext *vpc, int field_num, int field_size, int field_offset, int field_max)); EXTERN vpResult vpSetRawVoxels ANSI_ARGS((vpContext *vpc, void *raw_voxels, int raw_voxels_size, int xstride, int ystride, int zstride)); /* classification */ EXTERN vpResult vpSetClassifierTable ANSI_ARGS((vpContext *vpc, int param_num, int param_field, float *table, int table_size)); EXTERN vpResult vpClassifyScalars ANSI_ARGS((vpContext *vpc, unsigned char *scalar_data, int length, int scalar_field, int grad_field, int norm_field)); EXTERN vpResult vpClassifyVolume ANSI_ARGS((vpContext *vpc)); EXTERN vpResult vpClassifyScanline ANSI_ARGS((vpContext *vpc, void *voxels)); EXTERN vpResult vpDestroyClassifiedVolume ANSI_ARGS(( vpContext *vpc)); EXTERN vpResult vpMinMaxOctreeThreshold ANSI_ARGS((vpContext *vpc, int param, int range)); EXTERN vpResult vpCreateMinMaxOctree ANSI_ARGS((vpContext *vpc, int root_node_size, int base_node_size)); EXTERN vpResult vpDestroyMinMaxOctree ANSI_ARGS((vpContext *vpc)); EXTERN vpResult vpOctreeMask ANSI_ARGS((vpContext *vpc, unsigned char *array, int array_size, int max_level)); /* shading */ EXTERN vpResult vpSetLookupShader ANSI_ARGS((vpContext *vpc, int color_channels, int num_materials, int color_field, float *color_table, int color_table_size, int weight_field, float *weight_table, int weight_table_size)); EXTERN vpResult vpSetShadowLookupShader ANSI_ARGS((vpContext *vpc, int color_channels, int num_materials, int color_field, float *color_table, int color_table_size, int weight_field, float *weight_table, int weight_table_size, float *shadow_table, int shadow_table_size)); EXTERN vpResult vpSetMaterial ANSI_ARGS((vpContext *vpc, int material, int property, int surface_side, double r, double g, double b)); EXTERN vpResult vpSetLight ANSI_ARGS((vpContext *vpc, int light_num, int property, double n0, double n1, double n2)); EXTERN vpResult vpSetDepthCueing ANSI_ARGS((vpContext *vpc, double front_factor, double density)); EXTERN int vpNormalIndex ANSI_ARGS((double nx, double ny, double nz)); EXTERN vpResult vpNormal ANSI_ARGS((int n, double *nx, double *ny, double *nz)); EXTERN vpResult vpScanlineNormals ANSI_ARGS((vpContext *vpc, int length, unsigned char *scalar_data, unsigned char *scalar_minus_y, unsigned char *scalar_plus_y, unsigned char *scalar_minus_z, unsigned char *scalar_plus_z, void *voxel_data, int scalar_field, int grad_field, int norm_field)); EXTERN vpResult vpVolumeNormals ANSI_ARGS((vpContext *vpc, unsigned char *scalar_data, int length, int scalar_field, int grad_field, int norm_field)); EXTERN vpResult vpShadeTable ANSI_ARGS((vpContext *vpc)); /* view */ EXTERN vpResult vpCurrentMatrix ANSI_ARGS((vpContext *vpc, int option)); EXTERN vpResult vpIdentityMatrix ANSI_ARGS((vpContext *vpc)); EXTERN vpResult vpSetMatrix ANSI_ARGS((vpContext *vpc, vpMatrix4 matrix)); EXTERN vpResult vpMultMatrix ANSI_ARGS((vpContext *vpc, vpMatrix4 matrix)); EXTERN vpResult vpTranslate ANSI_ARGS((vpContext *vpc, double tx, double ty, double tz)); EXTERN vpResult vpRotate ANSI_ARGS((vpContext *vpc, int axis, double degrees)); EXTERN vpResult vpScale ANSI_ARGS((vpContext *vpc, double sx, double sy, double sz)); EXTERN vpResult vpWindow ANSI_ARGS((vpContext *vpc, int type, double left, double right, double bottom, double top, double near, double far)); EXTERN vpResult vpWindowPHIGS ANSI_ARGS((vpContext *vpc, vpVector3 vrp, vpVector3 vpn, vpVector3 vup, vpVector3 prp, double viewport_umin, double viewport_umax, double viewport_vmin, double viewport_vmax, double viewport_front, double viewport_back, int projection_type)); /* images */ EXTERN vpResult vpSetImage ANSI_ARGS((vpContext *vpc, unsigned char *image, int width, int height, int bytes_per_scan, int pixel_type)); /* other options */ EXTERN vpResult vpEnable ANSI_ARGS((vpContext *vpc, int option, int value)); EXTERN vpResult vpSeti ANSI_ARGS((vpContext *vpc, int option, int value)); EXTERN vpResult vpSetd ANSI_ARGS((vpContext *vpc, int option, double value)); EXTERN vpResult vpSetCallback ANSI_ARGS((vpContext *vpc, int option, void *func)); EXTERN vpResult vpSetClientData ANSI_ARGS((vpContext *vpc, void *client_data)); EXTERN vpResult vpSetDebug ANSI_ARGS((vpContext *vpc, int flag, int value)); EXTERN vpResult vpTracePixel ANSI_ARGS((vpContext *vpc, int trace_u, int trace_v)); EXTERN vpResult vpGetTimer ANSI_ARGS((vpContext *vpc, int option, int *iptr)); EXTERN vpResult vpClearTimer ANSI_ARGS((vpContext *vpc, int option)); /* rendering */ EXTERN vpResult vpRenderClassifiedVolume ANSI_ARGS(( vpContext *vpc)); EXTERN vpResult vpRenderRawVolume ANSI_ARGS((vpContext *vpc)); EXTERN vpResult vpBruteForceRender ANSI_ARGS((vpContext *vpc)); /* retrieving state */ EXTERN vpResult vpGeti ANSI_ARGS((vpContext *vpc, int option, int *iptr)); EXTERN vpResult vpGetd ANSI_ARGS((vpContext *vpc, int option, double *dptr)); EXTERN vpResult vpGetp ANSI_ARGS((vpContext *vpc, int option, void **pptr)); EXTERN vpResult vpGetMatrix ANSI_ARGS((vpContext *vpc, int matrix_code, vpMatrix4 matrix)); EXTERN vpResult vpGetMaterial ANSI_ARGS((vpContext *vpc, int material, int property, int surface_side, double *r, double *g, double *b)); EXTERN vpResult vpGetLight ANSI_ARGS((vpContext *vpc, int light_num, int property, double *n0, double *n1, double *n2)); EXTERN vpResult vpGetImage ANSI_ARGS((vpContext *vpc, void *image, int width, int height, int scan_bytes, int pixel_type, int image_type)); EXTERN vpResult vpGetError ANSI_ARGS((vpContext *vpc)); EXTERN char * vpGetErrorString ANSI_ARGS((vpResult code)); /* linear algebra */ EXTERN void vpIdentity3 ANSI_ARGS((vpMatrix3 m)); EXTERN void vpIdentity4 ANSI_ARGS((vpMatrix4 m)); EXTERN vpResult vpNormalize3 ANSI_ARGS((vpVector3 v)); EXTERN void vpMatrixVectorMult4 ANSI_ARGS((vpVector4 v2, vpMatrix4 m, vpVector4 v1)); EXTERN void vpMatrixMult4 ANSI_ARGS((vpMatrix4 m3, vpMatrix4 m2, vpMatrix4 m1)); EXTERN void vpCrossProduct ANSI_ARGS((vpVector3 p, vpVector3 v, vpVector3 w)); EXTERN vpResult vpSolveSystem4 ANSI_ARGS((vpMatrix4 a, double **b, int m)); /* file I/O */ EXTERN vpResult vpStoreClassifiedVolume ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpLoadClassifiedVolume ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpStoreMinMaxOctree ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpLoadMinMaxOctree ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpStoreRawVolume ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpLoadRawVolume ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpStoreContext ANSI_ARGS((vpContext *vpc, int fd)); EXTERN vpResult vpLoadContext ANSI_ARGS((vpContext *vpc, int fd)); /* misc. utilities */ EXTERN vpResult vpExtract ANSI_ARGS((vpContext *vpc, int volume_type, int x0, int y0, int z0, int x1, int y1, int z1, int field, void *dst, int dst_size, int dst_xstride, int dst_ystride, int dst_zstride)); EXTERN vpResult vpRamp ANSI_ARGS((float *dst, int stride, int num_points, int *ramp_x, float *ramp_y)); EXTERN vpResult vpTranspose ANSI_ARGS((vpContext *vpc, int kaxis)); EXTERN vpResult vpSetFilter ANSI_ARGS((vpContext *vpc, int num_taps, int num_phases, float *weights)); EXTERN vpResult vpResample ANSI_ARGS((vpContext *vpc, int num_dimens, int *src_dimens, int *dst_dimens, int *src_strides, int *dst_strides, int element_type, void *in_array, void *out_array)); EXTERN vpResult vpResample2D ANSI_ARGS(( void *in_array, int in_x, int in_y, void *out_array, int out_x, int out_y, int element_type, int filter_type)); EXTERN vpResult vpResample3D ANSI_ARGS(( void *in_array, int in_x, int in_y, int in_z, void *out_array, int out_x, int out_y, int out_z, int element_type, int filter_type)); EXTERN vpResult vpBoxFilter ANSI_ARGS((int num_taps, int num_phases, float *weights, int weights_bytes)); EXTERN vpResult vpLinearFilter ANSI_ARGS((int num_taps, int num_phases, float *weights, int weights_bytes)); EXTERN vpResult vpBicubicFilter ANSI_ARGS((double b_value, double c_value, int num_taps, int num_phases, float *weights, int weights_bytes)); EXTERN vpResult vpGaussianFilter ANSI_ARGS((double sigma, int num_taps, int num_phases, float *weights, int weights_bytes)); #endif /* _VOLPACK */ volpack-1.0b3/vp_util.c0000644000265600020320000000633005701116547012015 00000000000000/* * vp_util.c * * Miscellaneous utility routines. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ #include "vp_global.h" /* * vpRamp * * Fill a float array with a ramp (a piecewise linear function). */ vpResult vpRamp(dst, stride, num_points, ramp_x, ramp_y) float *dst; /* array to store ramp into */ int stride; /* stride (in bytes) for dst */ int num_points; /* number of linear segment endpoints */ int *ramp_x; /* x coordinates of the endpoints (and indexes into dst) */ float *ramp_y; /* y coordinates of the endpoints */ { int i, x; int lastx, nextx; double lasty, nexty, dydx, y; if (num_points < 1) return(VPERROR_BAD_VALUE); for (i = 1; i < num_points; i++) if (ramp_x[i] <= ramp_x[i-1]) return(VPERROR_BAD_VALUE); dst[*ramp_x * stride/sizeof(float)] = *ramp_y; if (num_points == 1) return(VP_OK); for (i = 1; i < num_points; i++) { lastx = ramp_x[i-1]; lasty = ramp_y[i-1]; nextx = ramp_x[i]; nexty = ramp_y[i]; dydx = (double)(nexty - lasty) / (double)(nextx - lastx); for (x = lastx+1, y = lasty+dydx; x < nextx; x++, y += dydx) dst[x * stride/sizeof(float)] = y; dst[x * stride/sizeof(float)] = nexty; } return(VP_OK); } /* * VPBug * * Print an error message and exit. The argument is a printf-style format * string followed by parameters. */ #ifdef ANSI_C void VPBug(char *fmt, ...) #else void VPBug(fmt, va_alist) char *fmt; va_dcl #endif { va_list args; extern void exit ANSI_ARGS((int status)); fprintf(stderr, "BUG: "); #ifdef ANSI_C va_start(args, fmt); #else va_start(args); #endif #ifdef HAVE_VPRINTF vfprintf(stderr, fmt, args); #else #ifdef HAVE_DOPRNT _doprnt(fmt, args, stderr); #else fprintf(stderr, "unrecoverable error"); #endif #endif va_end(args); fprintf(stderr, "\n"); exit(1); } #ifdef DEBUG /* * VPDebug * * Print a debugging message. * VPDebug(debug_code, format, parameters, ...) */ #ifdef ANSI_C void VPDebug(vpContext *vpc, int debug_code, char *fmt, ...) #else void VPDebug(vpc, debug_code, fmt, va_alist) vpContext *vpc; int debug_code; char *fmt; va_dcl #endif { va_list args; if (vpc->debug_enable[debug_code]) { #ifdef ANSI_C va_start(args, fmt); #else va_start(args); #endif #ifdef HAVE_VPRINTF vfprintf(stdout, fmt, args); #else #ifdef HAVE_DOPRNT _doprnt(fmt, args, stdout); #else printf("unrecoverable error"); #endif #endif va_end(args); } } #endif /* DEBUG */ volpack-1.0b3/vp_view.c0000644000265600020320000010207405701116550012006 00000000000000/* * vp_view.c * * Routines to compute quantities derived from the view transformation. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.29 $ */ #include "vp_global.h" static int FactorAffineView ANSI_ARGS((vpContext *vpc, vpMatrix4 vm)); static int FactorPerspectiveView ANSI_ARGS((vpContext *vpc, vpMatrix4 vm)); static void ComputeAffineOpacityCorrection ANSI_ARGS((vpContext *vpc, double shear_i, double shear_j, float table[VP_OPACITY_MAX+1])); static void CheckRenderBuffers ANSI_ARGS((vpContext *vpc)); static void ComputeLightViewTransform ANSI_ARGS((vpContext *vpc,vpMatrix4 vm)); static int FactorLightView ANSI_ARGS((vpContext *vpc, vpMatrix4 vm)); static void CheckShadowBuffer ANSI_ARGS((vpContext *vpc)); /* * VPFactorView * * Factor the viewing matrix. */ vpResult VPFactorView(vpc) vpContext *vpc; { vpMatrix4 vm; int retcode; if (vpc->factored_view_ready) { CheckRenderBuffers(vpc); return(VP_OK); } /* compute the overall view transformation */ VPComputeViewTransform(vpc, vm); /* check if transformation is affine and factor it */ if (fabs(vm[3][0]) < VP_EPS && fabs(vm[3][1]) < VP_EPS && fabs(vm[3][2]) < VP_EPS && fabs(vm[3][3]-1.) < VP_EPS) { if ((retcode = FactorAffineView(vpc, vm)) != VP_OK) return(retcode); ComputeAffineOpacityCorrection(vpc, vpc->shear_i, vpc->shear_j, vpc->affine_opac_correct); } else { FactorPerspectiveView(vpc, vm); } CheckRenderBuffers(vpc); /* compute viewing transformation from the point of view of the light source (for calculating shadows) */ if ((retcode = VPCheckShadows(vpc)) != VP_OK) return(retcode); if (vpc->enable_shadows) { ComputeLightViewTransform(vpc, vm); if ((retcode = FactorLightView(vpc, vm)) != VP_OK) return(retcode); ComputeAffineOpacityCorrection(vpc, vpc->shadow_shear_i, vpc->shadow_shear_j, vpc->shadow_opac_correct); CheckShadowBuffer(vpc); } return(VP_OK); } /* * VPComputeViewTransform * * Compute the overall view transformation. */ void VPComputeViewTransform(vpc, vm) vpContext *vpc; vpMatrix4 vm; /* storage for result */ { vpMatrix4 prematrix; /* transform volume to unit cube */ vpMatrix4 viewportm; /* viewport matrix */ vpMatrix4 tmp1m, tmp2m, tmp3m; /* temporary matrices */ int maxdim; double scale; /* compute prematrix */ vpIdentity4(prematrix); maxdim = vpc->xlen; if (vpc->ylen > maxdim) maxdim = vpc->ylen; if (vpc->zlen > maxdim) maxdim = vpc->zlen; scale = 1. / (double)maxdim; prematrix[0][0] = scale; prematrix[1][1] = scale; prematrix[2][2] = scale; prematrix[0][3] = -vpc->xlen * scale * 0.5; prematrix[1][3] = -vpc->ylen * scale * 0.5; prematrix[2][3] = -vpc->zlen * scale * 0.5; /* compute the viewport matrix */ vpIdentity4(viewportm); viewportm[0][0] = 0.5 * vpc->image_width; viewportm[0][3] = 0.5 * vpc->image_width; viewportm[1][1] = 0.5 * vpc->image_height; viewportm[1][3] = 0.5 * vpc->image_height; viewportm[2][2] = -0.5; /* minus sign: switch to left-handed coords. */ viewportm[2][3] = 0.5; /* compute the view matrix */ vpMatrixMult4(tmp1m, vpc->transforms[VP_MODEL], prematrix); vpMatrixMult4(tmp2m, vpc->transforms[VP_VIEW], tmp1m); vpMatrixMult4(tmp3m, vpc->transforms[VP_PROJECT], tmp2m); vpMatrixMult4(vm, viewportm, tmp3m); } /* * FactorAffineView * * Factor an affine viewing matrix into two parts: * 1) A shear and translation which map object coordinates into * intermediate image coordinates. * 2) An affine warp which transforms intermediate image coordinates to * image coordinates. * Return value is a result code. */ static int FactorAffineView(vpc, vm) vpContext *vpc; vpMatrix4 vm; { vpMatrix4 p; /* permutation matrix */ vpMatrix4 pvm; /* permutation of the viewing matrix */ int icount, jcount, kcount; /* dimensions of volume in rotated space */ vpVector4 xobj, yobj, zobj; vpVector4 xim, yim, zim; double x, y, z, denom; Debug((vpc, VPDEBUG_VIEW, "FactorAffineView\n")); vpc->affine_view = 1; /* * Transform the unit x, y and z object-coordinate vectors into image * space and see which one is most aligned with the view direction * (which is the z-axis in image coordinates). */ vpSetVector4(xobj, 1., 0., 0., 0.); vpSetVector4(yobj, 0., 1., 0., 0.); vpSetVector4(zobj, 0., 0., 1., 0.); vpMatrixVectorMult4(xim, vm, xobj); vpMatrixVectorMult4(yim, vm, yobj); vpMatrixVectorMult4(zim, vm, zobj); x = fabs((vpNormalize3(xim) == VPERROR_SINGULAR) ? 0. : xim[2]); y = fabs((vpNormalize3(yim) == VPERROR_SINGULAR) ? 0. : yim[2]); z = fabs((vpNormalize3(zim) == VPERROR_SINGULAR) ? 0. : zim[2]); if (x >= y) { if (x >= z) { vpc->best_view_axis = VP_X_AXIS; } else { vpc->best_view_axis = VP_Z_AXIS; } } else { if (y >= z) { vpc->best_view_axis = VP_Y_AXIS; } else { vpc->best_view_axis = VP_Z_AXIS; } } switch (vpc->axis_override) { case VP_X_AXIS: if (x < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpc->best_view_axis = VP_X_AXIS; break; case VP_Y_AXIS: if (y < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpc->best_view_axis = VP_Y_AXIS; break; case VP_Z_AXIS: if (z < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpc->best_view_axis = VP_Z_AXIS; break; default: break; } /* permute the rows of the viewing matrix so that the third axis is most parallel to the viewing direction */ bzero(p, sizeof(vpMatrix4)); switch (vpc->best_view_axis) { case VP_X_AXIS: p[0][2] = 1.; p[1][0] = 1.; p[2][1] = 1.; p[3][3] = 1.; icount = vpc->ylen; jcount = vpc->zlen; kcount = vpc->xlen; break; case VP_Y_AXIS: p[0][1] = 1.; p[1][2] = 1.; p[2][0] = 1.; p[3][3] = 1.; icount = vpc->zlen; jcount = vpc->xlen; kcount = vpc->ylen; break; case VP_Z_AXIS: p[0][0] = 1.; p[1][1] = 1.; p[2][2] = 1.; p[3][3] = 1.; icount = vpc->xlen; jcount = vpc->ylen; kcount = vpc->zlen; break; } vpMatrixMult4(pvm, vm, p); /* compute the shear coefficients */ denom = pvm[0][0]*pvm[1][1] - pvm[0][1]*pvm[1][0]; if (fabs(denom) < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpc->shear_i = (pvm[0][2]*pvm[1][1] - pvm[0][1]*pvm[1][2]) / denom; vpc->shear_j = (pvm[0][0]*pvm[1][2] - pvm[1][0]*pvm[0][2]) / denom; if (pvm[2][0]*vpc->shear_i + pvm[2][1]*vpc->shear_j - pvm[2][2] > 0) vpc->reverse_slice_order = 0; else vpc->reverse_slice_order = 1; /* compute the intermediate image size */ vpc->intermediate_width = icount + 1 + (int)ceil((kcount-1)* fabs(vpc->shear_i)); vpc->intermediate_height = jcount + 1 + (int)ceil((kcount-1)* fabs(vpc->shear_j)); /* compute the translation coefficients */ if (vpc->shear_i >= 0.) vpc->trans_i = 1.; else vpc->trans_i = 1. - vpc->shear_i * (kcount - 1); if (vpc->shear_j >= 0.) vpc->trans_j = 1.; else vpc->trans_j = 1. - vpc->shear_j * (kcount - 1); /* compute the depth coefficients */ vpc->depth_di = pvm[2][0]; vpc->depth_dj = pvm[2][1]; vpc->depth_dk = pvm[2][2]; vpc->depth_000 = pvm[2][3]; /* compute the mapping from compositing space to image space */ vpc->warp_2d[0][0] = pvm[0][0]; vpc->warp_2d[0][1] = pvm[0][1]; vpc->warp_2d[0][2] = pvm[0][3] - pvm[0][0]*vpc->trans_i - pvm[0][1]*vpc->trans_j; vpc->warp_2d[1][0] = pvm[1][0]; vpc->warp_2d[1][1] = pvm[1][1]; vpc->warp_2d[1][2] = pvm[1][3] - pvm[1][0]*vpc->trans_i - pvm[1][1]*vpc->trans_j; vpc->warp_2d[2][0] = 0.; vpc->warp_2d[2][1] = 0.; vpc->warp_2d[2][2] = 1.; vpc->factored_view_ready = 1; Debug((vpc, VPDEBUG_VIEW, " best_view_axis: %c%c\n", vpc->reverse_slice_order ? '-' : '+', vpc->best_view_axis == VP_X_AXIS ? 'x' : (vpc->best_view_axis == VP_Y_AXIS ? 'y' : 'z'))); Debug((vpc, VPDEBUG_VIEW, " shear factors: %g %g\n", vpc->shear_i, vpc->shear_j)); Debug((vpc, VPDEBUG_VIEW, " translation: %g %g\n", vpc->trans_i, vpc->trans_j)); Debug((vpc, VPDEBUG_VIEW, " depth: d000: %g\n", vpc->depth_000)); Debug((vpc, VPDEBUG_VIEW, " di: %g\n", vpc->depth_di)); Debug((vpc, VPDEBUG_VIEW, " dj: %g\n", vpc->depth_dj)); Debug((vpc, VPDEBUG_VIEW, " dk: %g\n", vpc->depth_dk)); Debug((vpc, VPDEBUG_VIEW, " intermediate image size: %d %d\n", vpc->intermediate_width, vpc->intermediate_height)); return(VP_OK); } /* * FactorPerspectiveView * * Factor a perspective view matrix into two parts: * 1) A shear, translation and scale which map object coordinates into * intermediate image coordinates. * 2) A perspective warp which transforms intermediate image coordinates to * image coordinates. */ static int FactorPerspectiveView(vpc, vm) vpContext *vpc; vpMatrix4 vm; { vpc->affine_view = 0; return(VP_OK); #ifdef notdef Matrix4 p; /* permutation matrix */ Matrix4 pvm; /* permutation of the viewing matrix */ Matrix4 m2d; /* final warp */ Matrix4 t; double alpha1, alpha2, alpha3, alpha4; int icount, jcount, kcount; /* dimensions of volume in rotated space */ Vector4 xobj, yobj, zobj; double x, y, z, denom; double i0, j0, i1, j1; double imin, imax, jmin, jmax; Debug((DEBUG_VIEW, "FactorPerspectiveView\n")); rbuf->perspective_proj = 1; /* * Transform the unit x, y and z object-coordinate vectors into image * space and see which one is most aligned with the view direction * (which is the z-axis in image coordinates). */ xobj[0] = 1.; xobj[1] = 0.; xobj[2] = 0.; xobj[3] = 0.; yobj[0] = 0.; yobj[1] = 1.; yobj[2] = 0.; yobj[3] = 0.; zobj[0] = 0.; zobj[1] = 0.; zobj[2] = 1.; zobj[3] = 0.; TransformVector4(xobj, view->view_matrix); TransformVector4(yobj, view->view_matrix); TransformVector4(zobj, view->view_matrix); /* normalize each vector to unit length and compare the absolute value of the z component; note that the w component drops out */ xobj[2] = fabs(xobj[2]); yobj[2] = fabs(yobj[2]); zobj[2] = fabs(zobj[2]); x = (xobj[2] < EPS) ? 0. : (xobj[2] / sqrt(xobj[0]*xobj[0] + xobj[1]*xobj[1] + xobj[2]*xobj[2])); y = (yobj[2] < EPS) ? 0. : (yobj[2] / sqrt(yobj[0]*yobj[0] + yobj[1]*yobj[1] + yobj[2]*yobj[2])); z = (zobj[2] < EPS) ? 0. : (zobj[2] / sqrt(zobj[0]*zobj[0] + zobj[1]*zobj[1] + zobj[2]*zobj[2])); if (x >= y) { if (x >= z) { rbuf->best_view_axis = VP_XAXIS; } else { rbuf->best_view_axis = VP_ZAXIS; } } else { if (y >= z) { rbuf->best_view_axis = VP_YAXIS; } else { rbuf->best_view_axis = VP_ZAXIS; } } /* permute the rows of the viewing matrix so that the third axis is most parallel to the viewing direction */ bzero(p, sizeof(Matrix4)); switch (rbuf->best_view_axis) { case VP_XAXIS: p[0][2] = 1.; p[1][0] = 1.; p[2][1] = 1.; p[3][3] = 1.; icount = ylen; jcount = zlen; kcount = xlen; break; case VP_YAXIS: p[0][1] = 1.; p[1][2] = 1.; p[2][0] = 1.; p[3][3] = 1.; icount = zlen; jcount = xlen; kcount = ylen; break; case VP_ZAXIS: p[0][0] = 1.; p[1][1] = 1.; p[2][2] = 1.; p[3][3] = 1.; icount = xlen; jcount = ylen; kcount = zlen; break; default: VPBug("wierd value for best_view_axis in FactorPerspectiveView\n"); } MatrixMult4(pvm, view->view_matrix, p); /* compute the magic alpha coefficients */ alpha1 = pvm[3][1] * (pvm[0][3]*pvm[1][2] - pvm[0][2]*pvm[1][3]) + pvm[3][2] * (pvm[0][1]*pvm[1][3] - pvm[0][3]*pvm[1][1]) + pvm[3][3] * (pvm[0][2]*pvm[1][1] - pvm[0][1]*pvm[1][2]); alpha2 = pvm[3][0] * (pvm[0][2]*pvm[1][3] - pvm[0][3]*pvm[1][2]) + pvm[3][2] * (pvm[0][3]*pvm[1][0] - pvm[0][0]*pvm[1][3]) + pvm[3][3] * (pvm[0][0]*pvm[1][2] - pvm[0][2]*pvm[1][0]); alpha3 = pvm[3][0] * (pvm[0][1]*pvm[1][2] - pvm[0][2]*pvm[1][1]) + pvm[3][1] * (pvm[0][2]*pvm[1][0] - pvm[0][0]*pvm[1][2]) + pvm[3][2] * (pvm[0][0]*pvm[1][1] - pvm[0][1]*pvm[1][0]); alpha4 = pvm[3][0] * (pvm[0][1]*pvm[1][3] - pvm[0][3]*pvm[1][1]) + pvm[3][1] * (pvm[0][3]*pvm[1][0] - pvm[0][0]*pvm[1][3]) + pvm[3][3] * (pvm[0][0]*pvm[1][1] - pvm[0][1]*pvm[1][0]); /* determine the order of the slices */ if (pvm[2][2] - (pvm[2][0]*alpha1 + pvm[2][1]*alpha2)/(alpha3+alpha4) > 0) rbuf->reverse_k_order = 1; else rbuf->reverse_k_order = 0; /* compute the scale coefficients */ rbuf->w_factor = alpha3 / alpha4; if (rbuf->reverse_k_order) rbuf->normalize_scale = 1. + rbuf->w_factor*(kcount-1); else rbuf->normalize_scale = 1.; /* compute the bounding box of the image in compositing space */ denom = 1. / (alpha4 + alpha3*(kcount-1)); i0 = rbuf->normalize_scale*alpha1*(kcount-1) * denom; j0 = rbuf->normalize_scale*alpha2*(kcount-1) * denom; i1 = rbuf->normalize_scale*(alpha4*icount + alpha1*(kcount-1)) * denom; j1 = rbuf->normalize_scale*(alpha4*jcount + alpha2*(kcount-1)) * denom; imin = MIN(0, i0); imax = MAX(rbuf->normalize_scale*icount, i1); jmin = MIN(0, j0); jmax = MAX(rbuf->normalize_scale*jcount, j1); /* compute the size of the intermediate image */ rbuf->intermediate_width = (int)ceil(imax - imin); rbuf->intermediate_height = (int)ceil(jmax - jmin); /* compute the translation and shear coefficients */ rbuf->shear_i = (rbuf->normalize_scale*alpha1 - alpha3*imin) / alpha4; rbuf->shear_j = (rbuf->normalize_scale*alpha2 - alpha3*jmin) / alpha4; rbuf->trans_i = -imin; rbuf->trans_j = -jmin; /* compute the depth coefficients */ rbuf->depth_di = pvm[2][0]; rbuf->depth_dj = pvm[2][1]; rbuf->depth_dk = pvm[2][2]; rbuf->depth_000 = pvm[2][3]; rbuf->w_di = pvm[3][0]; rbuf->w_dj = pvm[3][1]; rbuf->w_dk = pvm[3][2]; rbuf->w_000 = pvm[3][3]; /* compute the mapping from compositing space to image space */ Identity4(t); t[0][0] = 1. / rbuf->normalize_scale; t[1][1] = 1. / rbuf->normalize_scale; t[0][2] = -alpha1 / alpha4; t[1][2] = -alpha2 / alpha4; t[3][2] = -alpha3 / alpha4; t[0][3] = imin / rbuf->normalize_scale; t[1][3] = jmin / rbuf->normalize_scale; MatrixMult4(m2d, pvm, t); rbuf->warp_2d[0][0] = m2d[0][0]; rbuf->warp_2d[1][0] = m2d[1][0]; rbuf->warp_2d[2][0] = m2d[3][0]; rbuf->warp_2d[0][1] = m2d[0][1]; rbuf->warp_2d[1][1] = m2d[1][1]; rbuf->warp_2d[2][1] = m2d[3][1]; rbuf->warp_2d[0][2] = m2d[0][3]; rbuf->warp_2d[1][2] = m2d[1][3]; rbuf->warp_2d[2][2] = m2d[3][3]; #endif /* notdef */ } /* * ComputeAffineOpacityCorrection * * Precompute a lookup table which corrects opacity for an affine viewing * transformation. (Opacity correction accounts for variations in the * apparent thickness of a voxel depending on viewpoint.) */ static void ComputeAffineOpacityCorrection(vpc, shear_i, shear_j, table) vpContext *vpc; double shear_i; double shear_j; float table[VP_OPACITY_MAX+1]; { float voxel_size; int i; Debug((vpc, VPDEBUG_OPCCORRECT, "Computing affine opacity correction table.\n")); voxel_size = sqrt(1 + shear_i*shear_i + shear_j*shear_j); for (i = 0; i <= VP_OPACITY_MAX; i++) { #ifdef NO_OPAC_CORRECT table[i] = (double)i / (double)VP_OPACITY_MAX; #else table[i] = 1.-pow(1.-(double)i/(double)VP_OPACITY_MAX,voxel_size); #endif } } /* * CheckRenderBuffers * * Resize the buffers used during rendering, if necessary. */ static void CheckRenderBuffers(vpc) vpContext *vpc; { int new_max_width, new_max_height, new_max_scan; int resize = 0; /* determine if resizing is necessary */ if (vpc->intermediate_width > vpc->max_intermediate_width) { new_max_width = MAX(vpc->intermediate_width, vpc->int_image_width_hint); resize = 1; } else { new_max_width = MAX(vpc->max_intermediate_width, vpc->int_image_width_hint); } if (vpc->intermediate_height > vpc->max_intermediate_height) { new_max_height = MAX(vpc->intermediate_height, vpc->int_image_height_hint); resize = 1; } else { new_max_height = MAX(vpc->max_intermediate_height, vpc->int_image_height_hint); } new_max_scan = vpc->xlen; if (vpc->ylen > new_max_scan) new_max_scan = vpc->ylen; if (vpc->zlen > new_max_scan) new_max_scan = vpc->zlen; if (new_max_scan > vpc->max_scan_length) resize = 1; if (vpc->color_channels != vpc->intermediate_color_channels) resize = 1; /* resize */ if (resize) VPResizeRenderBuffers(vpc, new_max_width, new_max_height,new_max_scan); } /* * VPResizeRenderBuffers * * Resize the rendering buffers. */ void VPResizeRenderBuffers(vpc, max_width, max_height, max_scan) vpContext *vpc; int max_width; /* new width of the intermediate image */ int max_height; /* new height of the intermediate image */ int max_scan; /* new max. scanline length */ { /* free old buffers */ if (vpc->int_image.gray_intim != NULL) { Debug((vpc, VPDEBUG_RBUF, "Freeing old RenderBuffer(%d,%d,%d,%d)\n", vpc->max_intermediate_width, vpc->max_intermediate_height, vpc->max_scan_length, vpc->intermediate_color_channels)); Dealloc(vpc, vpc->int_image.gray_intim); } /* allocate new buffers */ Debug((vpc, VPDEBUG_RBUF, "Allocating RenderBuffer(%d,%d,%d,%d)\n", max_width, max_height, max_scan, vpc->color_channels)); vpc->max_intermediate_width = max_width; vpc->max_intermediate_height = max_height; vpc->max_scan_length = max_scan; vpc->intermediate_color_channels = vpc->color_channels; if (max_width > 0) { if (vpc->color_channels == 1) { Alloc(vpc, vpc->int_image.gray_intim, GrayIntPixel *, max_width * max_height * sizeof(GrayIntPixel), "int_image"); } else { Alloc(vpc, vpc->int_image.rgb_intim, RGBIntPixel *, max_width * max_height * sizeof(RGBIntPixel), "int_image"); } } else { vpc->int_image.gray_intim = NULL; } } /* * VPResizeDepthCueTable * * Resize the depth cueing table. */ void VPResizeDepthCueTable(vpc, entries, copy) vpContext *vpc; int entries; /* new number of table entries */ int copy; /* if true, copy old entries */ { float *new_dc_table; Debug((vpc, VPDEBUG_DEPTHCUE, "resizing dctable to %d entries (%s)\n", entries, copy ? "copy" : "nocopy")); if (entries == 0) { if (vpc->dc_table != NULL) { Dealloc(vpc, vpc->dc_table); vpc->dc_table = NULL; } vpc->dc_table_len = 0; } else { Alloc(vpc, new_dc_table, float *, entries * sizeof(float), "dc_table"); if (vpc->dc_table != NULL) { if (copy && vpc->dc_table_len > 0) { bcopy(vpc->dc_table, new_dc_table, MIN(vpc->dc_table_len, entries) * sizeof(float)); } Dealloc(vpc, vpc->dc_table); } vpc->dc_table = new_dc_table; vpc->dc_table_len = entries; } } /* * VPComputeDepthCueTable * * Compute entries in the depth cueing lookup table. */ void VPComputeDepthCueTable(vpc, first, last) vpContext *vpc; int first; /* first entry to compute */ int last; /* last entry to compute */ { int c; double delta_depth, front_factor, density; Debug((vpc, VPDEBUG_DEPTHCUE, "computing dctable entries %d to %d\n", first, last)); delta_depth = vpc->dc_quantization; front_factor = vpc->dc_front_factor; density = vpc->dc_density; for (c = first; c <= last; c++) vpc->dc_table[c] = front_factor * exp(-density*(1.0 - c*delta_depth)); } /* * VPSliceDepthCueRatio * * Return the ratio of the depth cueing factor for two adjacent slices * for an affine view. A constant factor is applied to all voxels in a * slice, and then a fixup is applied to the pixels of the intermediate * image. This produces the correct answer without having to compute * the depth of each voxel. */ float VPSliceDepthCueRatio(vpc) vpContext *vpc; { float delta_depth; /* change in depth between adjacent slices */ float slice_dc_ratio; /* return value */ if (!vpc->dc_enable) return(1.); delta_depth = vpc->depth_dk - vpc->depth_di*vpc->shear_i - vpc->depth_dj*vpc->shear_j; if (vpc->reverse_slice_order) delta_depth = -delta_depth; /* slice_dc_ratio = exp(-vpc->dc_density * (-delta_depth)) */ slice_dc_ratio = exp(vpc->dc_density * delta_depth); Debug((vpc, VPDEBUG_DEPTHCUE, "slice_dc_ratio = %f\n", slice_dc_ratio)); return(slice_dc_ratio); } /* * VPDepthCueIntImage * * Perform depth cueing on the intermediate image. */ void VPDepthCueIntImage(vpc, slicenum) vpContext *vpc; int slicenum; /* slice number corresponding to location of int. image */ { float pixel_depth_quant; /* depth of current pixel in image (multiplied by depth_quant) */ int pixel_depth_int; /* pixel_depth truncated to an integer */ float left_depth; /* depth of pixel on left edge of current scanline in image */ float left_depth_quant; /* left_depth * depth_quant */ float *dc_table; /* depth cueing table */ float depth_di, depth_dj; /* change in depth for a unit change in each rotated object space coordinate */ float depth_quant; /* number of quantization levels for depth */ float depth_di_quant; /* depth_di * depth_quant */ float depth_dj_quant; /* depth_dj * depth_quant */ float max_depth; /* maximum (closest) depth in image */ int max_depth_int; /* maximum quantized depth */ int i, j; /* intermediate image coordinates */ float slice_u, slice_v; /* sheared object space coordinates */ GrayIntPixel *gray_intim; /* image data (grayscale) */ RGBIntPixel *rgb_intim; /* image data (RGB) */ int width, height; /* size of intermediate image */ int c; #ifdef DEBUG float pix_depth; #endif Debug((vpc, VPDEBUG_DEPTHCUE, "depth cueing intermediate image\n")); /* check the size of the depth cueing table and enlarge if necessary */ width = vpc->intermediate_width; height = vpc->intermediate_height; depth_quant = 1.0 / vpc->dc_quantization; depth_di = vpc->depth_di; depth_dj = vpc->depth_dj; slice_u = vpc->shear_i * slicenum + vpc->trans_i; slice_v = vpc->shear_j * slicenum + vpc->trans_j; left_depth = vpc->depth_000 + vpc->depth_dk*slicenum - slice_u*depth_di - slice_v*depth_dj; if (depth_di > 0) { if (depth_dj > 0) { max_depth = left_depth + depth_di*width + depth_dj*height; } else { max_depth = left_depth + depth_di*width; } } else { if (depth_dj > 0) { max_depth = left_depth + depth_dj*height; } else { max_depth = left_depth; } } max_depth_int = max_depth * depth_quant; if (max_depth_int >= vpc->dc_table_len) { c = vpc->dc_table_len; VPResizeDepthCueTable(vpc, max_depth_int+1, 1); VPComputeDepthCueTable(vpc, c, vpc->dc_table_len-1); } dc_table = vpc->dc_table; depth_di_quant = depth_di * depth_quant; depth_dj_quant = depth_dj * depth_quant; left_depth_quant = left_depth * depth_quant; #ifdef DEBUG Debug((vpc, VPDEBUG_DEPTHCUE, "depth cueing at image corners:\n")); pix_depth = left_depth + 0*depth_di + 0*depth_dj; pixel_depth_int = (int)(pix_depth * depth_quant); if (pixel_depth_int < 0) pixel_depth_int = 0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d: depth = %10.6f, factor = %10.6f, table[%d] = %10.6f\n", 0, 0, pix_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - pix_depth)), pixel_depth_int, dc_table[pixel_depth_int])); pix_depth = left_depth + width*depth_di + 0*depth_dj; pixel_depth_int = (int)(pix_depth * depth_quant); if (pixel_depth_int < 0) pixel_depth_int = 0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d: depth = %10.6f, factor = %10.6f, table[%d] = %10.6f\n", width, 0, pix_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - pix_depth)), pixel_depth_int, dc_table[pixel_depth_int])); pix_depth = left_depth + width*depth_di + height*depth_dj; pixel_depth_int = (int)(pix_depth * depth_quant); if (pixel_depth_int < 0) pixel_depth_int = 0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d: depth = %10.6f, factor = %10.6f, table[%d] = %10.6f\n", width, height, pix_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - pix_depth)), pixel_depth_int, dc_table[pixel_depth_int])); pix_depth = left_depth + 0*depth_di + height*depth_dj; pixel_depth_int = (int)(pix_depth * depth_quant); if (pixel_depth_int < 0) pixel_depth_int = 0; Debug((vpc, VPDEBUG_DEPTHCUE, " %3d %3d: depth = %10.6f, factor = %10.6f, table[%d] = %10.6f\n", 0, height, pix_depth, vpc->dc_front_factor * exp(-vpc->dc_density * (1.0 - pix_depth)), pixel_depth_int, dc_table[pixel_depth_int])); #endif /* DEBUG */ /* foreach pixel, compute depth and scale color by dc factor */ if (vpc->color_channels == 1) { gray_intim = vpc->int_image.gray_intim; for (j = height; j > 0; j--) { pixel_depth_quant = left_depth_quant; left_depth_quant += depth_dj_quant; for (i = width; i > 0; i--) { pixel_depth_int = pixel_depth_quant; pixel_depth_quant += depth_di_quant; if (pixel_depth_int < 0) pixel_depth_int = 0; if (pixel_depth_int >= vpc->dc_table_len) { VPBug("VPDepthCueIntImage: depth too large (%d >= %d)", pixel_depth_int, vpc->dc_table_len); } gray_intim->clrflt *= dc_table[pixel_depth_int]; gray_intim++; } /* for i */ } /* for j */ } else { rgb_intim = vpc->int_image.rgb_intim; for (j = height; j > 0; j--) { pixel_depth_quant = left_depth_quant; left_depth_quant += depth_dj_quant; for (i = width; i > 0; i--) { pixel_depth_int = pixel_depth_quant; pixel_depth_quant += depth_di_quant; if (pixel_depth_int < 0) pixel_depth_int = 0; if (pixel_depth_int >= vpc->dc_table_len) { VPBug("VPDepthCueIntImage: depth too large (%d >= %d)", pixel_depth_int, vpc->dc_table_len); } rgb_intim->rclrflt *= dc_table[pixel_depth_int]; rgb_intim->gclrflt *= dc_table[pixel_depth_int]; rgb_intim->bclrflt *= dc_table[pixel_depth_int]; rgb_intim++; } /* for i */ } /* for j */ } } /* * ComputeLightViewTransform * * Compute the view transformation from the point of view of the one * light source that produces shadows. */ static void ComputeLightViewTransform(vpc, vm) vpContext *vpc; vpMatrix4 vm; /* storage for result */ { vpMatrix4 prematrix; /* transform volume to unit cube */ vpMatrix4 viewportm; /* viewport matrix */ vpVector3 vpn; /* view plane normal */ vpVector3 vup; /* view up vector */ vpVector3 tmp1v, tmp2v; /* temporary vectors */ vpMatrix4 view; /* transform world coordinates to eye coordinates, with view direction equal to light vector */ vpMatrix4 tmp1m, tmp2m; /* temporary matrices */ double lx, ly, lz; /* components of light vector */ int light_index; int maxdim; double scale; /* check for errors */ ASSERT(vpc->shadow_light_num >= VP_LIGHT0 && vpc->shadow_light_num <= VP_LIGHT5); ASSERT(vpc->light_enable[vpc->shadow_light_num - VP_LIGHT0]); /* compute prematrix */ vpIdentity4(prematrix); maxdim = vpc->xlen; if (vpc->ylen > maxdim) maxdim = vpc->ylen; if (vpc->zlen > maxdim) maxdim = vpc->zlen; scale = 1. / (double)maxdim; prematrix[0][0] = scale; prematrix[1][1] = scale; prematrix[2][2] = scale; prematrix[0][3] = -vpc->xlen * scale * 0.5; prematrix[1][3] = -vpc->ylen * scale * 0.5; prematrix[2][3] = -vpc->zlen * scale * 0.5; /* compute the world-to-eye coordinate transformation */ light_index = vpc->shadow_light_num - VP_LIGHT0; lx = vpc->light_vector[light_index][0]; ly = vpc->light_vector[light_index][1]; lz = vpc->light_vector[light_index][2]; vpSetVector3(vpn, lx, ly, lz); if (fabs(lx) < fabs(ly)) { if (fabs(lx) < fabs(lz)) { vpSetVector3(vup, 1.0, 0.0, 0.0); } else { vpSetVector3(vup, 0.0, 0.0, 1.0); } } else { if (fabs(ly) < fabs(lz)) { vpSetVector3(vup, 0.0, 1.0, 0.0); } else { vpSetVector3(vup, 0.0, 0.0, 1.0); } } vpCrossProduct(tmp1v, vup, vpn); vpCrossProduct(tmp2v, vpn, tmp1v); vpIdentity4(view); view[0][0] = tmp1v[0]; view[0][1] = tmp1v[1]; view[0][2] = tmp1v[2]; view[1][0] = tmp2v[0]; view[1][1] = tmp2v[1]; view[1][2] = tmp2v[2]; view[2][0] = vpn[0]; view[2][1] = vpn[1]; view[2][2] = vpn[2]; /* initialize matrix to switch to left-handed coords. */ vpIdentity4(viewportm); viewportm[2][2] = -1.0; /* compute the view matrix */ vpMatrixMult4(tmp1m, vpc->transforms[VP_MODEL], prematrix); vpMatrixMult4(tmp2m, view, tmp1m); vpMatrixMult4(vm, viewportm, tmp2m); } /* * FactorLightView * * Factor an affine viewing matrix that specifies the view seen by * a light source. Most of the parameters of the factorization are * taken from the factorization of the normal viewing matrix. */ static int FactorLightView(vpc, vm) vpContext *vpc; vpMatrix4 vm; { vpMatrix4 p; /* permutation matrix */ vpMatrix4 pvm; /* permutation of the viewing matrix */ int icount, jcount, kcount; /* dimensions of volume in rotated space */ double denom; Debug((vpc, VPDEBUG_SHADOW, "FactorLightView\n")); /* permute the rows of the viewing matrix according to the best viewing axis for the viewing direction */ bzero(p, sizeof(vpMatrix4)); switch (vpc->best_view_axis) { case VP_X_AXIS: p[0][2] = 1.; p[1][0] = 1.; p[2][1] = 1.; p[3][3] = 1.; icount = vpc->ylen; jcount = vpc->zlen; kcount = vpc->xlen; break; case VP_Y_AXIS: p[0][1] = 1.; p[1][2] = 1.; p[2][0] = 1.; p[3][3] = 1.; icount = vpc->zlen; jcount = vpc->xlen; kcount = vpc->ylen; break; case VP_Z_AXIS: p[0][0] = 1.; p[1][1] = 1.; p[2][2] = 1.; p[3][3] = 1.; icount = vpc->xlen; jcount = vpc->ylen; kcount = vpc->zlen; break; } vpMatrixMult4(pvm, vm, p); /* compute the shear coefficients */ denom = pvm[0][0]*pvm[1][1] - pvm[0][1]*pvm[1][0]; if (fabs(denom) < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpc->shadow_shear_i = (pvm[0][2]*pvm[1][1] - pvm[0][1]*pvm[1][2]) / denom; vpc->shadow_shear_j = (pvm[0][0]*pvm[1][2] - pvm[1][0]*pvm[0][2]) / denom; /* check that light direction is compatible with compositing direction */ if (pvm[2][0]*vpc->shadow_shear_i + pvm[2][1]*vpc->shadow_shear_j - pvm[2][2] > 0) { if (vpc->reverse_slice_order != 0) return(VPERROR_BAD_SHADOW); } else { if (vpc->reverse_slice_order != 1) return(VPERROR_BAD_SHADOW); } /* compute the shadow buffer image size */ vpc->shadow_width = (int)ceil((kcount-1)*fabs(vpc->shadow_shear_i)) + icount + 1; vpc->shadow_height = (int)ceil((kcount-1)*fabs(vpc->shadow_shear_j)) + jcount + 1; /* compute the translation coefficients */ if (vpc->shadow_shear_i >= 0.) vpc->shadow_trans_i = 1.; else vpc->shadow_trans_i = 1. - vpc->shadow_shear_i * (kcount - 1); if (vpc->shadow_shear_j >= 0.) vpc->shadow_trans_j = 1.; else vpc->shadow_trans_j = 1. - vpc->shadow_shear_j * (kcount - 1); Debug((vpc, VPDEBUG_SHADOW, " shadow shear factors: %g %g\n", vpc->shadow_shear_i, vpc->shadow_shear_j)); Debug((vpc, VPDEBUG_SHADOW, " shadow translation: %g %g\n", vpc->shadow_trans_i, vpc->shadow_trans_j)); return(VP_OK); } /* * CheckShadowBuffer * * Resize the shadow buffer, if necessary. */ static void CheckShadowBuffer(vpc) vpContext *vpc; { int new_max_width, new_max_height; int resize = 0; /* determine if resizing is necessary */ if (vpc->shadow_width > vpc->max_shadow_width) { new_max_width = MAX(vpc->shadow_width, vpc->shadow_width_hint); resize = 1; } else { new_max_width = MAX(vpc->max_shadow_width, vpc->shadow_width_hint); } if (vpc->shadow_height > vpc->max_shadow_height) { new_max_height = MAX(vpc->shadow_height, vpc->shadow_height_hint); resize = 1; } else { new_max_height = MAX(vpc->max_shadow_height, vpc->shadow_height_hint); } /* resize */ if (resize) VPResizeShadowBuffer(vpc, new_max_width, new_max_height); } /* * VPResizeShadowBuffer * * Resize the shadow buffer. */ void VPResizeShadowBuffer(vpc, max_width, max_height) vpContext *vpc; int max_width; /* new width of the intermediate image */ int max_height; /* new height of the intermediate image */ { /* free old buffers */ if (vpc->shadow_buffer != NULL) { Dealloc(vpc, vpc->shadow_buffer); } /* allocate new buffers */ vpc->max_shadow_width = max_width; vpc->max_shadow_height = max_height; if (max_width > 0) { Alloc(vpc, vpc->shadow_buffer, GrayIntPixel *, max_width * max_height * sizeof(GrayIntPixel), "shadow_buffer"); } else { vpc->shadow_buffer = NULL; } } volpack-1.0b3/examples/0000777000265600020320000000000010727044642012067 500000000000000volpack-1.0b3/examples/makevolume.c0000644000265600020320000000672705701333242014321 00000000000000/* * makevolume.c * * Create a volume from the brainsmall data set. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/31 19:53:03 $ * $Revision: 1.5 $ */ #include "volume.h" main() { vpContext *vpc; /* rendering context */ unsigned char *density; /* buffer for density data */ unsigned density_size;/* size of density data */ char *volume; /* volume data */ unsigned volume_size;/* size of volume */ int density_fd; /* file descriptor for density file (input) */ int volume_fd; /* file descriptor for volume (output) */ void *malloc(); /* create a context */ vpc = vpCreateContext(); /* describe the layout of the volume */ vpSetVolumeSize(vpc, BRAIN_XLEN, BRAIN_YLEN, BRAIN_ZLEN); vpSetVoxelSize(vpc, BYTES_PER_VOXEL, VOXEL_FIELDS, SHADE_FIELDS, CLSFY_FIELDS); vpSetVoxelField(vpc, NORMAL_FIELD, NORMAL_SIZE, NORMAL_OFFSET, NORMAL_MAX); vpSetVoxelField(vpc, DENSITY_FIELD, DENSITY_SIZE, DENSITY_OFFSET, DENSITY_MAX); vpSetVoxelField(vpc, GRADIENT_FIELD, GRADIENT_SIZE, GRADIENT_OFFSET, GRADIENT_MAX); /* allocate space for the raw data and the volume */ density_size = BRAIN_XLEN * BRAIN_YLEN * BRAIN_ZLEN; density = malloc(density_size); volume_size = BRAIN_XLEN * BRAIN_YLEN * BRAIN_ZLEN * BYTES_PER_VOXEL; volume = malloc(volume_size); if (density == NULL || volume == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } vpSetRawVoxels(vpc, volume, volume_size, BYTES_PER_VOXEL, BRAIN_XLEN * BYTES_PER_VOXEL, BRAIN_YLEN * BRAIN_XLEN * BYTES_PER_VOXEL); /* load the raw data */ if ((density_fd = open(BRAIN_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", BRAIN_FILE); exit(1); } if (lseek(density_fd, BRAIN_HEADER, 0) < 0) { perror("seek"); fprintf(stderr, "could not read data from %s\n", BRAIN_FILE); exit(1); } if (read(density_fd, density, density_size) != density_size) { perror("read"); fprintf(stderr, "could not read data from %s\n", BRAIN_FILE); exit(1); } close(density_fd); /* compute surface normals (for shading) and gradient magnitudes (for classification) */ if (vpVolumeNormals(vpc, density, density_size, DENSITY_FIELD, GRADIENT_FIELD, NORMAL_FIELD) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } /* store volume in a file */ if ((volume_fd = creat(VOLUME_FILE, 0644)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", VOLUME_FILE); exit(1); } if (vpStoreRawVolume(vpc, volume_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } close(volume_fd); return(0); } volpack-1.0b3/examples/README0000644000265600020320000001061605674453326012677 00000000000000README File for VolPack Example Programs ---------------------------------------- The programs in this directory demonstrate how to use the basic features of the three rendering algorithms in the VolPack library. See the vprender program for a more complete application. For installation instructions, see the README file in the toplevel directory of the VolPack distribution. For a quick test of your installation, run test.csh. The output files are brainsmall1.ppm, brainsmall2.ppm, brainsmall3.ppm and brainsmall4.ppm. They should all be identical to check.ppm. The input data (brainsmall.den) is an MRI scan of a human head, derived from public domain data provided by SoftLab at UNC Chapel Hill. The original MRI scan has been scaled down to 128x128x84 voxels using a Gaussian filter. Three programs are provided to convert the volume data into data structures used by VolPack, and the fourth program does the rendering. It produces an image in PPM format. The first program, "makevolume", takes no arguments and creates an unclassified volume (brainsmall.rv) from the raw volume data (brainsmall.den). The unclassified volume includes all of the data in brainsmall.den as well as precomputed information for shading and classification. The second program, "makeoctree", takes no arguments and creates a min-max octree (brainsmall.oct) from the unclassified volume (brainsmall.rv). The octree can be used by the rendering program to accelerate rendering, but it is optional. The third program, "classifyvolume", creates a classified volume (brainsmall.cv). A classified volume includes an opacity with each voxel along with information for shading. It is stored in a format which is optimized for fast rendering and which (usually) requires less storage than the unclassified volume. There are three ways to call classifyvolume: 1) classifyvolume With no arguments, classifyvolume creates brainsmall.cv from the unclassified volume (brainsmall.rv). 2) classifyvolume -octree With the -octree flag, classifyvolume creates brainsmall.cv from the unclassified volume (brainsmall.rv) and the min-max octree (brainsmall.oct). This method is much faster than method 1. 3) classifyvolume -rawdata With the -rawdata flag, classifyvolume creates brainsmall.cv directly from the raw volume data (brainsmall.den). The fourth program, "rendervolume", creates an image (brainsmall.ppm) in PPM format. There are three ways to call rendervolume: 1) rendervolume With no arguments, rendervolume creates brainsmall.ppm from the unclassified volume (brainsmall.rv) using the slowest rendering algorithm. 2) rendervolume -octree With the -octree flag, rendervolume creates brainsmall.ppm from the unclassified volume (brainsmall.rv) and the min-max octree (brainsmall.oct) using the fast classification and rendering algorithm. This method is much faster than method 1. 3) rendervolume -classified With the -classified flag, rendervolume creates brainsmall.ppm from the classified volume (brainsmall.cv) using the fastest rendering algorithm. This method is even faster than method 2. The rendervolume program can also take an optional numerical argument which is the number of frames to render. In this case the program will produce output files of the form "brainsmall_{number}.ppm" where {number} is a frame number. The frames form a movie with a 5 degree rotation about the vertical axis between each frame. For example: rendervolume -classified 30 produces a 30 frame movie from headsmall.cv. The file "check.ppm" is a PPM image file which should be identical to the first frame of output from rendervolume. The PPM image format is recognized by many image viewers and conversion programs. Experiment with the programs to see the relative speed of the three algorithms on your machine! See the VolPack User's Guide for the intended uses of each algorithm. File Sizes: raw data (brainsmall.den): 1376318 bytes (1.3 Mb) unclassified volume (brainsmall.rv): 5505104 bytes (5.3 Mb) min-max octree (brainsmall.oct): 136748 bytes (0.1 Mb) classified volume (brainsmall.cv): 3215848 bytes (3.0 Mb) image (brainsmall.ppm): 65551 bytes Finally, the program "scalevolume" demonstrates how to use the volume resampling utilities to change the resolution of a volume. It can be used to upsample or downsample volumes in .den format. See the comment at the beginning of scalevolume.c for usage information. volpack-1.0b3/examples/Makefile.in0000644000265600020320000003656210727044632014063 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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@ # Makefile.am for volpack/examples # Andreas Tille and Daniel Leidert # GPL VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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@ noinst_PROGRAMS = classifyvolume$(EXEEXT) makeoctree$(EXEEXT) \ makevolume$(EXEEXT) rendervolume$(EXEEXT) scalevolume$(EXEEXT) subdir = examples DIST_COMMON = README $(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 = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) am_classifyvolume_OBJECTS = classifyvolume.$(OBJEXT) classifyvolume_OBJECTS = $(am_classifyvolume_OBJECTS) classifyvolume_LDADD = $(LDADD) classifyvolume_DEPENDENCIES = $(top_builddir)/libvolpack.la am_makeoctree_OBJECTS = makeoctree.$(OBJEXT) makeoctree_OBJECTS = $(am_makeoctree_OBJECTS) makeoctree_LDADD = $(LDADD) makeoctree_DEPENDENCIES = $(top_builddir)/libvolpack.la am_makevolume_OBJECTS = makevolume.$(OBJEXT) makevolume_OBJECTS = $(am_makevolume_OBJECTS) makevolume_LDADD = $(LDADD) makevolume_DEPENDENCIES = $(top_builddir)/libvolpack.la am_rendervolume_OBJECTS = rendervolume.$(OBJEXT) rendervolume_OBJECTS = $(am_rendervolume_OBJECTS) rendervolume_LDADD = $(LDADD) rendervolume_DEPENDENCIES = $(top_builddir)/libvolpack.la am_scalevolume_OBJECTS = scalevolume.$(OBJEXT) denfile.$(OBJEXT) scalevolume_OBJECTS = $(am_scalevolume_OBJECTS) scalevolume_LDADD = $(LDADD) scalevolume_DEPENDENCIES = $(top_builddir)/libvolpack.la DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ 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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(classifyvolume_SOURCES) $(makeoctree_SOURCES) \ $(makevolume_SOURCES) $(rendervolume_SOURCES) \ $(scalevolume_SOURCES) DIST_SOURCES = $(classifyvolume_SOURCES) $(makeoctree_SOURCES) \ $(makevolume_SOURCES) $(rendervolume_SOURCES) \ $(scalevolume_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ 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@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBVOLPACK_VERSION_INFO = @LIBVOLPACK_VERSION_INFO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ MFLAGS = @MFLAGS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OFLAGS = @OFLAGS@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = brainsmall.den check.ppm README test.csh CLEANFILES = $(EXAMPLEOUTPUT) AM_CPPFLAGS = -I$(top_srcdir) LDADD = $(top_builddir)/libvolpack.la @LIBS@ classifyvolume_SOURCES = classifyvolume.c volume.h makeoctree_SOURCES = makeoctree.c volume.h makevolume_SOURCES = makevolume.c volume.h rendervolume_SOURCES = rendervolume.c volume.h scalevolume_SOURCES = scalevolume.c denfile.c # In case there are some remainings from the example tests: EXAMPLEOUTPUT = brainsmall.cv brainsmall.oct brainsmall*.ppm brainsmall.rv 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) --gnu examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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 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 classifyvolume$(EXEEXT): $(classifyvolume_OBJECTS) $(classifyvolume_DEPENDENCIES) @rm -f classifyvolume$(EXEEXT) $(LINK) $(classifyvolume_OBJECTS) $(classifyvolume_LDADD) $(LIBS) makeoctree$(EXEEXT): $(makeoctree_OBJECTS) $(makeoctree_DEPENDENCIES) @rm -f makeoctree$(EXEEXT) $(LINK) $(makeoctree_OBJECTS) $(makeoctree_LDADD) $(LIBS) makevolume$(EXEEXT): $(makevolume_OBJECTS) $(makevolume_DEPENDENCIES) @rm -f makevolume$(EXEEXT) $(LINK) $(makevolume_OBJECTS) $(makevolume_LDADD) $(LIBS) rendervolume$(EXEEXT): $(rendervolume_OBJECTS) $(rendervolume_DEPENDENCIES) @rm -f rendervolume$(EXEEXT) $(LINK) $(rendervolume_OBJECTS) $(rendervolume_LDADD) $(LIBS) scalevolume$(EXEEXT): $(scalevolume_OBJECTS) $(scalevolume_DEPENDENCIES) @rm -f scalevolume$(EXEEXT) $(LINK) $(scalevolume_OBJECTS) $(scalevolume_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classifyvolume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/denfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makeoctree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makevolume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rendervolume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scalevolume.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 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: 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am 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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean 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-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ 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 # 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: volpack-1.0b3/examples/makeoctree.c0000644000265600020320000000464005701333241014262 00000000000000/* * makeoctree.c * * Create a min-max octree for the brainsmall data set. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/31 19:53:03 $ * $Revision: 1.5 $ */ #include "volume.h" main() { vpContext *vpc; /* rendering context */ int volume_fd; /* file descriptor for volume data (input) */ int octree_fd; /* file descriptor for octree (output) */ /* create a context */ vpc = vpCreateContext(); /* load the volume */ if ((volume_fd = open(VOLUME_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", VOLUME_FILE); exit(1); } if (vpLoadRawVolume(vpc, volume_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the volume from file %s\n", VOLUME_FILE); exit(1); } close(volume_fd); /* compute the octree */ vpSetClassifierTable(vpc, DENSITY_PARAM, DENSITY_FIELD, NULL, 0); vpSetClassifierTable(vpc, GRADIENT_PARAM, GRADIENT_FIELD, NULL, 0); vpMinMaxOctreeThreshold(vpc, DENSITY_PARAM, OCTREE_DENSITY_THRESH); vpMinMaxOctreeThreshold(vpc, GRADIENT_PARAM, OCTREE_GRADIENT_THRESH); if (vpCreateMinMaxOctree(vpc, 0, OCTREE_BASE_NODE_SIZE) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } /* store octree in a file */ if ((octree_fd = creat(OCTREE_FILE, 0644)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", OCTREE_FILE); exit(1); } if (vpStoreMinMaxOctree(vpc, octree_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } close(octree_fd); return(0); } volpack-1.0b3/examples/denfile.c0000644000265600020320000002427405674103365013571 00000000000000/* * denfile.c * * Routines to read and write .den files. * See the file dencopy.c for sample usage. */ #include #ifndef MIN #define MIN(a, b) ((a) > (b) ? (b) : (a)) #endif /* constants for .den magic number (map_version field) */ #define MAP_CUR_VERSION 1 /* current version */ #define MAP_CUR_VERSION_SWAB 0x0100 /* byte-swapped current version */ #define MAX_READ_SIZE 8192 /* maximum # of bytes per read(2) call */ /* * read_den * * Load density data from a file. Return an array of bytes on success, or * NULL on failure. The array dimensions are stored in xptr, yptr and zptr. */ unsigned char * read_den(filename, xptr, yptr, zptr) char *filename; /* name of file containing data */ int *xptr, *yptr, *zptr;/* volume dimensions (output parameters) */ { int fd; /* file descriptor */ unsigned char *data; /* data array */ int swapbytes; /* true if header must be byte-swapped */ short map_version; /* Version of this .den file */ short orig_min[3]; /* Dimensions of original data file */ short orig_max[3]; short orig_len[3]; short extr_min[3]; /* Extracted portion of original file */ short extr_max[3]; /* (mins and maxes will be subset of */ short extr_len[3]; /* orig and lengths will be <= orig) */ short map_min[3]; /* Dimensions of this map */ short map_max[3]; /* (mins will be 0 in this program and */ short map_len[3]; /* lens may be != extr if warps > 0) */ short map_warps; /* Number of warps since extraction */ /* (0 = none) */ int map_length; /* Total number of densities in map */ /* (= product of lens) */ /* open the file */ if ((fd = open(filename, 0)) < 0) { fprintf(stderr, "cannot open file %s\n", filename); return(NULL); } /* read the magic number */ if (!read_shorts(fd, &map_version, 1, 0)) { fprintf(stderr, "read failed on file %s (empty file?)\n", filename); return(NULL); } if (map_version == MAP_CUR_VERSION) { swapbytes = 0; } else if (map_version == MAP_CUR_VERSION_SWAB) { swapbytes = 1; } else { fprintf(stderr, "file %s is not a density file\n", filename); return(NULL); } /* read the volume size information */ if (!read_shorts(fd, orig_min, 3, swapbytes) || !read_shorts(fd, orig_max, 3, swapbytes) || !read_shorts(fd, orig_len, 3, swapbytes) || !read_shorts(fd, extr_min, 3, swapbytes) || !read_shorts(fd, extr_max, 3, swapbytes) || !read_shorts(fd, extr_len, 3, swapbytes) || !read_shorts(fd, map_min, 3, swapbytes) || !read_shorts(fd, map_max, 3, swapbytes) || !read_shorts(fd, map_len, 3, swapbytes) || !read_shorts(fd, &map_warps, 1, swapbytes) || !read_words(fd, &map_length, 1, swapbytes)) { fprintf(stderr, "read failed on file %s (truncated file?)\n",filename); return(NULL); } if (map_length != map_len[0]*map_len[1]*map_len[2]) { fprintf(stderr, "density file %s has an inconsistent header\n", filename); return(NULL); } /* allocate array for data */ data = (unsigned char *)malloc(map_length); if (data == NULL) { fprintf(stderr, "out of memory\n"); return(NULL); } /* copy the data from the file */ if (!read_bytes(fd, (char *)data, map_length)) { fprintf(stderr, "read failed on file %s\n", filename); close(fd); free(data); return(NULL); } /* finish up */ close(fd); *xptr = map_len[0]; *yptr = map_len[1]; *zptr = map_len[2]; return(data); } /* * write_den * * Write an array of volume data to a .den file. Return 1 on success, * 0 on failure. */ int write_den(filename, data, xlen, ylen, zlen) char *filename; /* name of file to create */ unsigned char *data; /* volume data */ int xlen, ylen, zlen; /* volume dimensions */ { int fd; /* file descriptor */ short map_version; /* Version of this .den file */ short orig_min[3]; /* Dimensions of original data file */ short orig_max[3]; short orig_len[3]; short extr_min[3]; /* Extracted portion of original file */ short extr_max[3]; /* (mins and maxes will be subset of */ short extr_len[3]; /* orig and lengths will be <= orig) */ short map_min[3]; /* Dimensions of this map */ short map_max[3]; /* (mins will be 0 in this program and */ short map_len[3]; /* lens may be != extr if warps > 0) */ short map_warps; /* Number of warps since extraction */ /* (0 = none) */ int map_length; /* Total number of densities in map */ /* (= product of lens) */ /* open file */ if ((fd = creat(filename, 0644)) < 0) { fprintf(stderr, "cannot open file %s\n", filename); return(0); } /* write the header */ map_version = MAP_CUR_VERSION; orig_min[0] = 0; orig_min[1] = 0; orig_min[2] = 0; orig_max[0] = xlen - 1; orig_max[1] = ylen - 1; orig_max[2] = zlen - 1; orig_len[0] = xlen; orig_len[1] = ylen; orig_len[2] = zlen; extr_min[0] = 0; extr_min[1] = 0; extr_min[2] = 0; extr_max[0] = xlen - 1; extr_max[1] = ylen - 1; extr_max[2] = zlen - 1; extr_len[0] = xlen; extr_len[1] = ylen; extr_len[2] = zlen; map_min[0] = 0; map_min[1] = 0; map_min[2] = 0; map_max[0] = xlen - 1; map_max[1] = ylen - 1; map_max[2] = zlen - 1; map_len[0] = xlen; map_len[1] = ylen; map_len[2] = zlen; map_warps = 0; map_length = xlen * ylen * zlen; if (!write_bytes(fd, (char *)&map_version, sizeof(short)) || !write_bytes(fd, (char *)orig_min, 3*sizeof(short)) || !write_bytes(fd, (char *)orig_max, 3*sizeof(short)) || !write_bytes(fd, (char *)orig_len, 3*sizeof(short)) || !write_bytes(fd, (char *)extr_min, 3*sizeof(short)) || !write_bytes(fd, (char *)extr_max, 3*sizeof(short)) || !write_bytes(fd, (char *)extr_len, 3*sizeof(short)) || !write_bytes(fd, (char *)map_min, 3*sizeof(short)) || !write_bytes(fd, (char *)map_max, 3*sizeof(short)) || !write_bytes(fd, (char *)map_len, 3*sizeof(short)) || !write_bytes(fd, (char *)&map_warps, sizeof(short)) || !write_bytes(fd, (char *)&map_length, sizeof(unsigned)) || !write_bytes(fd, (char *)data, map_length)) { close(fd); fprintf(stderr, "cannot write to file %s\n", filename); return(0); } close(fd); return(1); } /* * read_bytes * * Read data from a file. The data is assumed to be a sequence of bytes, * so no byte-swapping is needed. If the read request is a large one then * it is broken up into chunks so the user can interrupt. * * Return value is 1 if the read was succesful or 0 if there was a read * error or the full number of bytes could not be read. */ read_bytes(fd, buf, bytecount) int fd; /* file descriptor to read from */ char *buf; /* memory in which to store data */ int bytecount; /* number of bytes to read */ { int n; while (bytecount > 0) { n = MIN(bytecount, MAX_READ_SIZE); if (read(fd, buf, n) != n) return(0); buf += n; bytecount -= n; } return(1); } /* * read_shorts * * Read data from a file. The data is assumed to be a sequence of shorts, * and byte-swapping is performed if requested. If the read request is a * large one then it is broken up into chunks so the user can interrupt. * * Return value is 1 if the read was succesful or 0 if there was a read * error or the full number of shorts could not be read. */ read_shorts(fd, sbuf, shortcount, swap) int fd; /* file descriptor to read from */ short *sbuf; /* memory in which to store data */ int shortcount; /* number of shorts to read */ int swap; /* if nonzero then swap bytes */ { int n, c; int bytecount = shortcount * 2; char tmp0, tmp1, tmp2, tmp3; char *buf = (char *)sbuf; while (bytecount > 0) { n = MIN(bytecount, MAX_READ_SIZE); if (read(fd, buf, n) != n) return(0); bytecount -= n; if (swap) { c = n / 8; n -= c * 8; for (; c > 0; c--) { tmp0 = buf[0]; buf[0] = buf[1]; buf[1] = tmp0; tmp1 = buf[2]; buf[2] = buf[3]; buf[3] = tmp1; tmp2 = buf[4]; buf[4] = buf[5]; buf[5] = tmp2; tmp3 = buf[6]; buf[6] = buf[7]; buf[7] = tmp3; buf += 8; } for (; n > 0; n -= 2) { tmp0 = buf[0]; buf[0] = buf[1]; buf[1] = tmp0; buf += 2; } } else { buf += n; } } return(1); } /* * read_words * * Read data from a file. The data is assumed to be a sequence of words, * and byte-swapping is performed if requested. If the read request is a * large one then it is broken up into chunks so the user can interrupt. * * Return value is 1 if the read was succesful or 0 if there was a read * error or the full number of words could not be read. */ read_words(fd, wbuf, wordcount, swap) int fd; /* file descriptor to read from */ int *wbuf; /* memory in which to store data */ int wordcount; /* number of words to read */ int swap; /* if nonzero then swap bytes */ { int n, c; int bytecount = wordcount * 4; char tmp0, tmp1, tmp2, tmp3; char *buf = (char *)wbuf; while (bytecount > 0) { n = MIN(bytecount, MAX_READ_SIZE); if (read(fd, buf, n) != n) return(0); bytecount -= n; if (swap) { c = n / 8; n -= c * 8; for (; c > 0; c--) { tmp0 = buf[0]; buf[0] = buf[3]; buf[3] = tmp0; tmp1 = buf[1]; buf[1] = buf[2]; buf[2] = tmp1; tmp2 = buf[4]; buf[4] = buf[7]; buf[7] = tmp2; tmp3 = buf[5]; buf[5] = buf[6]; buf[6] = tmp3; buf += 8; } for (; n > 0; n -= 4) { tmp0 = buf[0]; buf[0] = buf[3]; buf[3] = tmp0; tmp1 = buf[1]; buf[1] = buf[2]; buf[2] = tmp1; buf += 4; } } else { buf += n; } } return(1); } /* * write_bytes * * Write data to a file. If the write request is a large one then * it is broken up into chunks so the user can interrupt. * * Return value is 1 if the write was succesful or 0 if there was an error. */ write_bytes(fd, buf, bytecount) int fd; /* file descriptor to write to */ char *buf; /* memory containing data */ int bytecount; /* number of bytes to write */ { int n; while (bytecount > 0) { n = MIN(bytecount, MAX_READ_SIZE); if (write(fd, buf, n) != n) return(0); buf += n; bytecount -= n; } return(1); } volpack-1.0b3/examples/check.ppm0000644000265600020320000020001705701371201013564 00000000000000P5 256 256 255     !    !&((&),//.,'$ !#  $)+0643146988985-# )/5652+%!  !#'-022468:=??A?>?>;54479<>>;74/+%  #,.23013442455:<;=@FFEEDC=:98;@EC@><950++&*8@>?@==<;639<;:749AGFEIKLEA><>@AAADD@=;<83/(!  4@GIKLLJF=76@DA?>@CCBBELNOMJGEB??@@AABCGMB<:2+$ !)=ELT]d_YQ?:?JNNNPRMKLLJIKOUSNJGEEC>=>BEFEBAB;4/+%!    %,..,/AB><=>94...*"  (.49:53;EMV[^WMBCN[^dqy‡|vujaVQLINQPOQSQOFCCCA=@>5==?DFGD>601431.21.( '3;@;;@FJLMOTQNMC;DJP[^YONV`b\RKLLQSYbqttocUZ_b_]ZZUJFEDBA=BIKA946861,895.)(&5AHF><@FJKLPYSLHCAHNT[YSOS\^WF?BMPOLSa|~€vhfda``bd`VSOKGB:>BFB>::=:5043125:+  "+5?CCB==AD?9531-27;3-( %-8AEA>?<<>DJS[\PIFGIJDITUX[gopib\_dj`VQOMUfsƒ‚|lb^`ejliga\UNICAAFA;AED;;@81*27=;83' $,38EKLFB;;<>EOWWRLJKMOQQ\iloq~}xojintwj_[WTOMOlzzg`^chigfe`]YXWQKGG>8==93:2/5=>;43/& *26;FUXY\NA6=954343031)$   "-8:;DP]_]ZUOHN[rww|{qia\]\Zclpx{th`_XSNIF@DIDDHIOWSQMMO[dmuqiXKDEHJIB7=?A95220131++)#&06=@FQZ[YZVDAJS\eb_]XQLVhyniaVKEENSUXX]fh`[Z`\VQPOBDLNTZUUVXYSPR[iu~~vfXLGEDRK=@?:9961.1330/,*' $07=AEIMKGHD99DTY_edcbZSNSZd]UOIGGMV\][KHQZZUU[hbYTTROWceikddgkh]WW[kx}~ueUKFERQNG>399;51.146310,%  !358;?BC?99A@:>HZ]agfc`YSMLJQTVWUSZbhgec^\TSNJTcrkaZWU\jsqszz|}|tf\WXivzxj^UNJPTVMD966?:503588872)  )5667=@BACGIFACN\`gnha\WRORX\`deb_cegjlltlWSRRct|tg`_dr{}x}ˆŒ‹…ƒ|o`WVfqrttsmgaYRONOQK@89>=<:87;963-($  $1668;?ACIOQMJJNUZclqdYTPOR[ddhmonlfehpsophZYYZnxulffkv†ˆ„‰–š–‹ˆ~iZUbihjlmnqog[MJKNMOFA<@@>:971++)(*& -257>BKRX\[XRONNQ[ksqf]ZRPZ`cd_Z]_``cgfhmoprwtihgit}vtqfeflomVH>AFRct‡x|…‘—𛑇ˆˆ‡‘‹~dVORYg]Q;87:8630/7?B5/*%)2*);CFACHPW]abaUQS[gq€vdXSPT_bdd]Y]ahnpnedkmoqvre^Z^mqijmnqttttaQB:=NZmˆŒŠ}‡”œ—Œƒzu‹Š‚i[PPYnhX@<:;974117>C91*$,6.#  %-7GKJCDIT\afgcXX`r€ƒ{l^TKOXbdde_[[coyzvhfkmnqtsmgfjjc\iv…ƒww|l[J<@PWgƒ€…Œ—›š‘†|tovy~m_TR]xl[D@>??>9766=B<70-05/)" -5ANQODEIT\dmld[^httmng^XPGQ[bbcfb`\gw}~kgkklmuxzsopjip~Œ›œx{„vfUCDPS_qz}€„‹€ypiflske^Wc€m\IHIIIF>;847;@>7565/*$)/=HPPLEEHR\fqnf\anog_caZSLGS]beigjm_l€~mikihkv}}tnmnt€‰‘™‘‚v‹~lZJIMOU]gnpnqyxtoz‚}voeddiih^ahb[MPQPNJA<7115@A?@>50+&% )35?FJJIFFIS]gpnh\ajfb_daWPLJU]cmqhqubju|~{nlkgip|€{topuz}‚‡†{yƒŠwg[ROPRUY^]VYainuzƒ‰…vhb^flrg^T\[SUUSQMFB<411;AHH@92,('$% !19=65:>><2.)$!4DQZMHOSSNKNapvnf]VTSNYihhhe_T`lx}{nsqcep‡Œ‡znhv„‚wnu‚‰|lfwwxŽ‚vty}~}n_R_dfpx€‚œ—”š˜Œ€o^cvum[VXdhoyropi]J>8@@>=<9JJ=5,% /9KTYMJPUWQLQhtwndZUSSPV_fjkkdW_j{€€wsk_dr‹Ž†ummŒ•‚to}ˆ‹‚{|soursŠŒ‰‘Œ†wfPWax€…“‰„’–©¢”˜ˆlZ`q{t_XYddflotvk^K?8@CED?8OVP>/'#   &3BMSUMLSZ[ROWovtg]XRRURSYfmsrjZ^fx€ƒwnd[dwŠ…xnoxˆ“–€vx‚…~wv|z{sm€‹•šžŸž˜ŒnQS^{€Š£”†‰“¡¨ š£ŽfX`s}xi][d__eijkcZM?6@GOJB9TZUA3)&!%,8HMOMKOX`_SQXptm[VWSUWQRXfpyvl_Z]n~†yod^m‚‚wiisƒŒ‡|z„{x{ˆˆ†‚siv…•¦¬«« “‡ubV[z~ƒ‘€z}¢¢ž››`Zey{q`Y[WX`abb\UH:2>LVOE=HKKA8---)$&....& $"!&% .5?JLJEKSZ^\WSXqogXX\[[ZQRXgryskdXXh{†…wgcv‡{qkm{Žˆ|z|}{}|‰ŠŠ„sen~žž ž›‹|r\[ib]\anrŠŸŸ›“jZ^jw~wbVTRU^abYTOD:6=GSOIA?BHB=:<<865950.*).-+,(" %5>EJIGFPX[[[\WXed`Y\`de`WV[jtxspl^Zfx…Œxgfutnnu€†…vz}…’‡|††thlswz~ˆ•›ž‹~j^TKGFT`k„™–‰sgbels~zldXTU\b`TQMFDF;98300//1/+'$## %5@CEGBCJT\cdfeqw]VSU]glie[[bw„‹~n_`j|ŒxeXU^grƒ–‘…yw|†—£­©¨¯•„…†…’mZTamwŠ—¥¦™†|xuqeeb^acccd`[VY_hpplh`]YX]]ZUSSUWWUSSUSNMNNLIGDA<;985320/0.+(&%" +7@BCDFIIS]ioqjnh[TQT^jlic^akƒ”zlmtƒš‰ob^acdn’‡„ƒŠ˜¡ª²§¢šŽŽ—‰“”‰j]Yakv{ƒ––Љ†„zjkoutl\\_]XRQWdchkgddabkg`ZXWWVUUUTUSPPOMIGFD@<;;:863211/,)(&" &08=>>>KOIS]ix€vgWYUU_jqqjaaem|„‰rkz†–£“~fbflgbht…ŠŽ“—¤ªŸž—€‹˜¡˜‘Œƒvga_hnmrx~„…ƒ‰”‡wjpx~|wea`[UQQYcmrojikilsme_][WUUUTRTTRQNKKKFC@=<<;865431/-*(&"  .379;<=KNKS\h†ubWZZ]mtz{sidfksy€pq—¦¡‹sbdhkgccgq€‰–”†£¨””™ ¦¡˜‡}tmihtqgnnknqz„žˆvgkrx‚lgg]XXZ_cuxtqqtru{rkhaWRSVUSQTTROLINMEB@>>=<9665420.*('#" 4579=?BJMNU]fx|k]WZ[_nyƒ†~offjlpxrx‰¤©”zhehjlhdhnt~†—Œz“™š‹‡£¤£¤œ‘‡xsv|„„…ufWX`nv€…xbfmqvumoqa]djmmtvyxxxsrtstteUQSTSRSTSRPNMOKBA@??>=:765521/+)'$#!5679?CDMRUY^cpqc\ZZZ^o~Žlefjfk{z…žª¢ƒkcossrkeotw}‚…€wr~¡“–¥£ ž”ŒŒŒ‘—ž—šŸ~iURU`dmufikhgfqx{tx~~wuy}~}unknstnaYUTQQSTUUVUUSOIAA@>??>;8666210,)'%#! 48;?FHGPV[^acea\\\]^bo‚–•‚kegpho‡…’ª¢rjo€}xrpvxy|}{pnv†–§¨¬¦™’Ž‘¢¥««¡œ ¡‹tWMO[do|wolnr{…Š„„†‹ŽŽŠ€u|‚…€sifnplc^[WTRSUUVWXXURMHBBA>?@?=:776321-*'&$! "2:AFLJEMV_bcb\XZ^bddgp„—™‰qdhxip…†Ž’†tak|ˆ}{}€||~‚€ts«§š‰ŒŽƒˆ–§§¦±£‰¦ ŒqSQW_hr€~ƒ¥°«’Œ“’‰u€…††reaomia^[VTSVVWXYYWSPLGBCBAA@?><987752.+(&$! $1;DLNJBJUbed[TRX`egjotƒ‘wbcphmx…Š‚wmhyŒœ}~„‹†…†‰‰ƒvy‡–¡©–€r…†’Ÿ©¥¢¶Ÿ…˜œš‚hO[k{‰“™ž“•¢¼¸¨”“™š•„|y‚‡Œ†}qiiomia]ZVTTWXYZ[ZURPLGCCCCBBA?<;98963/,(&$!'1;FRRMCKUbgeVPPX_dgowx€‰—Ž{_\ggkr}€ƒvmq‡™¥‘~Š“ŽŽ‘Š|x€¥¦|vy}œ¤¤Ÿ ´¤Ž‘‘}uz†“¥¯±®³¯— ³É»¤™›ž™’Š~zƒ‡‹ƒzrprolh`\XVUVWXZ[ZXTRQMHDDDDEEC@><;:9631-)'$ )2:FTZTFLUbhdWQOX^egnty|Œ|ccnjlrsy€{ˆ–¡¬”~~ˆ••–—™‹u|†ŠŸ¨ ˆz||†— £š˜Ÿ«›ˆqp|Ѝ¨®½»¸·Â¿œª»Ã¯¢¥£˜‡„††„„Š€yssqokf_ZWVTSUWZ[ZWTSTNJFEDDEECA?=<;9631.+(%  -4:FTc_JKTdhdXPP\digkpz{|‰„wlntnpty{x…•Ÿ ¤‹uq‚—›Ÿ¡—‚m… §œ‹‰Ž—¢¡˜Œˆˆ‰ƒyM^‚£¹¶¼ÍžÁƼ¥²¼·¢™ª©Ÿ”Œ‡’Œ„ƒ|uspmiea\WUSQTWZ\ZWUUUOKIGECDDCBA?><:621/,)&"# %069CQomNKR`ecUNP`ilint{||‚}sjhmsyy|o}‰––•—oi{’¢ªª‘xjˆ‰z“›šœœ“——…{yvsx~~| ¯ÀÉÀÃÎÄÃ˵¯º¼ª¢§±©™ŒŒ”’Œƒ~|~xslgeed]WUSRSVY\[WVUSOLLIFDDDDCCB?<:642/-*'#$'278?LlhTLMWbcVOO]ejmsx|„†~qa^fz„„‚wdjwˆ€tnfu‹¦­§‰xt…‚tˆ“’—š™—Žzst~~~މ®·±ÁËÌÅÆÊÄÅÏÀ¸¼Á¹£²³£‘‘–—’Š}}‚‚|ricdda\YWTSSVX[ZXVTROMLIFEEEEDCB?<97620.+'$# *396:CW[[NMQ^b_RMYagnv~~…Š~n^]h…’’„s^co…‚xfhmer‡Ÿ£šxyzp‡‡•–••Š‰ŽŠ‹¤©­Á¾³ËÔÏÉÆ¿»¿Ê¿¼ÇöŸ«·°œˆ–š•ƒ~„wmfeec]\ZXVTUVWYYWTSRPOLIFEEEFEDA?<97531/+(%#  ,6<35=MW_XSLYacRLTZbmz‚}„‹Œj\\h‡•š‰u]_hzys]ckfq‚–”‰{swsk‡€€‚’¡¤¡¡¥¦­ÁÌ×ÓĹÏÓÍÍÆ²µ¼Ã»¼ÈÀ²¤²º¬›—šš’ˆ€‚ƒ‚zogegfd_][ZXVUUVXWTRQRRPLHFDEFFEC@=:875321.+'$ !/9?67;98764342.*&" #2;;DIKVbqha_YUSV^jkkuwy†ycVWcsyU\emkiedfikn~ymmkly˜À¸¸¾º»ÄÐ×ÖÔÎÄÒÝÙÚÙÆÉÑÉËÕËÆÌÉ¿¶ÄÈ¿º»½±¤¢©ª”І’‘‰~rv{€vleca^ZXVTSRRRVVUUSRPNLLKHFC@><<<;7779741.,(%#+08?=<=<=;9766653/,+(&%*.5<;<=B>6J]njjkcXJIIKT_krz‹„sYVan{‡ƒqOZfpme[TQaglrney”²¤³ØÏÌÏËËÏËÌÛÒÊ×ÓÊØÚÓÍËÉÅÄÃÀÇׯÁʹ»¼»³¥£²¬œŒˆŒŽŒˆ‚}z„†~oe_^]_^\[ZYSPOSUVVSOMLKKIDB@=<::87654332.++(&&!*-4;;;<=6,H\kmoofZHHKPV]dlx‹‡z^YanyoOZepg\VRZu~‘‹}“®Ä¦¯×ÒÒÖÑÏÑÉÈÙÌÅÞÑÅ×ÔËÏÏÌÈûÀÉÕÈÅÏ»°¾¾¶¡ ª±¤‘ŠŒŠ…‚†ti`\\^a_]ZYWRPPSUVTQMKKKJGB@?=;9754310121-++(&$ ,/59;<;502K\hnpme[NORV[^agp„†€d]`q|€€pOYbicbaft”“¥’ ³Ä¢¬ÔÑÏÏÍÍÒÆÄ×ÌÊÝÒÈÔÍÅÒÒÎÍǼÃËÓÊÉÆ±­Ã¿¯– ©¦–‡’’‹†„ˆ‰…wjc_]`bc`\ZWURPQSTUROKIIIGD?>><953210..010,+,(%#-159==9-,9MZcikhc]UZbkje`bi}‚lc^u€†wRUXY`ilu„ž¡¡±­¦©´Á§±ÐÌÉÇÈÊÎÅÆÕÑÒÜÑÍÔÐÍÕÔÏÒɾÇÌËÎ̸©®Å·¥£§¤™‰„“•ƒ„„yofcabeec^[XVTQPQRRSPLIHGGC@===96200/../11/,,,(%"-368?>7,1BOW]ehfb_^ht~vnhffw}~sh_w…”‚VRUZgpu€«¬§±°­©°¼®µÉÅÃÁÂÄÇÅÈÏÑÔËÊÒÖÕÔÖÓÒÌÅÃÌÍÄÎÆ«¬¸Ä¬›®©›Œ‰’›—Œ}€”|ofbbbbcb_\YWUSQONOPPMJGFEC>;;<;730...-.//.-,,+(%" ,369@=6-6JQUYcggb_biqzzxskcqxzsjaxЇpVZahqx|†•¨¤¨¯´©¯»±´½¼¼¼¿ÄÈÇÆÃÎÔ½ÈÖÔÕÙÒÒÖÇÄÉÅÀÅɼž°¼¶£¡²¥~ˆ™š’†ˆš™‹wlfabbba_]YVUSRPNLMNNJGDDB?;9::950--,,+,-,+*++)'%$)16:@=52>RSSV`ef^Z^dkw~zl_jrwskcmmhZPVahkpv}‰—£œ– «´ª¯»³²³µ¶¶ÂËÌÊÆ¿ËÏÂÎÚÑÕÛÏÏÒÆÈѹ´ÇÁ´­¹¸ž›¥²„z†•“Š~ˆ–‘†vmga`__^][WTRRQOMKLLKGDBA>;:99751-++*))*+*)(('&&%$'17;A<58EWUTS[af[XY`jz„‰n]elrqld^UOMU`eghmt|ˆ“›”˜¦³§«·³°«®°²ÅÎÌÌËÂÈËÅÑÛÐÓÖÍÌÍÄÇÊ·¹Í¶¬¼À±™©©xvƒ‰€xyŠtld\[[[[ZXURPPPNKJKJHEB@=;87752.+*)***+,++)&%%%$#"$08=A=8:75542.*((()*+,,+*(%$$$"!!#18=@>=@K[ckqjc_caRZfyŒš–~jhijdXIHP]hlhefklou€‹“’’©›¢¯°©²ÀÄÌÎÉÎÎÁÈÍÂÎ×ÒÎÇȾ¯¾¿²¸¾¼¨°Ó¶—ŒŸ¥znu~€skfhowwslaXSTUUTSQOMMNNMLJHFCB?;7411/,*(%&(*++,+)(&%##"! "29<==??J]s‚†sf[deSWatˆ——…yoe]VQXanqnedfjkou‰“”’’¨ ¤­®¨´ÁÃÊÌÇÌË¿ÈÎÆËÐÓËÃʷǪ»½®¯½È ˆš¥œ€pjtxuga^birpjbXQOQRRQPNLLLMNNMJGDBA>94/,,*''((*,-,,,+)'%$#"!  18:8:@@L\o~ziWdeWTWj~—•‰rd]^`cioxuofffgjov~‡“•”“œ¨£¦®°«¢·ÁÂÇÆ»ÀþÈÎÉÊËÍÉÆÐÊ¿Íͽ¶£¼ËºŽ–“„oggrpj_ZX]emhaXQMLNPONMLKKLNPPMIEBA@<70,)))'(*-/1110.,*&$$#"! 07:6:EJRYhz’lV_b\PMbv…„{n]UXgmjnsywqgggfhmv}…“–—™¢«¦¨®²­¥¶½¾Ã¿¯¸¾º¾ÂÊÊÆÈÈÇÏÍËÊÅǾ¬ ½½–€pdachd^WTT[ad]UNJIJLMLLKKKKMPSQMGC@@=81,('('(,27998640-*%$#"!!  .7;4;5/(''(*-4>FHHGC=62-)&$""!#$$(02@NWWWZ]m„xkZZ_mXF>K[m{gm{ƒ~urw‚ysqokdfjqxƒ‘˜ž¥®µ«©¨¬®°®°¶º»»¿Ä̶­ÊÐÒÊÍÕÏÊĺ¶°‡•‰vagh^WRNJGFFEDDEEDEB@?ACEEEEGIMRX_`\UOIC>93,'').26=GMMNLD<41-)&$"#$%((% %*-HX]WVY^k}vm`[[hWF=Pgv}}os{~zvsvwssplfgimv‚™¡¥­¶°©Ÿ§­±®®±µ¹½ÀÂ̼µÀÊÓÈÉÉÀ¸¯¬¥•ur…xgV[[SNJFA=<<<=>><=?=<;?ACCDEHMRYaigaXRKE?92,)*/7;?BKRWUOD:2/+'%$"&(*,*% $'+QbbYWX^jzvpcXVcZSPcu|~}stxvuwsv~vstqmhfhlt~Œ™¥¤«¶¶¬›¤ª°®®°²·Ä¾»É½¶½ÄÀº¯®§š›‘~gfugYLPPIEB>9556787767:::<>??ACGNW`hnuoe]UNHB<4.*.5<>@ALW`XM@60,)&%##'+/.*$#)8ble]YV^hugZWPP\]^^juz}|uuusstsv|urtqmffhmrz‰™¤ §´½°›£©°®¯³¯µÈ¼¸ÄÆÃ«­¶·©˜›“…‡|g\]h[OEFD@=;8412343445688:==>AEJPYdpvz}wnd[RLE?50/5:>ABBMWYPE:3.+(&%$$).2/+%"7Uvwh_YWZbmQCQSYcdegnty|}vuurqrsv{uturmdfhnsz‡—¤œ¤¯½¶§¦©°¯¯´ª­Æ¼¸ÀÆÁ¤£¦§—ƒ‡€uyp`XX\OF?@>:75400466655567:=@ACHLQZeq„†…~vkaWOHA6238;=@BEPVQG=50-*(%&')/230,'" #Df{xk_YXWZ`NN]chkjjkorw{~wuuttssuyvutrngfhnsz…–¤¢¥¨»¼³ª©¯¬­´¤¦¿»º®³²ž™—™Š{{tlmeYSPQHA=<9667889<;98899:<@BDEINT]fr‘’†|sh\SKD:5457;?CFKJA940-+)()+.25531-($-Nn|xjZRNOPNNXgijhhjlnqvz|vtuwwsrtyxvsroighnt{„•¦¨¨©¸»½¯«­©«µ¢ž«¹¾œ ¢™“Œ‰wpicc\QJFFA=;;<=>@?@AB@?>?@=>BFGDLRU^iv‚‹“™œ—Žƒ{oaVNG?9437@EHFC<52/+)'&(,0356642/*&  8Sejd\OHCJMPXajifdgjmnoswytstwwsqtzywsrnhghou|„”¢®°®´»Ä²«¬¥¨·¡—™«ª’”Œ|tke`[YRJDBB><:?AJS_`]VPKHFEBBDEIP[[LcpoŽ ¡¢«®š›Ž{h_YRJ>049CGIIHC92-+)(*.367777741,'  -BJKLTURSWZXZ_cgifdadimlkppmnptvuqnqxyxvrmhccmv~‡›²¿Æ´¹Ç°¥¦ž›š–~€}zywkd\USOJFCCCEHJMP[hsndZRKIGE@@CHP[mkWt~€š§©««²±¥§¦‘}lf^ULA647?DFFC?952/--15789978841.(" 3DGIKUURVZ]ZZ\bfhfc_chjiionklpwvspmpxxwwsngbclu†˜®¿Ì¶¹Ãª ¡œ™‘“Œwrovrpri_XRNMJHFEEHLRVZ^o}€vi]RJGD@=>BLZm}ƒ‰‹‘›¤«¯´¶´¯°²«˜ŽŠtbULD<537=A@=;:86558;<::;<<;841/)# "7FFHKRSSX]a]]_ehigc^bfhggnmijpvvtploxvvvrngccku~‡Œ’¢¸Ï¹´º¦ž™ž›‰Ž‡phdjjjd\TPMKKKJHHIQZeegk‚‰xfWNHE@<;?HWm‡—§™–¥ªª³½¿·±´®£¡¦ª‚kXNFB6//7;=<;:::;<>??>==>@=852/)$ 4EEHKPRSW[`_`bgjjgd_bdfeenmiimsvtompvuutrngccis}‰‹Žš³Ê©£«¤‘œ–ƒ|i^Yacb[TNLJHKNONOR^kwpou™ŒvaQJEA<8;COc™˜œ£Ÿ¢ª­«©³»À¹´¸« ¥«¬‘y^PIH<5046;<<<=>=>@AAA??AA=863.)%0DEGJMOQUZ__`ahljgd`acedennjhkosspoqttsrokfcchq|Œ‘”™¯Ãš ¡›‹“‹twrd\Z^\XRMJKLOSTUVWZgq{ss}—Ÿ‹qZMFA<76BRf~“£¡¡¢§ª¦¥¥«³º¾º¸¶®©§ª®ƒfZRMF>2238<@@AA@ABCCCAACA=962.*&! 3CEGHKNQSVZ\^^imkgd`bcdceonkiijqroprtsrqmiebbgp|–™œ­º©¢–ž˜‡Šjlia\[^ZSOLKMQVXWVX\cmv}ss‚–™„jTIC>99?Si’œ¦©«§°°¡ ¥­µ»¹»½³±¯­°¯ ŠodZRLE>5/3@CBDFEB?@A@=;;51.*&!!2@ACFPTWWXY[]^hklhdadedbclmmmmlrqmprurppkgdaaemxŠ•ž¤¬´´©œš‘†}qa`^ZW]k]PNQVX\`]YVZ`hosseh}~qXKC?;:?McŒ‰„¤²²¤¡ž¡«³µ¸·´µ¶¿º´µ°©¦™„pbYSMG;4038;?BBCCC@>A@>:9830-*&!.<9HZoƒŒƒv}¦¬©¤ ›–¨µº´¯²¯­²²µ³°­¥—ŠqbZSKC;3348;?@BDHHFC@=97530-)%! #.+6E\qƒ€ysusebbgfegfeda`dghefinnkimupmlifda_ahr€’¢¢«·´¬  ›‘•yy~„€”w`€Š†yxwf\Wdf]cffYSVKEBABFMXl~ˆ„ˆ—¦¥¤¢œšŸ­¶·°­®«ª¦­¸·¶²£˜th`XOIB953698579:=?@BBB@?=:741.,)%! (8CGMQ\q‹‚wp„…yrmjfdhfeda_eebabeiigfksomigec_^`fo{¢¦«°¸¯Ÿª¬§´­š —›¨¸£šª˜„‘–‘tp}˜“}…‰ƒpeb`]XUU[gw†„~{†”œ¥¬¥ šš¡¬²¶»¸°««¨­µ·º¶¯¤ž™“†pe^ZUOF?:989;=>??@?>=;830.,(%! 0>L^aWR^kkje|ƒ~sklhfhfdc``cb``bdffefjrpmigeb_^_eny¡§«®º²¢±´¯º³œ¬­•¥µ»³²®‘z—žv}”‘~–šŠuknlh_Z[gwƒ…€{…’𣍧©¥˜¢«±¶»Á´«»³©¹º¶·´°«¥žwkb[WRNE?;99;<<<=>>=<;830-,(% '6BN[P<>BDV\[ipyidniffda__aa`_`bceedejqomigeb_^_emwŠ©¬®º´¦´·²½¹ª¹µ­¸µÀɰ“‰“|uЍ›Ž†˜—ƒtqyuncagx‡‘ƒ|~Š“¦ª¡«©žª³º½ÁȲ©¾¸·À¼µ´³²¯«©¥•qg`\XQJD>:9;;;<==<;;;950-,($ +9BHP=,7=@IMPS]scajgeda^[^a`__`bcdccdhoomifdc_^_elu‡›¬°®¹µ«·¹´¿À»Â»¨µº¶Âé ¤£Šu™Œˆ‘›{vx|wpghp}vz…Ÿ ¢ª«©´»ÁÁÃȵ¬º¾Ãþ¾¹¶µ²±²¨›Ž}pjd]UNG@<;<;9;<<<;;;:80,+(% .:>AD:5@B?BFKKVka_eedb`^[^a^^_abcbbacglmkhfdc`]^dlv†˜¯³¯¸´®·¸µÀÆÈȺ¼ººÁ¾§¥¢’ƒ“Šƒˆ‰}rz€|vqmoruqjnyƒŠŽ”’¢¨«¯´¹ÁÁÃȸ³·¿Ä¼ÀȽ·²­«¨¦¢ŸˆzskcZRIC?=>=<;;;;;;;:70+*(%!)/4868=<:97642/./,(%!.026@?@bw€wtul`FDJ[\\[\]`_[\^a````_`aceeffdcb_]]dlu‹ž§­¬±¸´ºÈÄÈÓÔÒÉËÎÐÊĽ¬ž“Žžž…€~|yxwyzvtsw{zz{Œ‘Œ•ŸŸœ­­¢©­§°°ž¤|•¨œ¤¬­ª¦¬°³ª¢™™‘‚{tpf\TNG=>?=<;:86432/.0+(% "-.15@?Bdy‡†‰‘pGBERTVXXY]\\[^a`````_`acdefdcb_]]clu~ˆ˜¢ª©¯¸µ»ÈÇÊÍÓÒÆÌÐÌÌÌĹ­•‘™¡™‹ŒŒ‰€|wrty€€|~„ŠŠ…ˆ“š™š¢¨¢–¥¦–¢¢‰wž™ž£¦£ª²º±©£ —‰}zmaVNF;:<==;:86422/./,)% ",-16>@Gcz…oQD@JOSTQQVZ][]`aa```__`abceedb_]]dlv}…“ž¦¦®¹¸½ÆÉÉÈÏÐÎÑÐÈÎÐÉ¿²žŸ¨¢–’އ‰Ž‘‚wty{}~}„ŠŠˆŒ“••¤ž˜•—…’”Œ”–˜™Ÿš”¬Â¸°¬§¢¡•‰€thXOG=::>>;9753340..-)$ !+,28>;974235220,'# *,15:DR\tŽŽ‰ƒvgYC9AHKLKLPVYY[^a`_a`]__^__`bba][\cku|„“šŸŸ©¸·¹»»¼ÀÅÊÑÒÓÚÔÌÍĹ·³ª¤ª®ž˜™“‹ƒ–‘„}}„Š‹„}{‰–•‰ˆ‚†‡|uvrpz…‘“މ‡‹ˆ—±ÁÅ··»µ­§“zd\TK@:7==;964234771+%   ),/29GV\oƒ„ƒ„n\L95ACDGILPUXYZ\__^`_^__]\\]_``][\bku{‚‘™žœ§¶´´µ´¶»¿ÄÏÑÒÖÌÅÍŽÀ¶©®±­¥¦©•‹—˜ƒ}€†ŠŠ‡†‹’”‰‰‚z{‚‰zrqoou‚Œ’™›—‘‹““ƒŽ ¾Ã³¿½ž±±™€n`UJ?96<<;863333643)!   (,/4=KY]jwwup[I7-1CA@EHLPTWZ[\^^\^^__^[ZYZ[]_\Z[ajuz€–›™¡¯­­®¯²¶¶½ÏÐÑÑÅÁËÆÁÀ´©¸µ¬®­¤“œž—މ†‚„…†ŠŽŒ‘‹wovzzminjly‡•£¨©¥š–˜—޶À®½·¢¬§˜‰zbSG>979::85332/./4( ',17ANY[ckhd]J9-1CGKPUZ^_^^]\]]^^]YWWWXY\ZYZaiuy}ˆ‘˜•œ§¥¦©­°°®¶ÉËËÆÀÀÈÇľ´®µ±­¸´Ÿ•˜¡˜‘‘‚†’•‘‡ƒ…‘Ž„vnlrrkccjin{‹²²ª¦œ”™œž›‘†ª® «¬­¤š•ˆw]NC=97:<;96341,*+/&&-5>DOYX\`[TJ9-'8FLA;>BHQW]cb]]]]]]]]\ZWVUTUYWVX_htx{ƒ•‘•œœž¤ª¬­«¯¸ÀÅ»»¿ÃÄù´µ±­­¹¯™ž¤¤“™•‰{Š ’„ƒ‰ˆxkhjmjb^_fhq}Š™´­¢£ž™šœ ž”†›œ’––˜‹…Ž„rVI@;88=><96330+((*$ $.:EHR]ZYWMB9,(,?KK@9:>DMVaid[\\\\\[[Z[WUSRSVTSW^grvzŠ‘Œ——šž£§¬©ª«·»¯´»½ÀÀµµ·ª§®¶ª™§©˜§—„y„’ž—Œƒ†Œ‹pihihc[\cjs|~…”³ª¡£¡Ÿ–™¡ž|€}{us|n\KC=978==;9521.)&%$! +GUcphYZ[[\[YYXWUTRQRSQRV]eouz€ˆ‹Ž–•–™  ¤§¢¬°¥¯·µ·¹³¶¹££®­§¥°¬•¥¦€‚œœ’Šˆ‰ˆ}qhgggb\Wblp}ƒ‚ƒ‹¥¦§¤¤ “‰‰~mdfrkiqgcbSHA=:877<<;851/+'%"&=RPX_aYI>3*'0DOQJD>68=EScvkWYZZ\[YWUTTSQPPOOQU\clrx€‡‰Ž–”“•˜˜“Ÿ£œ¦ª¢«²¬¯²¯°­œ¡®¤¤­±§–¥ª†~••Ž‚rjfgeb[VUfnm{…ˆ—Ÿ¢ž›—‚ptma]aj]YaZVSH?:87789<<:840,)&$! $@ZTVZf[G=4+,;WXSIE?79>DQazn[YYY[[YVTUSQPOMLMOT[bjpv~…‹‡–“‘’”’Ž˜œ˜ ¤Ÿ§ª£¥©©§¡˜¡¬¡£°«¡—©¦‘†Š›•ЄІxkgffc]WTVfnjxƒˆ}Œ“—–’‹jV][XW`l]USROG>8678:<==<973/+(&# !C^XVUbZJ?5.6KhaVHE@8:=EN\{q_[YWZZXUUVSQPNLKKMSZahnt|ƒˆ†Œ”Š“—•›žœ ¡™¢¤¡œ›£ªž£°¤ž¤š„‡“žƒ‚Š‘Œ~nfeec^WRRVcfcq|ƒ|y…†ƒ€zeOCT^fmv~eRGIF>9789:=>>=;952.+(%"  6024248;;;;9631.+'#!  -GcXBUak[PGTdxpdQHA=<>CDI^a_]ZVUTRQQQQQQNMMLMRYaekptz€‚„……††…‚‰‹‡‰‹ŠŠ‹‹•“Ž•–”–™›Ž˜ˆŽyzƒ…pf`aa`ZUSSTUWZ`u~uk`WMC;EWl‚’›™‹€tjcWE;3*/22479999752/,)%!  &@dbZXaqg[MT[ba]SJC>=>AAEVZYZYXXVRQPPPQRPOMLLQX_djorx}|}€€„„ƒ€†ˆ…††„…‡ˆŽ‹‰Ž’””‹‹’z‚Šˆzvv}uga^^^^YVTUUVYaqƒ‰~l[OE>@SqžŸ§œ†rc\XO?60*.14568767640-*'$"  :anp\bmkcUROOWWNIE@?>A>?QSPSV[ZWRRQPQQRQOMKKOV\chmpuyxy|{}‚‚ƒ„„ƒ‚ƒ…‡Š‹‰‡†Š‰‡Œ‰‰Œ}{„†‚vrszvoe_\[[\YWVVVV]j€Œ…saPB;Hf„¤¤¦—eWOG=4/,*-1544654542.+*&$# 1Sajceeoka^\VVQHHJHEBC<8MLGMQUVUSRRQQQQQPNJJOU[afjnrutwzx{‚€~‚€€‚„…††…„„…ƒ€‡Š‹†…†}}†‚|roosoib^[[]^[ZXWWZfu…ŒŠzlaVSi€”¥©¥¡s]NC5-/00-14532433430+))%##!%=Qbfeajmsrl]\ZNRUVNGIB=KHBGKNSSSSSSSRQQPMKKOTZ^chloqrvyvy}|z~|~€€€€€€}|ƒ‡‰„€{z~{vnllmjfa][]__]ZXY]cs‡‡†ˆ…„ƒtm€‹›«©œš‡gUIA:898603663033231.)'%#""" .?Lad^dlpkeconXZ\abfdUGID?DGINQRSTTSRRRQLKLPUZ^aejlmqtvtwzzyv{}z}~}~~||}~|yyxx€ƒƒ€~|xvvurljhige`][^`a]YV\fv…ˆ}{|…Ž”—‚pr„ž°¦•”€aSJECBA>:36783/1100.+'%#"!! +:W\[^^ZX]epiRT[j|‡weWOGABCDKPSSRRRSTSQMLMPUZ]`cgikoqrsuxxwtz{x{~{{|z{{zwsstw}|{zyutrqolhehhfa]\_ac]ZYfz•™Žvy‚”– ‹uo†›ž•Žz[QJHIIIC=68982.0.--+)&$"!!! "2EPYYVRQSV\VJNVbmsyshVOLKHCJPSRQRSTTSQNMMQUZ]`bcehmpqrtvvuuyyv}€yxyyzzvqnoruzzxvutrqoomhdcijhb^\acd^\]q‰£”ƒvœ—›ª’{†“–‹‰‡r[QKJNPNGA:::82--,++*(%#"  '9GRTUSLILNKFGJOUautplicZNBKPSRRTUUTSROLLQVY\_babdjnpprvstzzwu}€xwwy{yrnlnqtuuurpqomkmkdabjjha^]begbcg}“¦‹{~ŠŒ•¥¶™ƒ“„‚Œ—}h[PLMRSQKE=<:70+))**(&#!!  /@JORWOKJGCBBCFLTcjtyrjZILOSRSTTTSSROLKQUY[^a_`bhklnruqs~zuqy}xvuxxvqnmmorrsrnlmkjijicbdiigb``gknjlqˆš¢Žš’†}—®µ£—}nzŠ‘rbYPMOTUTOH@>;6/)'(*(&%"!  0?EN[SMMJHGEDDEJT\bho{zhNOQQQQRRRRSROKJPUXZ^aaa`fiimprpt~ysnvytrrstsonnmnorrokijgfhhfbcehiifddkqtps{’š—Ÿª’„‹¤µ¯­©}pu{{f\XPMMQTWRKC?:4-('()&%%"!   49ERNPZUQMIECDFIJKQcrn`RTSNOPQRRRSROKIOUY[^adb`eghkmnot|vqpttooppppnnmllnqplihhccgfdabdfikjgfouxuz…™œ‘›¦©ƒ™­³¬±±™†wqpoe_ZQLJPUYSLE?91+(()(%%%#! )6CGP\WWZQHDDDCDEHQX[WSSQNOPQQQSSRPJHNTY]_bddbefhjjknrvqopqohjnmmnnmkjkorohgeebcfecabdglokggqx{w}Œ˜•ˆŸ©¢Œ¨®«ª´³›†tpnjfbZTQOTX\TLE=5.*(*)'%&&#   &2:EPU]dUKDDDCA@@EJNMLLLMNOOOPSRQPJHNTZ^aceeeefhggilornlkli`flkkkkjhfjpplfdbbacfecbdgjpslhhtz|w€‘”Ž…›¡”™³ª£°°¦–‚roossiWYYUWY\SJA92,)((''()(#    -8BKT[TNEDEECBABBBDGHIJLLLNPRRQPKIOUZ_acefgefhffhkmoligheafjjjiigefimkhea`aceeedcfhinpjghv{zvŒ‡ƒ—˜ˆ ¯¡œ¶¬˜Ž|mjt„ƒoX_`[XW\RH=50,)'&%'))&#  '1?JQPLGHIIGDCA@CEEEFGJKKMPRQPOKJNTZ^acdfhefhgggjlljifeccfijigfdcfikhfd`_`dfeeeeghhknjhiuxwt~‹}‹‰}“¦¨”ªšˆ„vhgtƒwi`gg`XUUJA83/+)'&&()'$#! ,7BEHIIIIHHECAEFEFHJJIIMPQQPOKIMSY^`bdfhffggggjjihhfcbfggihfcbcfhhedc`^^bddfggffgknkiktuqot|sr{€~v“£”ƒ›Š}vigr{jbbhe]WRMB;740+)(''((%#$"  %29?CCCGJKHFEJJHHJMJIJMOPQQNJINSY]`bdfhfffghhiighgfcbihfgeccccfffdcb`^[`cdeecbcfkmjhiqpkikohjrwvp“žwy‚||ƒxgcin^Z_dbZSKE?;;71)((('&$##%! )4>=>BFIJJLPMKKLLJJLMOPPOMJINSX]`cdfggfehihhhgggfccgfeecabbadedcba`^[`cddb``bfijhffmjebdh`bjnoo‰ŠopsipzyeQV\^RQUWTQG@=;;92+&'))'$#$'' *678;AGIIJMNNNMJIJLNOOONLIINSX]addeffghiiihgffebcedddda`a`^bccb`]^^\acec`_`cfghgdadb^[]`XZcfjo|x`eg^lxiO?IMMDCEEFG<9==:2*%$')&$$#&,) /136;@CDFJLMJHGHJMNONNMLIINSW\adccdeghiihggeed`bdbbcb`^`_`bbcb_Z]^]`cfb^_abeggfa\\[YVUTOR\_cjmeTWYTdlWD8<<:8;AA=503>>:1,(&()##$#&()&,1259=>ADFGEDDFIMNNNMMLIHNRW\`cabdeffghggeddb]ac_aca_^_`baacb_]^^_`cgc`baaegfd^XVUURMIHLTW\b]THMPLVWD8679;9=GA7/27@@<50+'('#$&$%&& '.03547<>><:;?DHMMMNMLKHHMQVY]`_adeedfggfdbb`\`a`bb^^^^`a``ba`_^_abdhdbcbchgdb[TPNMFA=AGLPQONJ>CGFMODAA==>?GQOJC@@BB?83.)'#"$&%$#!+01104773./5>DILKLNLKKHFJOTWZ]^acddcdfgeca`^\]^aba]]]^_`_`baaa__ddfheccdgkhb]UMIGC<CDFIJJKLNNMKGDFLQTVX^`bbbcdeec`^\\]\]`_^]]\___acdaab`ckhfedcdimoeZRJCCDFM\p}zŒ–“ŽŠˆ‘Žnx‹•~p€‚ykda[YYSOJE@92,(&%$#"""  *-/.046;?BEHJJJKLMMLKFDFKOSUW\^``acdda`^\[[\\^`^]_]\_``cdeb`a`chfebbcdhjh^ULECJU`crŠ› š¦§Ÿ˜“‘¢£€†‰|u~Œ…qigf`[WTOHC=73.'&&$"!"  '-/.1369=ADHGGHJLLLKJGEFJNRTWZ\^]_bdc^]\[Z[[\_`^]^\[^`bdcb__^`ceec__`cefaYQLJL\m|t€—›œ¡©«ªž––¦¨‘‰zap†ˆzjmnld[TOJE?:53.&%$$"!" $+//1358;=@CCDFHJKKJJGFFIMPSVXZ[[]`b`\[ZYZZZ]`_^^^\\_abb`^]]\`cacb\\^ab`[TNMOWjw€vƒœ–˜£¦§¤–™¨ª˜†tct†{ldlkd[TNIEA:40-*$##$#!! !*/012468:=??@ADGKJIIGFEHKNRUVWXY[]^]ZYYYZZY^a^^^\^aaaba_\\[Z`b_a_ZYZ_^ZVSRSZduƒy…œœ¡¢ˆ”žžpeq{jbad`YRKD>:61-*(&###$#!&-0113468:<<<<@CGGHGFEEGJMQSTTUXZ[[ZYXXXZZY^_]^^[^babcb_[[ZZ_`_^[YWX^\YWWY[cny~~{ˆšŠ‰•—”~‹“€pbZ`cXX[WPHA;52/-+)'&%#"#%$ "+/112235789:9<<631/,*('''&%$#$$#$" %+.0111111344678ABBDEGIJLNPOOOPRSQQSTVXWVWXX\[Zbddb`^[]b`^\XY]WVX[\ZZZbiloqpspihmrrme`ahYMMKGGEA=;9546663.*)((%%%"!! #'+02100000/11/137:=@ABDFHIKLKKKOPPOPQSUVUUVVV\[Zbdc`^][]b_][XXZZZXXZ\\^gignnmonkorpmg^_bdWOQKEHEBBA?;;=<94.+*+*%'&"!!! $(.02220/.-..--./38<<>@CEGHHGGGKLKMOORSSTUTSUZYY_a`^]\[]ba_YXWX\][^```cljgpqoonottolg^ac`XSWPIJFCGFB>=?=94.,,-+((&"!"#!$*.3320.-+-,*+++.1579<>@BBBCCDGGHKMOQRPRTSSSTTW]^^\ZXY]dc`[YY[^`_cfhhhqnistqnorusolgafhf_\^TLNLKNIA>?@=951/1.,)(%"!!$"&+022/-*))(***()+/13469;<=?@ABBEILOPONPPQRROSX[[[ZWUX]ba``\Z]acfhjsqmtpmuurnpvurrrpkmmlfcaXSTTUTKC@@?<96311-*)&"!!!! "(.0.+'&&$$*(&()**+--0469;<=>>?BGJMMMMMMOONLS[XWXWVUY^a_`b]\acfnlmxtpqprvurorxsrvxxsqollkc\Y[[XSLGC@>;8531.+))%"!!  #(+*%#"$#&,$!)*(&(+*+.14789;<>@EHJJJJIIMLKKQVSTUUUTX[`_`a]^edemmoxvrprvusqquztv‚xuqlqsi`[daZTOJC?=:7341-+*($"!!#'&! "$(+!!0+$"&)&'+,.24679;=ACDFHGFGIHHJNPOPQQQQTX_^__\_gbbkmovvtruytrrty}yŽ‹ƒzuqkv}pd_jhc^VLB>=:7541-,*'%#  $# %'$#6*!!%% $*')-/0258:=??BCDDEEDFJLMMMLLMOQUZ[[\\_gaakkltuusvyvttx|€}ƒ‘‡}vtqk~‹xibopmeYLEB?97852/,*(%#  &&$0& "$" %"%*)*-13579<=>@ABBDGIJIJIHJKLPSVWXXY]c_`khhopprvyvuxz~ƒ€…“‚xvvtmŠ›ngwti`UKHE@978640,)(%"!   $*"#""%%(*+,/13778;=>?CFGGGGGFHIJMPSTUSVZ^\^cbcjkknppot}|€…€„~wyzwrš|opwe[RLJF>869641-*($""  !$!! !%&')++,/0368:??@ACCCDFILMNOQQQUXZ]aca__aeis~€ƒ}~…|zzz|‰„lpwq_PLKKG?654331/,)%""%  " "%)'(,.025789:;<=?ACDFIHHIKLMQUVY\[[\\_cgpxxz}y{€zvvuv~|rdnsgYMIGGA:333231-*'###   ""$'()+.1345777;>@@BDBACFGHLONRUSVXY\`ekoqsurtunlpnpxrjcij^SJEDC=722211.*'%"%$   !!!#'*,-/02237:<<=><<>@ACGIGKNLOSWY\acegihikkcchddmhdbc`UKDAA@93//./-*'%$#$  ##"$'+,.0356776689;=?CDBEGDHMPRTVWY^^]`a_ZZ`ZYb^\[[WME?=:61-+*+,*($$%&"  ##'-...221467:<=?@=?@>@DGJMLMORRRVVTQRWPOVTSTQLEA=71,)'%%%'(&!##     )('',.0466888999998:=@BCCDEFGILLJHJMFEKKKIEA><70*&# !#&%       &)*/21221245557779:;:;=<=?AB@AAA>>ABC?;83/+'#  $$      '-,**-.0321532245334468::9984678:;73/(%$#"!""!      ")*+.--.-,,-/.//02333221.01/13/-,(%###!    "'()'%%')*++++*)+,-+*)**')+)))'!  "#!#%# !"" !         volpack-1.0b3/examples/brainsmall.den0000644000265600020320000520007605607121730014624 00000000000000ÿÿlmÿÿlmS€€T    %&9@);3 ;0?( 94  #% 2  1> 2RW.  6NU" 3G J1  >N7V- =\* ,?4>_5*IDAb7EK Oj/ BG!\g?A(_S BVERQ'V GQQO(:Q%L^S4RDA`PEY?YNRN8FRWZ =BFKV:9>=CQL  ,-9S` #]`2R^2  &6!  1. :_C;S?A58FWQIJ56;@EDDA<0OpI>FD?::-P@$(FPN82>7 +IK.US=?BJ+=D<788?L\L? E\`MCFG?ACN_rk^. Hf_MTOFIGGQSZ[UDHqW>&MWLNOGB:AB:  WbB0TRPB7.((/'  %[P0 7ZL-"  "VM&')XC  ES 3D34e6 !  +^G8JL^( %$  &H/C'  "*   68 &  D 8<   K  B (E    D5 $=<>6&$J^.@Y\YJDGTP7-DW\J?>OY4 !AVN4?HZX0N[UT\U% :VacY& ,EQD"!/#   "((& %&#"0D&%  .GX@ $'  +GZ_R#*I\bSD4!  0I^fVE@:## 0B^hSD?=7* 2++B\cUBA<60'(6I'@^fM?@<72)!"/?K ;<:/&%/HU_" !8Yci\J/-?D=1'(17Nad#!3Zc][]K88KY><5<@Paj- 4Vb[PT^VHUb]P>@CJ[^@ 6K[U8,7HigQ=8<00/)/$)2DFOB8RY6'&$ )73"-E)GS1 29/  H# !.- @F %:;4+!,IR ?MKG?:C>. !.HNOLC>:0 0DIHFJNF#9KPQVW5 6JQW[@1FRT5#48$        @  JcA   RnhB   #UspV6#    (YvnZFC<   ,XdvaLGE. &N\t^IDB2   !Hdl]MFC4  DiqfQEF7#   DdvlTFI?. >fskYIOJ9*  1aulWHGE>3&   #Yp_ZCB>9;/#  !TmeaEK;9@<+  ,TpkS>TFA>C8 (07Few9JcRSEE>- 3N^#:Uosa_I@*!3;J7$!,;U\v)8YjskbUF 0- HeW;84 #E[EDB0   =  &9  -E5 )+3611-!C7 8:9>>;-!7:=E9)'# 5:(0A;A7(51AKLL;6BKNPH *?GNA )&  #QF (K\`7  (WeUM6  *W|KD?=> (]KO@CC0  *a~VWHCD/ /c}mSKEC-   4c}€\NJA, (..*.&  6d|}oNJB*'/323*  1^ynVMD0 #+11* 2X|„]hPF8 %'#  *Q|ƒVvZGC-   $Eo†XnWOJ=)    !@b}f]hQEA9,   ;Z~zNbYH:>6!   6Yz~Ia[O==7+  9b€‚\fEE8846!    4hz|p\SMB>A83   1_y|zjt_@:A39)'/?Kdm-  HhjoKI+DA=:=DFA31:Icjc) Igg\>1/E;@ACGL18G]]XH F]cJA=" !"00( %EfzhO??<%##"3661+ $HhvqQD@<( " 0776/&  %Jizr\KA;( ),''"&OjzvoWC<*  ''03**32* (Ml{v`N@) +238:75643.%,Jk~{jTE)!#%458;<<:5-)%3Onƒ…{l\E,$)#"15358:9625Uqƒ‚ysaJ4#)&'1-&*2576)  6Tt{€|toV?)"$!*21*$&.2, 6Yq~…xvv`E6#*./%%)#  2Qjy„usaJ@2"$ #6Ify„…|uqM>7,   (=Mfw‡‡~ulY?72"   $5Nat}…t`]J:6+ #2Jbsszƒc\V@974*%   !)@Xlxsiv{FjTEBK7$   ,FalghvxgniYNGSI1 * $6NbvrrumP;=IP>" ,G[P4!EfpmfD6 9D=>ITB#'CU[WO Acnj`A3+:CKLVA2*1IVYUI:  :]jfYK4(BMPN@BIKQA6%/WdcYB. ""$FKSMSNOF9# +P_bWB)(%:GKOEB9& 'H]^ZD&&''"4?6>6,!  !CYa_ZA89;64&*+Eo~{dQG>:* 0.68;94@DB>9/%*%Ip{€i`H?<0+-+2:8-=AC?;751. Dr~xwgM?<1 &'-47053860! Ix}x{w\G>1'+#!13.45+!05320# Is‡|}„pP@5,46/%9=><>805><=53%Nx‰ƒ†~YA7 $0474%4=EDHGBD>3587- 3VwˆƒŠ†hI=!,2552+8>76" ) /-,7852-*664% ,Qm‡~„„tyOB7&)/64&*345,6Vp……Šƒ‚vx[EA-(0)!-'230# AavƒŒ„rs[>;: )* $Fdv†ŠŠ€€|rhgA19)     (If|ˆˆƒ‡‚sY`U730   )G`u{‡‡†„ˆo__MA:-"    8Rjv{}{{}y{k[ekO?>4-(AVkt}yu|qt[aN37AFbA (=Tburmu{pcE8"=XH/%;Thqnu|{kO? FUA?4  %(B\ppx}vdH! CWI=6 %F 5SisstlcD 28=>G+  3Wn"(KbppsmU@ %9B@FG1 *>^fX: ?\jqmnWH$,5;BBFA+'76;=:?BA@91)*.COSD- .OdhjacN@<;@FMMJI=4BJNND-  'H_eha^^E>B@K@;81:EB>3&  !>WbebVRGF:B2"($ 9Q\`]SMIJ7/'% 4LW^YWJE<0.,! +ARYYOK@81+-!  4HQSPL>4/,)$3BJJF@5.+! !08;<71)% $*+*&       '"!)3*  &363$4=3 %5>>9%-;:3    *29::4!189'  Dh. ,8'58;5./5+'"  Hlg5 "3<3698;6#! '/*!  JrnI5)  $++9828365(!*4(  FjbF89>#35+175*!#*'359>1  L|vC5-->>=767$/-  Ez‚\A<89>* ')(7<>EFAG69B=<986&.$ #R{„nZ>47;1 0;7% '%%-574'183269<::;2 &\’ƒzŒlF:@'%*-49<<3$-1*2:3465*# ,]‰–Š~‹†`@B- 196=;;BA6597-4DA?84!#"   8e‹–„•oJA6)7;AD:08BHFKH<?89# *H|’”Š‚ˆ‘„kJ= (<8?DH:/+7A6445>:25:::3Y„”‹„„”y\E'9868==/&7CID923B9(/60 AgŒ•‘…ˆˆ“…bB: -7.+:9.3>FA;857A9&!%  #OvŒŠƒ‡‰‘vkW@- %"+44658=:.4=?8-(1*  *Ux†‰ƒ~ЇteU><'.7687-.)+6:5--5) 4_Œ„„X]F@7 #07:5)#/53//1' Dq‡‹‡ƒƒ}cR<5<   ($ Kt…‡‹‡ˆ…|znbAE+1)     "Ln€‰‹ˆ„€wh[X=MG@;  @`…††‚yzxpvtia[cA?:3! 0PkŠˆ„ww~‚ƒ‚wKdJ1&<;>  2Ro……†v}}wqYH1 .C(  2Okz„„{r|€‚vgQ=4BA!    1Kdvzyv{{zo[M! !:O?)  $2Meqxqtxwn_DB=QG&  ,T! 9\ivrvrnndA <=FMF +KmL+MgmrsrpoiA2>B=8GL9#-4OWeN =Yejlqpj^G==CC@MH7  !-=EW_QA'4TiijmjhcVBD79=A>4, %*GVWUA, (Ibkjfdb\NLB965;:>944;8ESM=* $B\gjd`^ULF9697718DHKFB<.  >Wbec_ZVB8:5::5248:>7#  3S^e[VVJ?976>615.&&# ,HW_[WRKD<7.:51,  !>SVZURHI?.'/5.( 2COUVSRHB0+23/##1=EOQPHC510-,  -9AGGFB=50+ ".48:;75/$ %,..,'       ))$%/+$ %2:8-/983(  !'5?;#4:30-,4-  ))+38;<%%'6:3%'/)0TkaI<;C6& "6<>??A?=2&/80$)6>>7'34. 3WsnP<:?;:5!%*-8:><=431) $-68?G:/3:9/ 6\xX@:<8<4 ,%/3&(7>A>1-:EJKJOGEM;8>9  ,9?HKOPOC=LLMNL@8@LB907>7)24;BA>:12,  -Ml‹’††vQ;:5# $2:;:60-%-/#3645511389' !:Xu”ˆ‰„fC?;! &/4:AA=C=43;725@@95+-9:0  %>by”‘Šˆ‘vaC:' -69=>FB8\‘“”‰„•”“„hS9*-8A<4;C7.8GIA@<:G7*6793"  "0Hf†”““‘‡†‘’ŽlZB,'7:89;84:HF9023@@4,2.($ $2Mp…”“‘Œ‰‹}RI8 09/9728C=7403:=339:8+ $8Vr€ŽŒŽ‰ŒdZ<6 &&68=B:6.$49=218994 '>\zˆ‰ˆˆŠˆ‹Š}tXA=0 399892!!/653554* (E`~Š‹ˆ†‚‡‡†…„{[D95 ,453."  ,Da€ˆŒ€}~yy~„z_9+3    -Bg~„‚yfOEFJ]cjh[D5*   ,Ebz„„qcQHA79;BW]G@JK=4' * %7Rp‡„|tpkh_jllh_V]LG9*74  )C^p‚†€€‚€}|z|~}wePK1 $/   .CZozƒ„{|z~z{uZT;  77  +?Sfv€zy}~||pYE'+:7    (@OP "(-3G3  4Ogponjpnnj]^\HJCAKC "025ESU3  (D\hlmdopihd^LJHAHC@ 047;LZ]M#  :OakhiclkjQCMBG, 0I[fgigegUMF.(667:;@8(  (?VddbaZ^^TA>?BBB;-)47=<4  !6NW\_aY\OND=?>D@:*'5490 2GS[\ZWL?8>>?B??4'&01,  ,AOWWXROG=;=>@;=3)&*& &7EMQTRQI@<<<:95+(& ,7@GKNNKG?;<761*)  )08@CGFFC@>=4/)  %.38;>>?<96-%  %,156631)  &+++(#        !!  !'&3,*441$ (1/(:=7"68:4*/0%(33+5BE;);@>8,43&  )/47-1?HG5-?EA=786'%$ ' -28;8-=FK@.*>649;<:651$LY$5:==18@IM<'/A?3./4684/ 9ZaH -:<=4-:! 3=>;)6=IOMC:426F:-8;::604 !L]RIA@<23<;129DNOGALA8.<;2=@=9431 ,SjfL>?@<99) 2<;5;GMPD34AE9(604A8+.686!  5Uhp\D?B>:;@5#*=DHPPM@9(17<9#"*:H8+4<;7+ <]nrgI?>>8D;60H^qsWI@98;<9) &,64-$/;>A;$1:5;D1.:D=;61 $J`u€‚u[H98:<7 )" /339<61@GNM93>EGMB.5B=3451  0Ylw„††|Y936<8&"':.<9$ ".)785& Nh‘“”‰‹Ž’ƒS896 ")44/5895-8+$1&4850'155?D;7*\{€‘’ŠŽ‘‹h<68, '!)8AIA6)"4723A@4"29>?;.!,(b€‚‘ˆ…މnP:85 066547@GGG92>G60EJ9.)-12&#/2'#m„„”’Œ‹Š’‡[>:8 &:;EFBAGG>?GKLPLHNKHE;8882%44*8zˆ„•“’’‹“”’€U<=#39=BPHCLPA28LNONIL@6=IHG@50-4-Q~ˆ‡”“‘‘’”“ŽzO?+#3879G84@H74@E@9=GJG5,435523,')$h…ˆƒ“’“Ž‘•’Ž…fG9-478?36D;1>D92.1AI@3142.$0,0  @x…‹‡‘““ŽŒŠŠ““Œ€jWC*076928A;?B5.$3<@F;7@D=5'*')[~‡‰‡“‹ŽŒŽ‹ŒŽ‘„sdG; -55.6=FG<2)5::;=BB;55)& 7l‡†ŒŽŽ‡Œ‰Š}o`X=9"  468695+)26;@=6/,.)% Os|ƒ‡Œˆ‚‡†‡Š†}pln]A:8-4341(+*/)(_{}ƒ…€……fLENXbded\VB7;*(+-)" 8ds~€~ˆ‰d5$ "*,@#  ,  !8@?CIUcosyzuyy{yxxzrgeRA(!-C  *567:ERbltwvuvwwxltoe\JB?;A;I@ #.  *../7CSbnsvuxttrspjgONKIIA@F$ (6121#  '"#+4EVelrmtrrnonacPLHGIHLE,1324Ia $->O^hmmllhikieUQHLFIFHG  *.458?K`` %2DV_hkjighc^QDDCAFFDBF&'&9988:CPZR@ ,C?AAA>>,%.0.189/ (9JWZ^^\WSPA@=CCBB>>=*&..248- "4DOXYYYVRKB>@><>?=?<&%40:=0 .>JRSTSXRPD?=<=>=<<;%%4770 '9FOPOOPSNJ@=9;9:<;6" 590  !4AA><;3503(*'  $()),.13379764.-.(#  #'*022//,*#  "(***(  !$#$         )0-  399-)?="0<8/%.0&  '3:<<68G=!2C>=87652 )49:;8,5J=!4DIG@=>7$$E""") -::=;8-.8L>!4JIIEHB4-3/2wq! "# '/;DG<:)1=NC/3FL80,217:5)"' _pZ@7'  %'!.)6AH@8*&5KM61:CK8#,,,39463!#vbF9:0  &%$*%5BG;.,@PPC630/F;0;>9>6296'4{yF8@7    1-8@B91-8LKBGNB4.A=2@& !3/$0?F98?LE7,:LL3065*;;6$.388.#>D1.8IH=02x†sQ=<;9>>:1 +* #":;-*&2?>>-#$%4D734DIO?0=C:2!'1=E63<8*24334763@LE:95Urhu‰Š™Ÿ˜k41<. $%7986(7;4.96%.+3<9.$66;CE@:50)aƒnz~†–—š‹T277! .$$'+:F>3 ,303A>0(7AH@500468$j…tz„‘’š•–vB0:2 &3, 1221-5BK:.,5B40BE2&)131!5<:66"n„u{…ƒŽ—™›—J,8: !%-57=BC?=FLLHEILKHKOJA8763/59834&„ƒtw‰Ž”™•Žo=7:""59CKOHEOONCFNNMNKKJ=DJGHB<:8538 N‰yq}Š‘““š˜‘Š^F=. #6! (668;>51>GIF4,#5<9=FFFEF7/-1244(ftzu€†‹„Ž’”–Œ‚uf`A7 )9258515&   %*"-_||zƒwt}{qg]ZZXo|}qP;;B%  %  "Ot{€€{€}|uxth][Zfxr~kNC?D, % <`t}|ypq|xz|{~~zsosplsZO7P?3*";   'M^nt{xvnvyty|~}xxxvtqUMDKC?=@B5!19Vjmtqrwwsqsuoux|zqpsXLE;EGG>C )$-30/ ,G\aldlqsxprjpomqxykSNR>J@EGGE47=4//@K  /IZ`^bequpjqoegnsleWJA@AJNS]fgfb`_W^ZGHGBCBIEDBCD@82190-6EJ' )6?FR\aa[SOQQRMADGEB@@@DCC) .-)/29C4  !-:DKSX\_ZTMKUWF@@>@?=A>>B1(2./4DD3 #/6DLQU[XVVODLN<D6(0?JOQPPQOPMDC=;:9<>?=;7+*-/8C6 *4@KOONLKJLGA><:8;9;::6'),3>7% #0>>>??=?>@<3.246/(*14- ")045543334788411'*$,/+$ "#$$%$%%'+/1/1/,*+,)'"&(*.+++*% !#%&%'(%" !"#""        " '   +84)5>).1'#% 4:9847(7A.&:50',44-  #&'&"#$;>?B?;0;C*.D6089:?75!!%( %*0"#6"*FPPQPM:574$ 9zI"!,6;7#8BJLE>2%;H:!0F<5:>CEC?0.XvN1'%/&:<.#8EOH?4/JD20?L@5)+39C;0080 j]?0&( '/+;9#+=LO@6.BO7#7=EM6%03/;>0563.tf?5-  "%',&75-AOL9$3DRNE9643E3&8B;>64>:3" A|f=92  !'$"8:*/?OJ?8ENGGNPL<1D<,6KG60;574(Y{a>7:"  !*&7;6)5  )('9=8.4;KMEM=)$76=A9:2-@:1%1G4-(*) ;}‚lL;?<1  !.#9<9907F=39<#'-0477+%9E7.7DK6"$52Px}`KC:=76/((" /*"#356'7=5!.$!4=>:(9H:06I?B=1"(* %`~tkT=48<=93)  "/55023=?12;KE4.38ID25EJ63A<,7hns†tT70<@99* +66;::;0+5=MF7:HNJ?FMPOF7DL<3'59+-* >Wdl„“’xV1.8<6- -67<=9GB=FNLLNPQPQPKB>?NJLB0043/1641j_m‡”š™~V:+:83 &"%8=CBILPJ@94@N=;-34-01345CKKF=83ejeƒ—ž¢‘zP&/8" -33**+7893'2409:(../;:-17;AF@69521/#N`\~‰š•‘‹k7'4, 1578""0/".6=7(,6-3B<)2:DF<3./39:9*  ;oU|Œ”–™•‹}H(-5# +.6:)'.0/,2E?1'6B60DA.-354/-8?DA87$GdOzŒ‹˜Ÿ™s=+5.! 93245;CB<=KMD?JNLHLNH<7641-53:KKJNA;:417BB53>3+ X‚^i†““˜›™„wPC9439>GOCG74:<@IB4"4;9934!Y€ql‚”•““˜•‰zov^N;/.766276)403AA430-'&.>81376-0413(.~€l|„’“’‰xipnp^D9* "(+/! )667768-%%.==5-&-,.*," […€m~‡“‡…xuoumqhL<<* %1,&"#0533,,,,(,# s}hr…|I*@=@?C@)&&03>@9#"!++  >v€ƒ~}o\^e\UECB:78::;,1?55;HA5 !&  2cx}{uwvyvjZOD>765AACIA@=8@:" )02 &Sv}|~~{|uqjl]I>:==DIGKBID:D=,   Hix{yz{}zv|p^Yb\WGBFMc_D>>:F=:2/   6\pwxwwzxtnntgXYSX^[cc`LH81DD@6:/   %Ofquurtsp\mkcLA>EUjkn_LIDBFIHGB  +4-<[kstqptrpopbJF?HQVWPMIFDF=LIJH /43:7323 )LdiqmomokljiVC<5BQIHHIIH?BKJIH  "8944/312H9VdjeimkmhfYXT?79OQHHJFHKEJJFG$/69921/237Sc.)G]dfjijkg`XZ^S?6;CEEDGHFHIJGD#(:@9410075;V``B<3  2P_eeefd__][`ZXK:>EBCFDDFFD?@"A534.010/AFEBOE4140//AOB8+ 0CVYUZ]XXTQLLIH;2AAACBFE>=A@77.51.2?F7&  7JQXZ[ZXPFFDDGIA:;LRSVSVNI@;;=@JG=<5?<:;=?8(-0--07AA2 3BJQRQQMKE:85AA::<;><;;<<:./1..2=D5 %7CLLLMIHD>946B8888::9<9:9-//.2:A8$*=GEGJFEBA=;;=>8956675886),,/3=9* 3>CFEC?><<9==;98656463:-(*)/76-  "08>>@@?>>====;62140610*'(,160# -5;>:<=?<<;98845235*,#%+01/' )0346865252134130.-*"'(,-(  %(*'*)'(&'+,00.)%&!)&&'!  #)*,+*(%$$&" "$&(%%"#"#  "#             %& ,# +<9%  6.*7.,<0::1    *::*-732B.('*186$-3%  (2*09- 0;9,  $-*4963,2;I>=C8,F8(5/l\ $7:)/:?=719DLKKC9#?G1&@PJFLNKG>3++MuL ",(!0MD<<;GI6(,84%&e_=#%& )455:>01@?/6?MNB;,,EH63:JO?/#)6G6&4@4"9xZ4''-.39:<=+4@>/8GOH9+3CO>0;DLK8)176G8$7C5$NU5 (  ,3*05:<(4?>19CPF:=JOOH989?C."8EFA2.@H8'`vR8%"#'14(+6%/=A/3?NMHOL?DOROLEJ8%5KC21;BE:+)&/szT@=6,==9,##%135861=>-'0#9@>3$:GA36IIG:03686" Ua^ktM;:8<4)!#&(+,563/'!763>@21?K@3/4FL97GM:3D@60,-!  &NVbm†`A8<9<<6& *8;<;=;8/'4@MD8?JNHGINOOJMG72+4=466*'Wekv|lT=::7+791.1=9/Njo~}mRB;06;;* "4538CJINNQQM@86DL75# KIn•››•ƒ[3"35 "(09?8+.6BFA:CMKAEPKHMQI?974.26>J>2& 2BJm•œš—‰l<"-5+ '8;83.6GPKPPPONMOOOOMPPPNOLB730:E4#!+ ZV[p›š‘†lG-'27#.6656:GOA4?EIOLC69A==ENMLIEHKF64D5$%1"B4 -3kgw……’—˜“Ž‹vaN006417?IE93;9/3.,6E4,12/,+7E337<98:?>1.+ F~{zŠ|’––…‡uoa<@98&!2797566514-29B<:741/+3?912500144('rƒk‚…hˆ“Œ…|€‚ucMC<4 )0+784452)313642/--+4@;8.%&+)''! G„wd‡yGDk„†€‡ƒ‚‹hR@=. )47584 $%362.+**-*'!f…{n‹u5`ƒŒƒ|€‡†{\K=:+ -471"$)(%'(*))+. ){ˆwuŠi1>G9#:4/7  ##$$$35.,$ @p|}uxT:=>@?;'.9$?8<<  "!"%,%  ;mtxt[CE[VNGB;:6869%51@@E-$$,#Unsyyl\mjhcWLAHC>=:789:P;%?ED<5$  BkuuvvmtpeZPJA<=EB>B;@BU^GJABFA:>$/YprrtupkeZTOB:8;A@@RGUXTXG>=LKKE   Igkortkmii^WQ@999:>DKKDDLJE@KJKH !%'4<4   4ZipojmicdcXRM567374;EJNLFIJIGJI* $)39.0564.    "Iaiimlddb\[SK=556448BJFGDMNJCFL2 +1690//-.43!7Qfhehc^QKLRUD<63356=GGJGGFHEGK8%,M=5212/1.2:H>OFB4($AYcff`VKJUQSRE>5575@AEEFFDD?DG6/=7<2///.11:LY]XG9+ 3N\bf`QAB;9:=HA:444?CBDECBB>FB1)M4.-10//1;=JLF8("?XYXZSJGC?;8?>+ 8=<8224??@?830--.015:6123244++,,+)-232'$29<<;=9404147641111133*)))*)-11+  $058877:865775452.00.'(&''((.-)# *2455634421/1401-+')&#&&'(,'# "&,.+)*+))(+++*)(((!"#$%&(#  $%%(%$! "$$#   !$%"!"!   !                 )+,'  '% 3561(=;41.& 3<>=+'(+BE=:*  *=<-%7A6%;@?C=2&*5,07:5588<9$9D:.D798&'8><".64+8;9<;3,854D26F>-C=$%3=D;*3@71 8?:.7E=2)%,B?>I;(@POLHELD/"4@=6+!ƒg,,00>?@=DE-*?D.28?LH?7,?J;56GQK6/3CB.(?B57(?„Z'3*,-8>=//9FD1.A@.2@L8 +7EPLKNPOOEKNO@1$7GM?,1EA2$64#|}L3"*6?>7(-:2,9F6++0=PQQN<I9-:63  dŠpW8;  02 0>7'8HNJ8.5K>2<9%97&79?5'=G9+:F4A<3@:6 /~xoj7>0 $-1!&79)0>=;GA22J;$("$$20-'1&2H;/0GJ15DAF<6]jXgV@=@2#*&#,5)("4-/8=58E3"38.@D:14CH43HML;069<>8& -]K^aD==;1"  !+ %*$+1.-45<8,8F<$5EN>61:269@?/ )7>AI::B><;89CLG9-8@14?KB72"AqkbrVC?5:4=?;%" #7>8?GNM?6;ND;I<,-337331DODBB@=8-! >gdKkVJD:6/4B9606GMLB:6!7B<0:70;92,59EJFI=5-0+ $ V^=VNKB@8-"497%4"48G=45764<;9/%%&77+(.5F<=>FK83393/57:61 ;N0)ACE?C5!*9:) 926;CD=309.24+!463+*011IJE8-B4%EDDMH+2<4525666C9,&/13.2D?3/?7/APH61342:LGH@965." 6>GLPP\8&?: 06,656F>6&3=FG@=NNGFMMIOOQG>=6239CJ6+*26#AG'FOWPbL9:'3&-9CA604BMNPOQQPMNOMKHLPPLONA766B=1475* 4ZO4F[``eD.;5 .3<@814GQJ8IDNA14953C://--1,4KA989636CD4 8<9#GuZp;T_\e‚["58B+8=EMI;9C959810C=6:86411?:.//1-)4;0$:8.shp|6RW^s‹k2"*<=#5<4::615:9AAB<:2,6B51(14/,0!'47U„d‚"^_l‹’†gJ%+686 593.1?78>6.$$+)052361-7@=80&663+#*5&vƒWyu ^ƒ‹Š”|H:69<, "03:@==:$  "#'(3200-)02711(I}ƒkl (yƒ†‡’“Ž]FD6<% &85;;:3(&%&%'%(**1+f„~fŠQKƒ‹‰„€€XDC;E (543 #$#'')*)&%'+s…sl‚1)S^ƒzScNRufUIDL+   +&*)&'*&'('*x†qj‚1%!::;7<87638ONP%&24  $&%(/--*+(33w…~s~V4:>A<;;9=;I? 7996#'&&*01++/* 3t|uxa)!8>7:9<<:==>E5/36%<99F?:*DJ$; ! "&'.//."%cxwwqR<967<=9:5=3%N7,D/! "! &+%/$ PuwvxjACXF@;::8>649>77-A:6$ $') Ahru{uHFfU@>>;8<:789756>OA)HF?23333-25@@GGGQGBIJB-2@34230,//-35B]%   'GY_c_]VQG=37?768+.402@EKFCBFGHJE327:..1/02+.3H[aaZN=4!  8P]_a]D4.336457510558DFGDB>BGC@@9:0/12120-665WXWJ;/$ %@XY[ORCH3341379111/3>CA>AA>CAC@9>?3253-.59>OOI8/#/LVYWRKO;340/1/61/2/7B>6=A?ABA73BF9/10213<@>1"BBD?910.2GD2& ,EQRRLA305/0/-/-+201:<74:15=1+@?A>7/-2@@3"8LKKNED/20.-.00+-.3886564?9 /4883*+08=6#/@KGJID2..//+,.,+,/:63667;1,$*3++./=7&5DEDFA=/-.,,./.+-34646779&+*'++,.2:-';A>C?<8,+,+-.-*,.2412145"'#*%(*,062 ,9><=:440)))(+-/04452131''*(,#))-00& #06;984150)*,/371441//-$)'(()&)(//* !.3765575301321212+*/!$''&(&(+*) (/2322432//0-,--,+$$!$&$$%)'#  #(+,,**'((('*,'%&$""""#!%###&#&$ ""!#" #!   ! !! " !                     -1462 ;;>?<6-CC??:8) 9AE=6#'CNF@<87 &22 *15(/@L?!1=5=F=4,89&.4:;92&36:BE:):I>-=BDA3!.<@2 69.*:?DK9(-:?@@F26H@1;<61%5EE8(@B43AB9DH6('*296A=;J?,9C$#3EC;#5JA4 [N:LF-8GG;=7&,9OQE5(D>#6IF7('/BK=2 '~H )9JF1,?NID:(+8ION=#6M>(=PG79=GL=.%,.$ \|-)8=8630=D/&?M71&".@ROC: ?L=+>PTOOMOA)!3=>:5m!:*/B98HJIJB,*@L5*99KQC8+9HC20CPOB8;M63BIA<4 ?†^3(( 6B>BHGGJD..=N<-2CQSO@6BNOA>HPMA3)0+5>QPOOPQOORQQB4&2CM8#9C1$2884 "u‚F%$#@99%5>C8605KNPP?6GMEBMC04JI4#;J8/7<;7 >bO-  ;>2;@.;40:OJ?55JNMM:-:E54BQ:1K?,3IMA63=A5(b€SO5* !3;=8:A0!#1CLLI:4HC798%5:-%5B8'9M:-:I=K>4=C3( 0~cUB:8 6::7:A51(<@3;K>:I9-#&!*2/(6-2E@/2EF24% We]hL;?6# #.2315=97!64&9C;=C4 +99$7>;;%.AM95IPO:04DMONNORPPB1127LI<1288)"\m9JH?A:;:70=D;GPKA745(Kk:'H?E64./335126JPL@78<871" .ZQ ;>B5'6>=:9#38$07BA>HLOKKLL<5-,=F559.3?6,0>GHDI8#)2&)2/ HP! =B>.25<@8%)990.6AG9:CC=A?;1#&(586('4;GE=CK>3/932:<:;93 'F* ;A@3*#2<82 99767BEG6697320&.694*1315FOMHCB6<955BKID@7,85 4>B:2%>=;77958<3CC40./3300@I:0?>3?MOJ6240?PIK=83 =/>D?A!6=;$ ,485985BN8&3=IJFCKONHKNNNPPOLA:28BLE3%!!!.: <;==.+11/205LPHCD>@DK@16E=8#/j[& "9588I4<:+ %3?ECEMLOF8C5%;E=7i]c,!8249O ,>>6 #:@LKI>8I98C903CHBEAA@5,9E4-.63.47--@667 A{W`4 %976AP &:9H( $98@;375C6AF4)576<>5177.5E;3/6;70-#1<5+(xyrx>,:74Ch# ;=<7+67415:EDC<,02/0/624;8;625>846962  Mƒaiu.-F4BsˆQ*$=87/ .6;8)  &2+.2102)/6::443 yˆonz &jr‰Œp\;(488= "56A@;94%&$&)(&((.2/0&;…]g&_ƒ€‰Œ}m]?9:7B,7;=7"+',*)$''&))(0 Ut~^„E!E&XpˆŠŠ„unsmIB=T( "%%/4.,+(+)+%)Y~€]2$H);ivaF=6:7<99:;99=CGF9<9>A=8<!"$&019883*++]zvpq;-39=;7999:8;89;GSA@>D?(= !"'&666-:541# T|ywpn=:93;?B99817::89CJG(!?D"1A ! #%-:68-53+EtuvsnD8C339;<;;78<==?@:<%$J3&74/ #!!)291+## 5ftsuuN=J>047<8759<>>99<;&4H/B?  '  &Rjqpp[5LB639>;957:984959= K9FIC23    ?gmrl^>_M839<<6944/15;A;L/0Q,DIJKC3$6H6 .2) /Vflmh^dU0578;:6854/35L@T:BAS47HGJKB3)...!+617B2*  !Gdhhgf`e<0658635354554HSO?5HB;FEGH;>1/2987AF77552,0  3V\dca_fM01027811575//;9ILG>B@CEFH<9/0/4;:633720/AUC0CA8+$     E^Zdb\`M2304;8/-1.0.-1B2>FHDEEIGFA<17<542.///21HWX]c\R?2 6S]X\[U3+*208538,(+6414=DBAEAEA@IF=69012312,.6AU\ZXJ>5$ %CYYVY\@=(/3234//-&+845?B=7>EB>>F@>2.12/110222QYRE<0%1GWTRPPC-*0//0300.*(*-:?=A=?;9;AAAG6/22//435JNG=0& ;OSTQLE:.0/-/30-12.1.8>>>:89;?B=@FA5/21/1/DI?8')BOPOJGB120..31-*21/*3@?9;2:?>37;=8/,*:D:0"8INMMJE50/-,,..*-.,,2:<;;;9::-.A;<=:0.*/>;.  )@JHLG7--/,,/,-,-+*.497598693+&<;961)-.48- 2AHDF;2(.*,-,,)+,,,16367740'*+/1,'*,.51 *:C?EA7*+-+,+(*(*'-0326325$(((-(**-05#/;=?=:.**)++*))&*/1115234$%*$)(*)11) &2:<997-')()()*(0370210%%"!)!((&*., &164472-++((*-,.021//-"!# ''$&#',)$&01302410./110.-0-)-.#$!%$$$!')$"(-3000/.../-,+)+*$&##$#!%!!'#"$&%''&#$##%'(%%$!" """ "# # ! !                           ! *-",802720#39;9:9(1BC>:' 1:=:6",:?ACF>1)EKIE?;!! $:><:0/K@34I;/-PM?(0HD.7LL426=JE7#*12) Ts#*-$ (<=;4'6HI0.DPA351$6LOI:$?MD0@RQKJOOD3*/5476% !u_"/, '"/AHIFCJNG/.@O@/&69ANNA2;KOB9IRSLEKP8#3?HJB5.,>€H'.-%2+*9DNOJCJH4+7HI53?MQQPGHQQPLMPPI:1@K4*=MD<2394 ^‡;"1/%,(4COI:)4F7,2:K:25>OQSTSQQQQPQE6+/AI4-CI5.5;<5%xp. 7+4DKL;'1A<4/0HH?<=LOPPB3;MC7GI35IH5.CD-3>HC7. HƒY)( '.1=FH9#'970&1GONGDOLLJ>.3G;.>M9!5LE12GI54;I>6,"nsJ) &,.<>FEI;*( $1=G@GIJI==87+.95"4BGEIG80%9D8215+1<625CLLHD3,22)+692/Q7;914;=;;-)9788524IJGGMMFAA;2(,276)!(3AJDHLL=293:CC??E:/B<7:2(49;<7$8889949JMF>B;6/42-3:7,2513=IONKIDG97>HMED@;2 093<7!+3;;:"679997=;AL95518<4/:MG8>G;55JRNL?7/12. 4++::'#+8<:/,79:96=9;O=*26@MPRTRPQPOONNLJLPONNPLONA2'5AH;96  #K+4"8=;$.=<= *9:7:66?IEHPPPQRPNNMLHFDD54HLL?855=G;2!4KI=9&  RT-/%<;>%&9<<173,569GPRQQOJMD68HKGB?CD72=JB613209:3+>CE=6#)fX#!%+;:<(5>;9&!09?LKFDOIIJ707?BA647>;14CC:8<:212*4D3:<0g[[)0:9>02;:=3",8;>89?NEJB6&-0693+.4;109B?:?G26@>/(0{{Yj9>5><2%,9BA%"#25=KHA<:& !074),001**5<>;85(R‡xju,P9:FE8 4:=9 !5:BHB;92 ')*(*+&'**,/101,q‡uly'!VV]q^E&.79?7/8;996 #,0/0.)(&'&&+..-x€kgd?4c……‡pX>4+088?N  !&/-/020+*,-*(,  ={€avYM(Hv‡~pX=(.<==U)+2;#  # (#563/2)/-+$'" G|€v~TB&0Gavw[677:AE:L/,1=<#%(255<703331,)$ Iv€ywe"8,)85<<69;:=?G;TM@>:57B>=/   $#/582597343-,  Fu~xrpC%=8446::67:=B8IPGAG0%8>C:1   $%58<;30<<56.  Apyzho^#&48999898897:4=G?KA%-*4F  !!#*(098;81/, ,_suuo^6!"4376788668;;>BE -9=90=( /2/%+-*'&Nnonrf=3$(24863656:;8;=13D,);;E?7BA'&  $ ?aipoi?D/"2465336.565490 )-B5DIKKJBTk\   /ZinpaFKB$+243443.,316<'!)&F:?GFKLLHK3-  "GbllhV_X,13777643+0-91/+,$2LJ3CFFHGD10532B7&,16?; 5Wdigfc]?+415662310,22;50+)H;?:EEFFD@1265=M941EH;1.6<>A?9-  "I^^ce_R:,041253..335239==52;<>CEFH>75317B6101;2//9JZ\_d\QA,   1S\__XW@#.0,0;4*+.120-00SL=;CBFEDGF437843433.0/0*21.0/(*(#"&-03BD@;;@>@>B>86313011/110BOPKA5&  ;OUTPNF.(0,0.-()%! $%+3C=;;=?=??<:C<220.0011>HKA7, ,@OPNLL;#.-/-/)(*& "'-=<577<:=9<:9850/+/A@7-*>HHIB8)*,,,-,$),*)*--773:666666;;91180**6=2)4BEGFA/+-,*+/*!)+*+-.53575255239;72*,+(*84* *:BC@?2),+)+-*(&'**+.2540)510/,07740)()13*2=>?>5,+**+,)*'''(,/0343&,'+(%,20-((),0*(6::972))(**)(*((*/0/1/1))% %,+(&').*$+35665/''(&&&'((-./0--.-!&"$'&&%%(*%  ,21240.))'&&())++))+-/##% $#$$#%&& *-0110//.-./--+,,(')( $""!"#%$$#$*./+++)*++))'&'&%""!!!! ""!!  "$#&$"#!# #$"!!                                '   !570/40$;73?;&,7@9:6#/4*0;=/2HE7*  .J=70# !+ '/?GIA9'7BI:AKD<"0JKE>6! 880";<$.A<555%0;IJF:95 *JLJJ>2).( 8;7#.?C$.CB966820=QB/"$%3IC=JD709>709 4.1B=(&:ED+A965$Bv'$ !779<9'3>NKMG92240+8APOH<-4KA11EF7%.BN72:BC8.pT !/) '$ ".5&9PN@0&AM60?L7*/8JM;'.5?;2" 9…,$.#"+8)*<;4+-?PN:5IPOA=:12@PM<);MO:>RQCAGNL=3-/4@;).# mn"*-!/:=6&7FKB@HSL4.;MN8-536GPNABMRQKQRSSQPQ@/4LL4/;OM?24>:-K…B +-23>7&0IQA09KD842EE5:JMPPPQNMPROOK6/1FH13IL:3-:>2$ s{!4:2- ., 4MM9$9EE?<2?OIIMNPOMH43DE3AN:#5IH24KB46?IB6(2 DŠb1<8-#7367-3PF+288860>NKLQOB;IC6-?A09J>,7LJ06L@4=JE7//6&xmE6>:'1<=*2BDHOF2%#'19J;5>LJ55<:0%86%4><*6LB1;OLBBI5%-6:$ Gid**(?K&.9?;,,4?HM?21&,9C@61:E@.--)&0311"7N?4FQKNQG4%7>4+ nPW@-6B.&19<=5&477DK?53;6++:<5"0;C?6=4%+1AQLKROE@KI705:4:.b_:%=42*$35:8'#(.497*#13'0=FF;:ED>AEPQOMMNLGCH@31786/  Or0 (/+#&24151%)65) (/$+7=JHJNPPMOPI=*.15:-/830]E65.&@5!;7:9:27@:51;DFJOPMA62=C443*6<8:HMNM<196.(+9E6"EJF?3,B:8=>:*'$99896;27GG75FQMDEG;222240''*4JJJMLH;47FKFBCF<3%-1IT9%6=4:7::9 47898644HLLING612851>D4086.4BLNQONM?@GOIHB?:-%02"Ac< /:.888;9.-9888;56JHOF<83=DB>?MODDMFDLNQPRLJPPPK@5/470)761/ZC!62-867;8)7878<4;B7IH78BNQOOPTPPONNNSOPPPNOMPN:.+9@B:-:8+ OF61#4<898949666@<3DOAHNPRPRNPNNLPNLQLPQONPNNO<217433=;137=FED9550,2FEIIA9&HPX  197# 6;A8 8*35/8?MMRM:9D76;;;2,%/5@2029CJJ:2-*/;F2;F93 $aR5 K497* 88D74!!/356;=DOJ38;4)/22."44;5.14@GHH<1/6DB-7B7)f]m!+":7<. 8:<9C0(671.17BLI9:6B:0+25866CC;@G:(789L~Vk#,%859: *8;:K1(38105>LHC>;*6770%*.1)'5?DC?5)77,‚^/X399;A $458?L!)86BLLA;84,-.*),**(''1243'-8+I„‡vƒ6g7I=75 036:D5/2;<<:94 *556730&,&$&,./&,-]ƒi†'4e9tKG4 39;C$1&9<:: $7947>9:6213.+$$!/r}‚z€(>$2?RT<=1<7:=ZL>A:85AG>;   +):=?88<:8;969-% 2pz~isQ-8%:752.&!3DKG:69]J?7@<BK678;40 *cswwhqD+1396,$+./488:1G5STB%E48@  !/72)7;>>@509)!TuqvumM*/0755466865580K>44%/+&4M"K7!#778.*06890#HjonooG16,44476575869=0 H,?;?EqwX '15377/,*) :eijppK;4+12533736977:5  .C2KIIJNvwF  "&$ -XdkomF:S5265432535352)=GA=3/0@MRZ[c_L65T\dcbZA*-.0-23.-+%!7)+;@AFE=410<@>>7/1702341.-.-07RSQM@5- #>>7614:32/200./00EQKC5. 2EQRROL4%0*,/,/($#**86/>?;79;4?=8./1-,01/7CI<1' :JNKKI6(1--*)+,  %211;;77;=6GE<0.,),/-3?A9." -AHHLJ;,+--('&*$##)/, 676988=//**'))'$!--**,5)*(%299<86<9873.+'46/%  3:@>>9.*((',()#%+(&-4-22139:1)09964/'%.2.' *7:99;5()&')*&&%!"$)-12//16/+++0334-(%)0-(067894/)&%+'$%&(&$*/+.*1.($''),.'*$#%*+'#&/3643*+'$&%(#$%''+,-+,+#$#&""+)&$%%('"  '-//2/''%##&&'()'&'&*''$%%! "# &%(# ",,,.,,/--,.++((')%#&#$ ! "&"  "&+)))&%&((%&###"" !!  ! !                                    &(* '-( &#472$*>577722;<<:8=;04:72D2.6==6-09;GHD<)&'6B=-(E;()09?;,  ',=K?1/=:(4FE8=H2#.84(,%,6+4;KM>/7EC26LI?/+H@/1&(#:7&0>>$,:0+?K>85%6ALDIGC?4!IOF>4  4:-4DC9.C:&;IGFH6)7BN8,756?KOFDKG8&8?J?6+;PRF5!?LH;DO;&7MO:6:DI:)ƒ[ &!$,5-">OOLEOQRQG>7.>G5#8ADBCMPOB7?9&DRC0=OMJ?5EKAMTQQNONOIMRNMQ:4;OG.7MI8/.=F6+2 Z€C \?54:-*12,HK1%:EA>>:>PROMNM?IO=.;H9(3JE-:O=07?K>,-86 $ƒg3,cI>2<9!7;33LB 3;8536BN@:=L=0>F:.9=36IC23II28M87HMC7,4<: Seo>j`7"'337H`]7GA\U4 8>JF<5#/8KKB8#0..+48&&9A?824-6BPRRQNPPL614<<5>6(>ds DO*'$7=?85689>B60 468-$S #,4&&(.3:;9;<76$).*3@MHKNMOQOJFLNOLMOOB74,*,7( JxD8D8 "',0/2540$ 4711  &-3565?MOMI?88@85IOL90;G>5221'" )W_FOSV: )7>4424.6<32/-02556:FMMPPHG=.$.0/;LNJ6)440+/5<2CUhIRRR"/*499799199450448:?GMK>69D856/3;:=ILLD69?6-$8CD7&1 $NnFKTM.&;<:3!--67862655@:<47@JMKNJ98=3573311HNMONM>.>OKGBGF>408"FnONRT)%B7=88%#96685563CKE:FPF@AIH=HN?4=@59FLOQORRHEKPIFBA5+'39& 8bfNH>)D5=;77!76757864BNOOLJFKMMONPOPOPOLNOOPRPNPPLF;0034-17<6# /IqSE/#;:8=<< 55678867IDOOKKPPNONQSQPRQQQQQRPONMMKE7+09@C?5=B5 *sQ7 "7>65882(968753@C7BOQPQRPLNJJLHKJMNPNQMONOMLB7-4>KF:54>:DXP*$36;7;<;897686D;3@NMRRJDDB;899785BH7559GMML@5..BM60/64 3JSb;25*5<79;398889916DRPN@88=@<500.,/4E30/,7IM@83.-9KJMF?=5 TUTT$74"36<9,;9445638BMQG6768<:721132B6/2,3AI=0237DF4;ME<7 9N_2 '74$2:;9(&867258IM>3172#")21%26>G>5.,6ADHD==DL@-5C<1'!lPZ 565& 47=74.8;;0,5IJ:70.  "118;@7/+2328DJKKL:$6F:( qfgCf%)7:4%;87;- )-376*%$)#/9AEB<3/<<1C‚ngMM-?45:&:79;L<-5;:AJMC::"  %'&&(%(,*+*)1235%899*p„}zjq@X<7<- 787;?Q679<973  /,-2664&%/*)++*'465%}†v~jDXI76* 6;<96@   5=6:<<6/)))3.(&%U}rt"03O{ƒ$F;.377PVI>95A$5B7C  1$3=>;<=;9;<:72(% Vry|hq=46=E$#K@69>)_>076=:9C<= %-4.099@;;:;92-/,Rxv{svH89746(<=4==6:66;A-8C4@ $'/561'7;<<<:5;84%Jttzuok"32553--DM>E)334240083+%,=;IGeW:9FHHEUGP1!/61976, !LimopbBID125:215674+ )@,_k34CBHKMC=PD %! ;bllmPAI]&61512145<-+"@F:n;,AB@?AG9@IH)**   +XgghW:P[)411-0532=03%'%.=.ZL.=ABCFE3;KTFE624-*(11.()76AEB-$ B^fdWP\W, &/33,420/ %#/++J84CEGJE80<7FNU91=ICH@924:AV]^bfN80Vbb_a_T4,/03-15. & 5'<@FFI0-.02*0/ $ 50ACDEF6217LL7620/1//05DOQV]VL9/ -JRU[YWF/2-/+)+18+  +03@DB>9431D5537451/0.0DOSUXI:3"  <83216A/35310./.1JJA4.  8GOMMLF3-*-,-&-. 0'7@895/26DD<..../**.;BE=0)-?GJLKF;/..-.*!(  %+#4;89300;AD:2,*-.-,2?;61%3CFGFE:,0+)-,$( -*"0:783059<<820(-/&*951*& '9CCCC92.')+(& !%/!(4527471787;5/25+(270)!1=>?@>8*())&(##%+-"/64196*),64720/+&,3/(+8=;;;*,)&+'&%"$!&%+)(,-./33.,+3/105*%(-,(!085570'*'$&($)$!'-*,-0--1//.0.'&,+"&)+'# *4124/%*$$$$%*)%&.+&*,-$+*'&)()*0($#'&)# )..00,&#%$'&(%&%(-+)""#"#!"#''#"!#&$# %,/*/+! &%(+*)'%(#$,$ """%"!$&" #)+*+*')'&''&&$#$$"!#!!#  "&((%&&%%$# !                                     (12  '/0 56725;;9# (6.#>BDA=55@FD<>E=8#9@=+GGFHGC<5  -+:?9ANJ8+)!;G@-&GHBDACE@=+ )(!!- 37-6MB-*96&7GD8'5HM>61/9HLNGBB<ALJ6"#%(*'&S;<8CB2>H>8#$AB(4GPOIB93?NM?7;0"CLJ4*&'&*4546m&%:=FNNIQ="$*1CE-/98;COQGILG8'%8KNMA6#.+,573i^#1;77D; 6;CKH/&/1448JRQK?*)7:GKMM@2/99@GHKD5%.‰C # 3/$&43+=PQPQC>ACB;0:PQK:*=HKKLO>."9FJLJLG7+!1" aƒ()!(7.&>:#9=5"#3GSTRPQSSPNA29NPMCCNOPOQR@3:HOJAAGB9-'9:1!‡k&-;?:H;1BJCCLRQPJMQQQG=88GPPPRRQQSPRSSQROL>7DLE7"-B9/(IJ/&08/CSG9EOD?FIMOPQNPOJLPOFEPMMPJEKPM8>NF6,0@I:077?‹i:B(&9;?723:5JK4+;@838BKNNC7BF6=JB22E76IF4=MK9BO9-7CN<)2@:1mqUD^3'&5F?*9C:GJ<2,:83:=9,2;3.>F23LN?GM57GLC4,;E9/ 2kh<Y^>/2>LG21;DNPE053##9;5;HNL>2$,%'%(0'#6?A60)%6COQQQMMN:/4;H=;D=4Vz< *3<."& 7BHJDCEJH=6),*1.!$%*=IC<@95CNPNONOQO;0127?70:4Bho)ELK."1;>>BGFB>9)!"!*(%&!'"5CLOONMORPOOMOHILD90+1*3:5SLLKLPK3.&-1677630"$43,$*" "#&*03DNNNJAGMPQNOPOOOFJMKILKMONNOOLNLHDB>11+.?3'=G@=AKLMPQPQOOQONOPOOQMLNMLNNNPLA81-22.7><=56AEABQI(%4998--85466822EMOKQRPPPKJKLLMMLPQONOQONNOL>//7:9=<5CI6+8LFNOOPKB>8889889:KPNOMLOMLJ9..9GLKC@@G<0$A\NG`N$#7896: 1645756A<3:MNOF:561,,.1--1AMI?@?BJJI;2/09JJ535481  CEZW{pT(':89860 (87:85;654=NOD8.352,*('%26@JD87314GG978;CMKLB642$HUesrnE,.::9878675265573=OI92)353200"-8?BHD<82.2BF>>CGHH68KIA;3 JLSVh^J(+7998589%/&177<51;OA7--1)+,&##0:CGHC@5//9CIGGD@AA50DE:8 BPc@-7.*5:8/32895'5;A?77AG983+! .29:5486-&-3;DA;5:8,.D<,& .zYm ")8:1'-8761 )7<@?DKD<:4  +//,,./& "$18:5351*:G4 m[sGI"">79,,76=K# %7:BHMJ?:9   ")1-')&(%*001+-9HD8! .‚†l~&=U-E=7% ,57;KK ):8;;880    $)+-+/,.-+/+,(!6>>=3 O†‡s„:625K;<#+57:AJG%,42'  56;9:7467331,++,214dƒ‚d…O0,*CR88# -567:?c$!>4 #'2"  #&&439;;<<=962+)('+!kzXyU-,<@l=. -38778EU1-3386  +!.;@=;543433041'''-nxzxlU*"FwW: )46:8:@)<;; 06:3'86302* 3nwvxwu51?I>)!*(267TF8:7669@'B,K  /27>5+6=87;@A:961 1ivy|psj)3680 .>?9:@T>7776>>#HJ !,  '5;>6+.5677:;17.  +ctuvupjZ 44446?68GHH=:47<>=:\> &0N;",79:853&#*7:33 ![oqqslf\(1254  ,:9S@GIAC?DGE=RJ*)QW=</4858=83-,.1MqsmombRU!014.!4C;,T^GMr•?1EC)RVWEFK$/2427<;8,*>fmnpqRG_92126! #1a^4IB;BGGCKPT&!(./.556* 1ZjhmeI@ZY)/24) ! $4Q79@FMNKCAFUNE801(&,#  7YdhY=F^F)/141)&$",>&=XGO]ILp28EE=CB:=IPF@@83135595/60/>XbbljU; #Lbc]HP_Q<+.13/)$ +1.OLQXN=BG=ADFI?546:FPF=6-09A>400/4LTY]R?3 (IVVWYTSQ7(-./2-"&/15,(-(CGQRD81 .DNPNSPGD0-.,,,$$)!=;5334./4DH400220./.-2:DIK>2& 9IJNQNJE5-/,,,( %";964611.:BE;//0,-.--13=EB;/ ,>HHJKID9--,,.,%874200/1:9@=0,-+,+,+27>=4-  4CGGFHB8-.++*(! ,481////:68<=1-+)*)++2481( (9@DBB9-++*+*' /34/,/15625984-('**&*340( 29???;0()))'  %+35,+31+',0554,,,*%&+/,' '7;<;97")()'  '(2-'+.0+).(0.0..)&")+)" 0688831"%('$$ %#)*,,+)+0++$/-+)*("$%+$(1533-+&$''&$%&%%&&&*)(*+%(,*''(""$$# +///00+*!&"$%$)&*((%)))%!&'%$')(! ### !)+--/+(%#$'$#!!#$+%!$##& #$"#"#!"# !$*,+**!$'&%&$$" !     #'((%%%'&$%#"! "                                         /366::84*- (%'::=<>CDA89=2 +/7>=&, (97&3ALLIJKC=7#=G>!6;:>AE;=;/  (1==)9EGGOK9031">HA-#@BAEHKGFE:86#44*6<67A72JD,(2,6GC1 ACEGDEHJ?-''6?(2>8 2;<9.4KB/7?;12GF91,EMC23??(&:?=8447CJE3.AK9#9>/%;PNI92%27(8=6&#0"%†;!.9<:AIRQTF/.+6L:/;@AFMPKPNK:285*HM<*$*4.*%05<2 Rw / +*%#7<6EC'1/3=P:"34559KPQNB/('$:LPJ<, *)/76?D5(05$]#& *1(5;-!,!7;):KLPQC8:>B<4?OMOF9CDCKNNG7*347BIM?1 1992 ;’B $"48>1!>A*4?:&*/DRUTRSTTRRN?EORRNOQSQNPRB/6BFKON>/$&6BE7& n…2/'78FC:F?/ELBCJTSUQQSSTROKKOQSSSRSSURRSQLNQPNMK:5)(4E;:7 &‘j%0-348AHL3&0EUTUXSNFIOQRPQOQMQRSRTSTQQRTQTSNNNKLD9!%3E3?9" WŒV=( +.-'$-BIA9JRK@IL:18ALNNJAEHCCNPI?KNNPPRRQOMKLI9/.7F91B9.&…rAF..:ACC9)1=LHSK5-8;0&67>MF:2585:D@8,>@3AOHNPPMLN9.4@M?05IB9 F}t%\7!366IJ61BKNRC260#),*-8G8/",,.920+&88'5J=BPLKOM67EME20FE:4  ifV>gL./?MNA4>NSPL@?6#'50%694-/!&#,+")2C66NOPPNNONA2->B3)/) =eg+!OG36,7F65KJHMMNONO:,"54525'*42$/,1(&05'-5.5PPNOOMOD53@J436=5%6`__gR&/<5)8ENPMJHJE9+4453$$07/.-+51#8@@6(.BOOONNNN<8@GMGCFF72  -_&;DNb=#00,0:JNK@=;65341+)375+*/54)&=FFF>7ALQMMLPQL512146/.A:3HxiAHHJHD\& !-378856674263=<>CLNOQPQROMLLOONPLNONMNNLNKFE@802-,C92990%&5LW6*),47867685375@KMQRQRTPOPONNMQQNOQMNMLONK>3201-7@?=C;52;3." -5PL')7(696667731?DHMPRSOI@7:;;?BDMPNNNMOOMPNF45<<;:?ENB063 &A8757JkC"4?6696537825IJNNNQG62.0.-0.-*6MMQLMLOMNLF=AHMKNKKND60)  6E?JLYouD(6==127887664AC=GNPD6121.-/.-*+7FKDDHIKLLNJDCDLLO>49>>4  FP[\ls~€8/77;>"877731;::;CMF7/261*&(/0*/BH=?EGI=7@JLIHIIMPM=1*.& 3AYi|x†x-8:667.-;433728AIJ?5-6HB=@<9@>9KA775GURsr€S7887:8>.1344A751--68/FIH@5]CaCinvvT+884589;&:09;:DJKK71152/+" 335684022 ,5990,"(-+1GA174Pjm12S_J$37937589-:9565>>!+677::9* &&.32752*-/*%7C7>;6$rŠ}„<BF99856:9@D@5.44.  .78452-2+(861+*.2)44%  0{…{}ƒ*$_F24-3!  31-9G>87BEB@>6141,1%##    Uty~jiL1a$TktE+ +*993NV7;869558*;3<   !64>5338;?=F@B>864)&Uyvnxws7+Xnp]/ ".6737G7977868;0'.R   .:6?:7,;:78<:=;82(Ssuwvmrg2 8Zee; +565=69897857934c9 $% (2:8=4626::488844' Nnwyvoqnh&(MXR<%184?A968854:FJIe*%HM)3CGBA3IJ2"'27346;:66! Mikki`@`bYSC5/2 :OE559L8BGA/A>S@<2ODL[W@-13-2,4( :bejhN?R^QM<3+/  "!ZXZQ[H88@@><>9>?30..162.5<=0=4,/9KX_feV: 1Q`aUIZUTTNA1/. &@+ALA:1/6H<@B2(,@=899;11.504CGJE:1+03BSV\^K6    %GX[IFXUYWIB,*1%*9#2-774714@B=B-$%69?CAA<3679@KME71-.1ASSTN;1  9ONPVQORP;D+,2#-%6%!D88463:>>=.!&49?FIDC31138B;32/-0CSOM@1* ,CQQOMPQH7B0+,(+,0761/07;<66' )32BEG<14577.-./0.0BKLD5,  :JNLLQQG'93+,* -2$'93/2229924-%.2493@60-*-+/,-.-.8GG?2)-BKLJPLH.)1),*07+-/.5..6350'.5=>5?B1,-,+++*,)2=B;/)   :HGGLEF; .*+->))/,'+#.654,%2::)2<@4)++,*&*((5;6,( .?DDGC88*-),, ="(+##%141/)&5<-$(6:3,&*)('&(-57-% 8>?B=98:,(1+ 7  $ )22..*"-,.#&663,,*((&%*+0)$.:=8;5570(/) (#*.*-/',/-#/,)-.(%&#$((&  "39175112(0 %$#*++",/,/0+(-,%"$(&!)2230./)*-" $&##((+)+("(,-)$)*& $&   ...00+-++%! !#''%('(#)*)"%)%"$$!"!#!!)+-0.'(/$"$&$" #"$%(&"##%!#"#%''$$$!!" !''+(,)$!% "! """ #$##%! !!$ ! '('*(&%$!%&(&%#"#"!  !%(&""$$&$#"                                              060)/3211$$8<;98:A67;7><84* ;8"4;@A?AIE6";>00-$#(8!5:3'  #'89@5,;ILNONLF;):F91@7J?4II5-14*4JC*=4&9EMHK;)4(),=?/NJ27KH20HI:!=HGMGBLA'6DD@8  45@MI>F@3=O?*4=43HSQ?4AL?MOMKLI> =A:CVVUK319,4K<-=EHHOOONNLA>?=#CL7,4,9B;5/877*‡>0-79(-'0@:ED(-0'8MC01544@MPQQL988.0JO;3'93).3BE7)03/Iˆ'4);:%$+1<:)0%6;.LJK=CC)5DHADMRTVUROUSRPQRSSQSQTSSTQSSTKMPNLM;/*$:CKH=1% t†E00;95?GGM9,4FUXVTRLA?FSQTSTTRQRQQTRTQQPRTSSROML95++5>LD?6)0†g0&7 !10'%+++@PE@NUN?AC8'03@ONH>>B3/9CF;DN<4. woSRf/-9>?OQ@.9QRQK;:4!77-4A9,31+ 7-/2'2;03HMPPOPOL:5@MK<=NA;6-Ei&djO##*->MONCHQPRPNK:)547!27/+750$)4488$( /BBFPMNPNNKNK::F=*&45) bTS4:98'-ED1?MTQPOKGE;.274112/86466685*'43)85@PMNPOOMLD>JM837@9,Pcbc‹„wG)JQM;296* <<'"0NONPPA603242.+/2DLMICGILKLJKLNKNOKONN=125)=E7K>Bjt~G1H. 5;720131- &AP[Qaov{~75FS%.:<41126GHLKP;+07@>746::5/7C3,44?IBCJAA@?<@LN=0/4$ CCVZkvzzl*2;>2"754357BFNNQD8.6@B:47;<4+0;7.07;C:03@22/1.2;=L?23- -?MVs}|ry„W4367*;&4'19?B=LNI913:C=::768+4=90/6=:<3.55+&%&)2-5GMD?;" !WW]qliˆ‚€kL<8560@+/8:<4:HNB.169114,(32./85330%'34.05311*9KFFD9.),1..+'6752CE?IE87 nŒl'-, AE@?7548+\*1,,7888+%  (9.("'&-72+*--'7?94F82!         *}†q€k( fG7442;A.7b7,&-50   (/8=;97:;9066-(*+%161         X€{m‡y  ,~N2353A=1@V=."   5?71474/21181,'*&,0           f}nL}v =rK0.78@6:725-2,4ERE " 621:8>@8)3;=;849>94-  5itypxkrfYU\qcmj<65854;986666883:Np( $,27177@7441=;5GMCGC.)!/5:9'"25/6?8;:8;=5%Ahjpnmikhfcht_UB)6/<73:=DG0 /1458B=?DF37@@D?80-/1FUXZQ?3       2INJ?TRdR!GO??$ .+% *(1357BBEF&$>EEA@C:-6C?<8?C5-00,APOP>50        $CEIIBN]K2&==8! 5( 9,+466C=A:3 @DC9DI@.25/6788,,/-9NMF42$          8AROTPXD?&4?3" "% ,<,.18285<:.MMRQRFD?684 0 /80/,/35446*7=:1=>1+/-++)*-+*2?H>-&           %1HNNJOFGI6<2 +" )51+*03557;26((2<;.,/+)+(&+*+8=:/)         #@KFHH;>@:<. "A +52*-416467-/$-2:512-*(+''('/53,)       5BCB<17B;/*+8 !...058<4-0*'$+/74-1+**+%)'(14*(     ):=9<56770#-;+%.0471/23-$$'032/0.)'(%&&'-)$     268646.8/ $)&$%32*')+-#(%*32*/1-&&(%"#).!    *3505.45(    (0'%%*(+((...*+*))'" #&'   10*./,0,"  "#&+*&)#&)%)&%&$!&$!# '*'++*((*$ !!# !"""##"#&'#'!!"#! #&&,*'%!#%' ##'%#! !%  "#!"$"!! &)'%''&#  #%     $&&%#""!"!""""" ##                                                         #+-  %)0;:):=8  &)8<-/45665EA2=E9?;:??17A:'73::@;-6>BGDHLB4!=H72-"5:-"5&9I;8.7A17HM74BMPRQMGE:+:I?'(1$->8=F6*2$::D13E0*:ICCOKGOO@9:;16HC1!##5FJG7#2<7#$28A:4F=%(7EJH91FN:KK>&%7?8'  8=7)%=F0:G=7/3318JS?>ME22HF3 @?49INK<'%8DIB5/i!1?IA:5CJ3LJ:I5-&%(n.& )=EMJEDESWVN;9=8+CE.6INPQRSSRQLKH<$@OA;8+2BE?:60((& Nj$4(/BE5462ABHG0.2/1HK719@GOTTRRPMHD<4GN8,&6@@79B62.0:7'hX !1>>'.91r@'+;JD1&3H>/7:/12DUXUTSSSRTSPRRRSSSSRRROPN8-19FMLF;.(4:?011 ^1-+=DLROE@M5+>MDAJRUUSPSTTSTSSTUSRSTURSPRQQOJKNQMA70/6>DA157'3wh(**.>A;3@TTVR:7.0567/2B9-1231;?9602EFHORSRQONG;,*3DNMNK?<9.8i[!$mJ);HLLRQOBESUTOK?6(78:02;4/79812/-34/871GOQQPQPP?2;4&fpZ9aN.#0::-5>9+(0&3<=73337>94(&&:LRQMPRQQMOPMLL>.+-56lH3,,@<07BM<4:GRR@99;:+/:;463(5?8179:@5600708DNPOPMOPMPSPNO@64;<1  cxO/‚‡‡~X.6799>5**+:G:8CPPNPPQOKNHI@?BHJI;44Cd~R{|wspqn"&59=8!9I:20/""+96434:?:8:99;5%#1DLLINQPONQQQM@220-.4AIE=4L‰v}[??>O_i.714DA3122-$53.5885347=873.0:LOTQORPPNNROB<0,746BD6393  9loTJ>9@Wlm_!-9:BD/243+0;7/ :;1,Y{~W #,59775&,.4=<==>>DIKOQRPPPRPPRQOOPPNLKNMO@?CD7-372:8"!Bztg,.868989/+!126DEEKNPSOPRONNOOQPNQOOOQPOMLOMNHEHHB3-44 67!4kH\B0. 568646745)2:ADINPRRQLJEECDEFJLKKNNNQQOOLJF>1249HE712 5:*4lHK8.,789745763438ENOQRQLFA=;458=HOPOMLOMQQNNLA812BEFNNG74$3<0GWARC/,68982951536BNRSOOIFGFGHEILNOPMOPOMMMPNNMIHDGOPM:KScNGi{|zT7%#0:694414GIJJ@811BMIFEHKC814G:'/.3:A><201647ENA187%3 AGIP]ixu_MB/#$%898405E>FKD901:JIFEIIA2/.;@4001393371,0252/BL:3/#4 9=OYhu€wz||=<<3-%)$,55:E83BM<455E?>??=86,2:>7213331(//$06896/;152,"('//5/*,22,$ ())B>4ANL=20$lHO$TŠ›Šs}\O:>462,; .52878H7.790##,'/125/.)'',=;F?26LNMG>;+ T{_\(%EM70@L=<47//#' )'125F=647-  ,076888:9:882/6;8/>I8BJG>.y†l&  R[B>:637N  1/05984,1$  38;87.-+/2//3(+//4B>0?@58   C‡‡tƒF+ )`Q<>94;8XU",H?4-  4,-+1052363::03.,-52395*a„wv„l  =rVB<8671ZY>F     ;B<;;<;8420583++'%0/'q†~SzyWq`H7:587I`MI3  )  +37@HLF?857656896.('%(  8y‚€eyˆ #jwj[>9765TXT9<81! 0:7  ,7?A<;@GKIHHGE?542/'$&      B}x~oz~F EfstnO:7:29D348753-084Jh6  669=?>?><=?<65-'         G}|snv{^ZiiqxY:7507D42233/0197Rn1 "3#/7:AE;869?:7178880+     Iyvxn|vY=35Ubqsqw`@652;7033340058Car%'&#.8!036:BB59;7>9/.4745( KistrtorbjnclmmmvdK4126954646155/Xil$)) $-)" (-39=??:;9659;1,33 BnqrvymeijpjikkjqjP1*3656684658ADhlcB7!#&626$#$-5;76@A<:76575'  6jppqtldfnneakfgdUI4"67369898>ZMR@CaN) #&/:5/'-7;67=9?=;;6, -bpoqrnjc_en[egd]`L3759:=FLEGMQCJN@4 #!*.6[PM9"-2641=:69:65( TnlkhfghbViU^a]i`Q787JFCU;AVbGJIJ;("&23@D:OWTO.&47/4;6:981     CjhjdXPkePOGP^`dZQK0-3BMGEKCNEGDC: -47SIH::@P82+#'//4)+ #+0OHVYJ/      2ageVGMklL/2K\\QSP?&$-/46545F@('+% $+.76@>:545/;64/,.GTVXVA1          KXNK@YQVA7E:<=+!/+21--00959C'22/49@8@DBD>4?AA93,0-DORO@7)        ;UMGAMOC>;;05< 6).11.4-,9;=7)9=A;?590 "!".0.0./,<<26!7<>@BB76712>B:5.//,@KHA1*         AHKLMNH=;<64!.%/1-+/(082-4542;<9A71.*3/,1.--4GH@,#      8CIGLHG;6;3+#$)+-/-/*391/1 20.0014/,,-.(*---1<@;3&    %;EGF==6?A4$ (+-+),-0,3420.11+,+,00.+),*),+*697.)    1=B><.6>B/ 5/--+),2573.++'.+,*,/.,,()''()023)&    #4;;9:335# '8+*,.*-5.43-,0$.,**)+))'%''('',/'#  *475923/ '6&).1/240-')()#//)))-,)$&(&&&,+)!   3634,/% !) "2924.,+*'&*$**)(&'(*&%%#$(%$  -101,*"   ('"%&%((*&)$''(%$$%)'$!!$#"!#-+)+&  $$(('!!""%$"%&!!!#"#! ! " %((()( '!") !"# " &"  "! $%)(%&'$ "" "! !'$%"""!!$%%##!$  !#$%%$%"#                                                        "    $132."#) &16868- *0-9;:83+5:+95 67891=A3*02451@A35EJHFCGG=-'>F:%+8C@A9;F8*39B@AI7(:JFC<6@C<& ?E3-.7;<07I79IPG99DNPRNL:1;JG=6->A<$!&DA,7:MQNRQPQPMMB8(:KI>-$:==(8@H6&><%$9DFL90H>1;HLOC;KOLNF:,8KJOQSTRRRQOPNJCKKB4,.:HMJA4%(7=6OŠ$'&>G>8E@8I:645B7:B;CRRMDJQSSSQSQRSRQQQMQD.4@KKJF7("$1.2)/020EA?6">W',835FRMDPA*5LHBISWUURRTWTTTRSRTUSRRSRRQQQTPOPNM>4#*0/=JEE<3w{I( >ITLRWWK93554:9=KFB?CFLMPQSRRSRPPPPQRPO:'.:HKMKHDACA5  `bk:L"":EHKNIIJFPSVWUH8'57:<66<61:ED62455@78?;JOPRPNPO?7COONKFIG1+fl/OM4'3=EIOUUNLUTK<=B?12<@4+1.8CF=148@FD8113DOQONPQRQNOPROMJ<#1/ *jE&KTI3#6>BEM@22MR;+'57(,7A=7979912GLKOQPPPSQJNQMIDCIKLK>77* Fd~|y`MIRm5..6A+6HMF?7&$1/35=@>B@<<;>?A8765DPQOOSQPQPQOMC60-.5ELJIA2'#PdD@@:GIW: 66,:HGEC>7!%*428@CC=8:;<=@6:BIQRRQRTRSRSROH4,.6>FKI?DCHLOTORRRQRRQMQQONKJKNJ:30-.9E:6+B48q†d#("38212$'6@IECGDHLPPQPSRROMMMPKGHMPLLMQPNB=:402<@5*>3,i„rk0%4/5686"%13@GBALRSPSRQKDB@>>;9;559ALQLNOONLLNI<15A2=)$^tYEI+"247366520$39BEELQSPKC;7:94/)'&).17AJPQNLMNGCEJOOHBA7&!:")axX30'68579:63(01;EIOQM:2654241,''0<=AGMHIMLKMKLMKLLLLNOPQH<:6<92 587q^5C1.572676545?EJNOKB<?ADNC306=EB65@LC01:3.10.+207@DIKC8?5(D@0/1=G@4+50./.,&6=>CBb3-@- )86=:42AB359HF64<<755/196651!%('(.11:HGIE?JN9.,2197@:fmuuyqw~ƒ~^Ca7B0:5299514=E24/2&( frd95OH2+!,LiU860.)?'/46AB7386' 167337<;9;;<:6/.9>3AG4>J=5$1|tt_+  L]QC84mK"& -6:77-5/ #./8>?<;9978:863,*219A.6F@=(  cŠu‡j*`\LD54]v=+BQ,   /85//3/0/,11120/-/*37+8<15)h…sr„9   8ni`K94TxQ2:   '??:86878;:2.671()#16( L€†ojqg RupbQ86JZUH=3%  (   &1:GMJHC=:<8433826+(&(&^…wxw (hnvs]:86aV<5;72+!7  %(651(&&' f~€w~~. HnutrlC93B477795454+CeQ  # -'-:EF?:>??>=9:>>;74*'&gp|uvqL ,^ostttS723777368655;Xnl#*!$# $71.:8;<2132475"      fzoslpgeJ6Cfseoiprqd*3<7.24634588pmg71"&&$ (15137=CA9679722+2*         axtomƒu^l]yuwfhlnnoI 9<1/04471BRUmkn\($##3!,!$34/28@BB=05676/!      XtsotzngUGskibjabl`V=3.1456=J@Rh]elP"# '2,80-4/16=8<9;::24/        KnxmtmgjnBFc`aqbbjYS$714287=73[[HDRV;# +2=N=NB,+%.7=4?24<=40      Diuipg^lp]8W=Fe\ghSH&71F?:CCD>PNLGD=%%34>QXYGZ\<&1872:50357      2ZkgnbPdneB825DN_aQ>+92758678:CMKG=:414:OF8<8UPG<.252821).256&         #Mei`W?Yd]I/1?-35:/39=<57GC>6-&;A:=9410:C0)-687"-054?U\dn[6       A]_VBASaYA?8@EH@A6;&//51>B=545E=68%A44,:;522034/471,40.32.02>V[iia=        5QbVM5M\QHJKA@G;79:!-39:1/661F-5,.4)/095665<:59:?:35110143K]Zb^A'   'G]SA::_SJC<;583103*1://21.>b2@*++/--6<@@@C=8BG64415../2HXX[S?,   CTI@220/111'+21164113319!(+,)+:A=<9>;96787582.*1GPRPG8+ 8LKA;DTK82,-0.3/#-,,/0130221751861006:=>;?BC64BA:2.19GONJ8/$  +EMF9FLC44/0421(2%-.//00/226=6"+7?=:;98;?>CI=1>7/+/>FJKE2+ ;IC=BL@000341#6/-))-/10.04221/-/0<4677:5461&/0)),7BEF@1#/FE?7D9.1/10552,/&++.0./300,/&0+/0/22.*(*+3-+(,2:?@<.' =C?851//.1! -5,$-)*,+.360//-(.-)+*//+((++')*'*0698,'19=:59.28.%-'+"+*/,+0:72//0*10+)*****-+'%'''+033+& #1<883-29 !!*$$-.0224<580+++/.*'(**(((('&'&()++*!,209213*)-(043-:7.1/).*+,/,(')+'('''&&'',()  !.352++ *."(.1062'1.-*)(,*-+(''''&$(&$%&"%&" +/0/)& &( &/*.&%*-)' '*'&('$%$%$&$%!#$##$"$*-,%!  $)''),)&$#&! "%!##$!!#$#! !! $))#  "(&$!!"!$"  "!"!!!  %$',% %" "  !!"&&#""""#%&%  !###"#$$$#!!                                                     #-130. +74' '+ -5;=8789# )206>=1 09;99>BFF:29<2'8;<>>FD9(6/!(%)9?=5=GHGF92C@4;>JMLJHB87@A>0:;;/7ED48ACFC:DD9)(:FMNHIHA9;DJ:!+)).AIE<4AN<26CKHJK<61@LME@JKC6:GC'382*#+:=53IIGMQME=FQONLF4*8GOK=;GJ@17L>&?912+587=J>5B?2DSQSRPNOOLG5)!B*#"&=@A+.=IOM7HE,&.:89;4GLPM?,-@MN@) 7C>3J=!16 h=$659=JM>8:LVTTRK63>=9.2LSQROPQOOO?'>MMFMN?/+;KNMB1)ˆ%+  )LUROUSVUNJL=:GMC56NRRPRPSQRNM>;LOOPH<-'@MKA1)Py:@DLKUSTSTTRR919EDKOK?EPQQSQSRRRRTRPNPN<1*0>NH>3*#6898‚_ /CNMVTJQIA84D::GDORTRRSSRMQSRSSRQQSTRML77=EOL:-,7.5>EA=5=@ #.=RVRNO<02266CUUUUTVUURSRSRRQRONMQNQRSOORMNC03<;@DA9=8 ry4!% ,FXRQN7/DJELUTTVUTTSQRRRSPQOQQNNNPORQSQNKO?0"/8>AF;;<90!0Œb)!8665:ITUSR@?PXXULIJLMPSURWVVUTSOPPOQPQPQQQSRPMB2&28GC=:2457  blk(";CMRSTTRTUVWWUS=/388EEFGKJJPOORTRQSTQRSPNNPQRO9/4=BHK?84',=:€`PN. 1;;=MVUSVVXWUUP<.8=AD969:NPPJ:0*/;F;& wW/dQ$%$:DNSTVVWWYSQOC849@B7225=FCEAABFIKBCJKMMNNNOOQLLPOQH72;I>3)$ ?]g,H:$"6;9@RVMBRUH6<<<119D?998:ALMMNMPQPPOPQQOHIK=,.:;;]Q!,ZaL- (225>O:-ERA16544-0<0CDLQQPSSTRTQPLPOOMLLNNKIKLJDFKIC>3 'B:((Ez€ƒG$8=@AC>B:+021:FGEB<><>AD><9* $.>ORKMLOMOQPNOJ:0*./"I$N……N301857:755,*-0/2=HHKKKPMLMMJKOMOJ5'20&!+" I>57?<5@E937>@BCMLMKOL>36>:7>2KIB:32ww{z‡B1DC,(-61A518<,0015DOOLJNL=/2,*7H@+1I`ME7Gewvwm@49B5! 4:9348J;49IG@6055542//65-04$,577;<@GH>FKMOJ77A>57C/C;iq{wwo}†„t:bTA:>9!165693<6 n^_"7H;&%%'WoS53? 33$66<@96340(&025;956>969=>:3&6>>F?,;K625-Ovu{20#  ]wh;4mQ $0 '9:44(8$ &$:<:<><;<=;99;750/348A+6HF8+ x†n‡9  .hmT=2g;('#!f(', /9:65868:44571/0/3+06+3A6;0Cy}Ts_;:99577:2/93)*$074g„‚vjvS RlltA7ELN9G6* )O6 1BHIGHC;:9::559:1))('."w€z|^b,cqpwJ8;VD54943)%9&9A$5,0BLJJKJJKIIED>>86/&$( 0v‚z…„[fBlnpr];;56894565371B+4:'$(((4<36=9:??=48+#% 4w|z}|]w. 0Lkhorj=57666/9664<:E[54=3,*+(&$39=;68?FB<<;6<6;67;6/! :vy}y€\mV )R_korkh>754734754=C5HcA87.''''$,7:955;DG@=:<7200765/  8qtzxma[]/,aa\dimnc8888736;46=aR[lM:4!%$$+967648@G@89==932(2 5msvuytfBFOQpjf\eltwc6795789;5;E+^opX>'%"#'"(5;9387AB@<677:50  *iqorszmi)Eq`^\XghjliC6897=;9760Tinj^:!#$#13:7"+8:27<86&  Mikpk_jkgQK;9:6ARYPcVgG>89;371<@KQ@H*&4?8PNUV^V6/24581=5667&   8=4.34=:A?=6590 0934-+;51113362693.15:9>579:44:9$ +.7)++1HCBD=A7559836...01.ID94101/../3./23369382Mj16 -.-(*)(:EC:6+& $B>10-/-48-13""600$-+#+.0,1,/+4.* )2-.13338+$" $.33'$(3>>E<,#  4<80+07523,4*,6**.0-28//**++ #+/----*'#%&)),*$#))58=6)(   *=81*/.&)2.11*!113344=732(',)#,1/-)+++&(+*(#$&&$(020&# 385..261- -13 (.44503783/',('&1,)'+))%'+,$$%'#%',-$"&/61-%.  *($& 6/72/3461:4&1#$/*(((''%*+("&&$!"','+13/(4( ' /.10//+&..)'$#'((('(&#)(%%$%"$$(& )0--)'*  /20/..+*/+'("!%&(!"%$"$& #""!!$"!#,*,(" #" %)1,+%,)( $!$#"#%%""%# !"!  ')*%"   !"*)#%'&"!#""#"!$! ##&&  #')&!" ##  "$#&! $#$$!!"  !!!!!" "" !&% #%                                                      *3652 %=:9(+$'*46?D>92 !(=C>; 48:9:899BJB@5'"497AKA9,9) ((8?EKHJGFGKJDE91!3.=JH87/ 2:D;3;MMMHKOOMNKE?/#;AKNLKJ>0'AM>!0A944://473CNLNPORONOPJKMB<+/>JMJFLG?1/CI4)@?<91 9?,/++=JMK9,>M<1I?)1@M?# |8 %3E@%1;NRTSO?6'1.638KOQNJ??JOMF48FK9?L22?NM;03' 1z!  !7J:,3GTRSTS>3545.2IRQQQRSSPQJ;ALJEKN83?KNHB3%$"\a %9<+$1ESJHQTTTRRE>HJH>;MSSSSRTOOPOJJOQOOND56HNC0%11E$-,$% d^ %)/03KVUURPVUVUTPQRRXRTSTRPQQQRPOOOQNPNOOQOPM5')2:LF/&$/9)}\A $'9@GILTSWVW[XWRH=?CGLOMNPPPPSQSQOPQONONNNNOOQO8,8?HN;+%!/58DEGEDEHLMLQPSRPMPPNOLPNPQQPPD=INQL8,%18?G:& Do`2`7!& -.CRH38;7423BEHHHHHHGJKJMQPKGMLNMSQPOQONNOOPQNNLMEFB5+.Zx1`‡cbhoD%/39AL<*>KO;.48F#(5:*4;2CC4/468DJF?<;AEFFEEHLPQPPSMJIGIHKMNORQQPPLGLKMLB<5;dFD(.@5,433AEBGEB@ABCIRSUORPF9($7HMPMNNNOMG95;C:2 ;/)g†…†h "13<<6?EELJ?FMRTQUTPB=6$%6MMMKNNLKEC@@E:2 .9'"G~†’ŠR$%/148/$19>@AIPJKGCCHGHIJF@7## ?MNLLOOLKIFDC732-'H7e†{^6/323676'*03>=BB@B?577665786646BE@?EEDIHDDIKNMNNPPI?@FC?9**G2T}†~M6#"494:::246?CGH8:5122018BCFGB310178=?FILPMLONRPD5.+431.  -'(#k}M449776773:FIIJA89443:>932420/2@FDBBEFJJKMKMMPJ9:A7(%/+  );>$Q}~T9/%564316=FIHHLIGCFIEC80147//05A98LJGIIJMLQPMLOL95?G>;>2  >P5('Oyx}Š^35#)0106=;9GEFGB>BGGB8106?@BBAEA.5DD>@CGKMPLKKNJB6-8 2KF;98?9mtvy€|+%"63567IF:853!5(&'.1..222023223<7+9FHLKLMFKA.4E?:;3+ a€oo$$  1ftK6jS$2&360.015&  2,6:=A@=@B?=99<9793+4;F2/CI<95 4„sWk1  5[e>;c|F/%Q&0(H\  #6=@=>;=;778:631-+-+16+8EA=;b„m}uS ?VsP8[r\@.(! 5d²> "'*BIFC;<99;1567163,*$+6:(${…‚^sm:T`\]4HGA;@40-#$@/|`&. !*3LJKLIF>8;5984483+')%,! <~{S\gW +_g^Y6AS9463833.28>FVr$"2==?IMJJJIJJDEC?@;86,%((  G{}‚g@keLgiqc7:?5:75447:D4:%Wf10'#()14;B<:CHIHHC<<:;:<><84*( Nww‚€?Mo -biknf8854735263=H4;6$SN;/',&")37=?;<8;:879<92/Kvyyzk-Q5  Dfnknl>5777979943C0)P?B97$/(%""'37==>;=EH@>@61.5)364FuxztiP&:  B:::@H@<==615-.% @swtswuI' 8G^_\`fdhC5566578;38:Sci?30%!&37;83:=B<=87>=64,;jsrtqie^?VVnoSKB`fdhY985667CNM;;ZkjI2'"#,3)/+,77979?>77@B<5:9 3floqah^peUOI?<30F^c^f=654<98:TWKXU8-5<79<:639D841"  (`lnobSMV?57:972//25H`K3;9:<;<;S^Uh^C2&)468C><789NTXIE65-:@1-4SN[ZT:8<6'-675::5!  Q^\O=:=@><@64432427:8446>C<9=8S]N6:1/9:@/5(*BSI7()@LQF("(#3<303X`moT3FYTB999?@A9825435129439<;;;786M>68:22?-**$(;JK@.-.)*4:<9:21249944V]^ja9ARI7;<<9<<7547738935756897=95785>50.4,5;0",'7GC2-.018?534233323HR\d\=$ 8OB::==95543773431-38217/6877;;5I5-/.(,&!+,,.;?0"23971453112.6LRY]^D,  /JE6999=/32.3360("/3,''124:478-HJ=0.-&4+,,-*,<9:986A412222.115DRUWT@1?H6415:.013691,"!.$'.1/6238&86C-,4+54.*,-+4:;;92/0120/12,5@IPNM40 3C73364117774,32$)('&,22230869%/7.0;60..*1796-+043-,,0+1AHKNC/)?5.4301797//31 $5*0+*1473433=-0//.;<62-,38111/36,,,**/>DDF<)# 680252398-.6+A484-086452>A./+2./5+1570&$((,41,*'')6;4"(>F;0-89/7EIB91717K>4+-.!-6;JG<*)EA< %9?86CE>>B>587@M@62"$))6AJIC61FJ<56$)8.+:DF?CGDEJC=?BHLC=7*(.I@.$>C5*3;@1-INQSRQQRPNOPKNKE=4%8@KMMJE9'=IE0/?III>6( ,>G4-8ERRQORSSOQOOLOOK<1/7/g 0&'900DM::FOQKEIPOOPPORONJ:05EONJGKG24JB+*:IH7-*,/.Dp *51%9A25DSPOQPH65:;?CJQONOME=EMONHGKK7CN74>GM8"  gL( )210B@.3KSRRSP>/0/48BQQQPNRSPMONLLNNIKNACJNJ97)+682) -" 0."'(447KC?MRTTTROHCBHIMPRRQSRRQPMPNOOPNPOOHKLMB.+<<93)G„89(+;;/6@PUWWUUTTUSSTTSTRRQSRPRQPPOONOMOOPOLHLNA.%:=*!!pd0=;*4GD;NTTTSUUUUSUTTSSSRSSQRSQRQQOPOPNNMOONNNC+4C2#%" +‰O'##9B<15FUTTUPMRTTVUUUURSRRRQQOQQQPQNQOPPONOOOMK33D=+370%+"  \?++':@CC9DMM;*-5/ /9/ 50 pj\ G^,&595)49NWXWWWVUUQN@9AINOIHFEFEIIKNOPNOMNMOLNNPNMPQPNQA:908IJB<:5o\@ OQ+0:==;C>>DLJIDEGGGGIIGIOONMOONNMJNMPONOPNQQMKFA@CF@4'+.2>KMNQPNOOK;/+-9II?7#'PmnII6243>>; .3-/3+5I>.4:@HHCECAADFHFGJLNRTSQOA. *ALLQNORN?19AHD92/:aGE*/AeL5& -3/.;GB0079AHGBFB7@EBEHLSSSRROI8)7IMRQRPIDC>62*)- '<<'(BliJ5$)$2;@I6.4654@?>A@F=@FMSTSSOQPC93!!4LQQLOJ>81%"/60#:,1_~~`018>GB5C8*(:<=@MM@GMMSQOSTPIH@5&4KONJI6.+'$$2<8 +<;:-775<=78856430645,%ELMPMIGEADDB;+ 5+!K0?nx„e:60,-/2656:>A>99459=;52464268?E?99=AGG:* "=ONPQRPGFA311!%-B/`z‡ƒh9.*3175869>AB@7789533269DAJIH4012.,./8DLKHIOROONJA2-%$" 2)(/y{€„]41#-04437FJF<;89?DGEDFA3/13/--1;>9HA=@85?KMKMMMNG?JLGHC6 )?R4'3_sv|ƒƒL2#"'39><6B95553137;;>21=KKKB@>HMHJMONE47COE3;(  4SG>Rcoz€g*F3"'1165<@;<945446;9:0/44477867)07:?CILKJB66FJKF>98EFDC) &4O`V4:Hkowywq.&D>.*369B?DCC=796:85.,00/010+(),1/3157AHF;/-?KJNNLHEJK8OGUu{qvtj[UUZI;VO7?7)'59E?0)&!  ')':@@?<98),4A8.=KHB8  ZaeH9  @SSq}T6' *$*JÉp#% 6:FMKHD<;;;77:5.-#,.2*:CF@=+uuN?LY ;`DewQ73&&-54-ge<$  -MKLKB=9:963154/74*'-162<€}k1@q%JqRQ:@>:72:<'5?< @*21 &5MLLJJIA::97782564.(%&' R‡mVBKk9 +CUYSL4187665/4CBB$99!"&5DILJLJKJIEDFDC?A973&%'[zoyiRoH @br[O97:8546212:9<>87-(!]v|z}[VP  &:VlmB2896755500/5PC@kS:1+'&#*47=AECBHLKF>;:;4;5774-! Zw|z{mMG ;ZjknC88656656797/DGC‰]90#()" &6:=?B>=@CHFA83.2//56)VxwwpnfA  &IflprH755566:E?5D-9UMkA1$#&(' ,6:;=B@;D>@@?@786 MlppssbJY)$7136F]jnT6,268=9?51OG^_M<8,'3; 3'*58:?78;B9:A<:98- FgomjkUJW9% *.673<\lN529577<63,,"VRH9<5H:EGDB>E+,55;43:;99A:89-  Cdg``UCB:31244521404DL449:=9:87LOUcRC44<62>SGAKM@% *8235;5<7<;7!Dd]\H>DKA:97/,*.01+3>922:B;7=7:Xad_F<4:@/&6]xR?C>%#-4$,695;:6.)*(*@M[Z@!A_`P@9CJD=:81-56 %246449:>=9<9?Z^VD664>7)'.+Hq7*)# ,MQ?)#'&(2434Eehmd: =TTH<;?GE;6;,!7318651;=<;<98@_T7?A980 $&%*'>?)# )9?L5/49//25:31<\^jeF# 3LC@:7;??:55"'+(,4/$2697876DB86=?=6799<;5+$5&%29!%35;:3;?996DQA?/2+,0(.>1 &017??68642841;SUZ^S4 ;=<:4279<=:610- ,8.*1794785./ * /"+-/4349637?H30,AI/(&*,.66)+745302.11.19FLPRG2$6<332426;94/.5$ 28-).3/620*5?A./-1+18<9,*-.--5-0-+--****+.?EGF8,   #7-,3231321/% 'FA.0:<4/06,=90.4398/3200,023.-,,'(((*2:HB6* !4,050-1230%#" 6./24.@10.2.;..,0./8-+/-*-.*+/,++)&$&137:3* 2,+/,+/24" &-//7413=1/0+2&7,#!+++./+*+*-,+.,),+'%$)-00.' -,&,.*%+$.4/5443=..,() &1,% *,*)*()+-+++*)))'"$&'(,,#  %+)',01, ((  /.40-/.,-,+&$%'0-&&,%(*)))()+'''''""%'$%(&&+*&(0 +,&%'3-*///1,*&+$0)!&'&'&%'&)($%'!#!"#"!$$ %,)%)$ *,"),/3.+.0.-,!(*%,&!$%'##%%'&%%""!## !  !&'%& #! ""#(,.*.,*()%&$*! #" ""$#"$"!!"#  $%$"   !**''*+,)&(&! "#&)  !!#!!   $$%  $%$$% !$'('# ##))  $# !!#%%'%%##",*   !"$%!$$&" "#.' !$  $! "" )*$  %)$    $                                                ' %, $"'6:747#6=9&3-096$7AA>5&";H<82,! (1/0%2D=-)7FE6#:JF=;,9; ,/$!$&0BD22;<4$9KJG=+@=3)<7882&'!%=I4-794+:KG@; >D9 $/( 5<@HG5+04%&+&?J3$47+&7CI@6,?J="491 *::)8=>HL8.783&./>H4+(572>JJ:&0EJ;8F5!7B=26<;BPC58B;31;0+;72AOJIPRRMJNQPQORRPOON?BOQRONNLDIM@,+;J@-!!&)58%} <;8?9.>BIOOQROPMQRONMNOPPPPMMH?@LF.(-32:<M{$:>81><6HD=LUVSSTSRKJORSSPPOQRQPPONMLLLNNNMNNMG5'4@CC@:/ra "8E>(%25CKQWYWTTUTWSSRSTTQRSRSQRSQPPPOONLLONMOMK@.%?C7:5&&‹F$8D:+:<8LRXXVVTTUSQTTSQRSQRQPRQPRPNNNOPOPNOONKC/ 3H8))*::1U…-&%.8I94?QSVWVSSTTSRSTRTSQRPPQTRQPPPNNNMMNPQQNNM6#3DB,%#2>=9‚a$'.;4:FMKBBPTVXWTQUUTRSTUTTPPPOPTPPOOMKLKLMMLMMMNK02DNE871 5>:/ :ˆ['$7B;2439RSTUYWUSTUVTQTTUSOPQSRQQUQMMLLLKLLMKMMNOO>BNMLH8.0=5$*& buE 1&.;DD=637GTVWXUXUWVTSTURPSOMKPNSMPNLIMOLMLNMLKMONNNKKLH80>90 ‰YA[]).8D=25;SUWWXXTSSTROPPQD@BDGFHHFFILMMMLNNNNLLINONOOONNFL:1;A:7>;3 &ƒY/]Q+4;JMMOPKSWIPUTSPLKHNNFBBFGIEGEFHNQQMMMNKMJCJKNOOMPPOMLJCB9+1996$QV2$@:+,69?A?7DE71DSQACIKNOEADFEFDCHJILPQRNNNNN9 ;KMPONPMLLLD73-$17=:- HPb7u|{[_bM+/14F6624@M94?MLLH@ADEFDEIGKNNRQPQNLE% $9.! FUtdHNW_YT<887:=98L=16IHBGB=BEGEHNOOOOOSQOLK=  )KNLMKNPG8-!/7@;7 +I{lIM:98EDABD+DFHHLPNTTRSRNH--" 4JMMOKO92351.' %A<.6PuS81&243AOH5(4:86@DD>RJAFNPUSQRPQOIF>)!9MKNNP?/./08.<$=UtoPA)(!58BH=73=-)5>=>GDADHHOLJOSSL9515*GIKMF46655!'$&C4-3)k}_L@$(6@@8>D&5;7<>AC614..?GING131,2  !INJO@/&&$$/6*(8 ')9AFzŒˆ|]#'355.54989<;;)6821-39997842:1.;7MRZt€ztG:#/6744;?755037=063423778EA@75?IGFC7 >NNOLQMJD:1*"/$r|‡…^52!129:37DB943654/77:=HCLKL<-15*1229DKLA->MLMMROB654".91Dt~ƒ„€eJ7-164;=?BFF@89<966>FI@624:;1/595,)$0AKLILPRMOORNIC@@4+@H-3np~y|Q4/"+4:BDHL@<:99BEGEJNN;024.-..4:==615/5:HKIOPNMOQRPMGB1  6HR96%#B^lqqu‚‰…B!$)2454=>:932059<@EF>227;;853205:CA@72-4IGAKMLNLJOPE67- 9`ODEOJ=718GWfzU/9&%/12:A5883/0349:684'68253233*,24:?HD=;I>-?MLQPLNO>=I6 +:``67PirkfptlzV#8<4'"3+(((,3Bd1<85(6636?<8;640(  #6;:==.0748958224::.+?IC4=MLDIH: "sU.# 5=>R5EC-.4567736483#-3& ,:<93.<99=53:6341'$7CAC71GH78KA%jxI  #f^X80?7'/00&4;6<. 569:=<:<67987895-16ABA4.GMB1=7  BˆDf:  WN\Z5%::.:90DJ'#&(9CHMKC@6:A@=A==<9-24772?I=2+#  ti4@P?  V]j…G<'*77#©ÊE42 -MOMKKGC@<=:9:51+01+'?C;5/$2ƒ}cAHG Osz€D>4(+)>=287L@0FU !JLKJNIC:;863548416-*-1&+  Q„…„cJSfUZSG:9:M6:@@8"-=# %0=*>LKKJIGE?:;8:664723&'$( ^ƒzcPm &IYJM0294/0:>FM>F2#44*4DMMKJIHIIDCBEFB?<75&%'fsk~|hw ErcM548:37.82?5)(,6)-+;DBDJMMKIJJEFA>998:<9/%'hlzz~Xy!_nF3:5<37818,8@DGJIMIF9;71668951'ds{x|sj- Kpk99:84136<4)2:_@FQ=90+((##-6:=;=DFBACFD6;723.043_uvvsxg3  ?DA;=CGD948;745#[vqttreD 7Wrto:72/0693-9;962798NO8Rf\31CNG ,)3:>=>68@B;;9A876   Rcfk\QG[;36/"1+,27Ia/0616706D52537GXE6HF9D1.+%2+")6:863:=>6;=785 S`cfIGQD5 #=;(58730/8?75?:H.ZdVF`=8570hrBKRX>% !68.5:<<::=41  R^bWETF48/*#0$*333;68?>??4SUfe]\c4290QnrmD=D4%"%'%4;;7;56 $! 'BBG<$"RZPMEFI<7-(" '* '19,<>?B<755TacSRuW2"9735Ci>)$#!(H2%$-334;[`kfA MMC=;GG?=:>% # !66,'5599831W`_FHhG3-$4$!%,Rb$&"'@FTG/*/1-265-35Q^ciV.DE?;::=8;85 (8+,29=7/<\ZA3:O>:,,2#$#)A)'+6(+9X<5D7.13;1/3PUYi\6 ;<665316;95  04' /5<716P6717J:;4]Y%&,'#+-31-,6?C4511213/>MTY[<%    "4885/4=BC:0 ":4,$3554:775.9F:82UV'7,))--/#+.-16A96825554?@QTW@-  *2751/18DA2  "58:+-2/-.496$4,-0%2*-/0340_:,21/-+1573+.,&**,$-7AE?1+    4/2..1)15) !253424*1,./%2),'(*2.:9',1/.0/-,+,-+',&')15<;0*     2/20,4)0, 43/8,+3G01,.%1)-%(+0=/)**+11+.-,+())'%*/44,&  --)%*/%+ + /!*27/373+-,*#-((%-,*,++,$',**+-+*&%&(#'&,/*%#  $+*&%0* %'($9//*-,2****%**&)0'%,--'%).)+)')'''%"%&&+# &+"(,' "#%/)(,.,(&,2+&(&$ !#%()+*(((+)*())%%(%""!#'## #,$%+$ (-1#(./)+''.-)&"!$'#(#$$(%'())$"# # ! +$%# #$" (.,$,,,+&,-++&1  %%%&"#$%$'$$## (""$&(.' )*,!#'))%/#  !$!!#""""# !$#!  "&#$#$('##'*%'*  !"$!#!  $!$&%%$$""#'"$"  $$ %%&&#%$!!"! !    $!! #!!!  !" &   "                                                           -513 $36<<15:1#:?5 397(,82.;G48>,&,69GG8&&:MFF@3<<+ 384'&1<22GE278CD6"$;KLE=.=C449-7;6*&981DH178:?8,=NF>/)JJ79IMD@B>6* t?/)3=3#(:NN=0:EQRRSQOQRPNPPNB2+7HPQNME?FLJF3#6ILG@FJF:5)Š! ;;197F7%$*ATM?HNQUTVSPSSONMOQOFFMPPPOLLNMLM>.6II;2)//2=9*Is%!-.8H94A;7HSTTSTRPQQRQQRPTRRSOQQMKLMMMOOMJONLE,5>BHE:2!‰:*@O@ !3EFOPTSVUTSRPQTSQPSSUTSRQORNLKMLMMMNNMMMM="1DMH=/" Cƒ"+@F0/68QVXUWUURRRTUUSSRTUQQPPPOPOMMNNMNLNMNNMF+(=KB>6#4226 us 2354FA1-6FG7/.?;?>/  ,‹R-(<;5CNSKKRTURTYURRSTRRRTQSRROPNPOOONNMLNMNKLOOLMC?GMJ5-.DMB7  T{?4 09D848?ORSUTTTUVUUTSPRPRSQRPONLRQQLLNMMLMMKNLLMLPOLPL?2'9G<.vo&@ 6AISNC82DVUTVTUWTUVTQQTRQMLJOIQMPQNJMHJLLKMKKLPOQQPPP=02?C5# ,, "{jI*17:JOIHNQSUVUTTSVTRSSSPLGFFDFDLGRQMMGIIIMLLMLLNNPOMRRC8F?,-5321&.‡R#\G& 1=IC?JRSTVVVXVRRTQTQDAA?ACDCEDLPNNLMMJLLI9>ILQQLOQPNNO88871''%@ƒT+YP7(8FOKGHCPUTUURQQOOQMB@A@>CGABFJNQMONNKJI>7NPORPMMNNPA62. "$*lJ8 $)574532APJGNTQPOKLJA=CA@BHEBJKNQNNOLKLI; .JPPPNMMNM8-/*$$&(QNQImrnfci\72DLJFHONIFILNG:>C@DHIHLMOQOOONJGI4 GSNKJLMN?352,&-5)  +MGx€nF:GDJTR 6DFEMCDLC9AKLKB>>DCGOLLONPPRPNKGG7 JPMMMNNNF=7& 173, /DzMH?BBUjoS1:97E58K>36DH@/*(011&=lXN=*'3@oi?5%'.:;48J>/-5;F;=B8ER LNLKMJN4#&*.25. %MM<'BiZ=81)(516>KJ6/+6979=@HKEFLNPUTNPNMKH367,LMLMLP?126;A>,  N: .Dhi\D70%$5B:8W!-599;;>/,+(4A?AC;844399#(9GKNQI4+-5'##'2 B50/8;T†ˆvJ*394#1538:::3595$-254377=CEKKGGA@>:56DQQO@885023)4:/"/c>>;b‹tu:/$#('*/5::3643586326<=5hy}w}ŠŒpN:%32634>B?7))4=D0QgqtwzLC2$6=AEED98<=<@=EJOPPC20-.20,23340('0@FJJKOMMLJNPC64/     6OCI?8978=FKNPHF?1/2585.'5*.8::44066BF8CCFMMLK<1(    >fa]U[VNA??=99bx-%!! 3;G;631126<@>;561)../*,1231./557=60+1A+6LKMQONM35E;  >DmS3ImwsaTR>/4P;"<5'.5:7614363,.3.*&/)'46:7892,154467:9<=0:IC9ILMNNJG> MW<2PQiW9&!Qe-87.10109<954+.!'/ 528;>:.499=;47517925>EG34KLGEF7-  Cw?   /=<7698330*1()>D<(/G€~B^%Ide587#4;044O7LLMKIHGHKEABFF@@;3*#%&h…_bV  fwD256458<6@@=>:5J?,($%,7$019?HJKJJIJIH><78449:/#)kZy€jhT  6n>9867354)047G9K<=:'$' $4386;>=AEHKJIE:57570766) du~}nvY \h797721;=/'03=FCHLL1'-$$'278<=?::GC>HJ?;>:30.51 etwrszb"  6o`87:41538'(+0L`@A.IS@8%$#9;=;9;G?;48?D<77=8?@D;454 Qeijl]VL9)!-Re:'630/627(;>L=K`M8884+ &!75:<@927A899;<77 QbWg`JbS -T[f-.8B**5:63;6=/J5E'66>679% )V]]]MbOC%ERO--2/3162;;5<60W;9E_8709?cEJCF\M.(!14871:7;7:73 6T[[FRS31& 4+ /04EA>;921<`YOTL=C1)(:’uB8:GL>0%#"1054:54   >XIK;H?0*   -6222.6//8`__P?C93- OnB7@4509(%,,F4  )7325J^qiG' 7SH<6=C7.!  11%"/247409\b\D4M:.=6p=4K\/0)(-CSJFB0*,4.-7345Ga`n\7 ,J992;.Pu!!*k:7ILHDHO22;@23.52214'-6E5P=29&06J;-86'@/-,,$3C>0-02><55573603AKUUF2 "-8467==0 8A35-2/.0460+.4J8)-)#(+/--*1492-2?:.296/421@HPOB1 22,4=87-)+   ?D:.6<104B4-00;J6*1(!',.+0.,(/956;.-02-/03ADLLD- '4*05722&'.   (?<5FB500;721*326/%8*/.*/120-68:2.--*+-,8DHL@+! -400/21.$  -).*//8,2185.+1*!1)Xp+.-02.-),4:4-+)*,()'/;DA<+% ,3/031/&  .00/6;7)0)/+'"*.#&'01E50(*+*+,/*+-*,,+'%'*06=8'% ).255.-" 82/.16278H+0+*)'*%#0;+/(&)2-+*+(,&,-)"%'(/-5*$ .0-0*%  8447+1068/,,)/(")& '*$+%!'+'%-,()-.(''*&$ &'+,+$ ),-#'/8076()(.04)'(%+)(%#!%%&')(*+%*'*+('(&()'#$((( !   &**!,4 1&-6)3(,%2../($*!(%!'$((%#$$)&'++(&%&')&! ""$&& ," )+ '%5-)--()1,+-%#+#&$"!%&'&$""&%))&(("#'% !   (" # &)//-/%$(.)(-''#('!""("!"" &&$)%$(%"$#!!!  '#"  )**+ ',2'!,'&+!%% "%##%$%%%%#$%$$# " $%  "**($$(($!"%)*"!"""!"!$!""!  $   !&*(%% !%&!!!"!    ! !(&!  %$#    !! !"! !  !$ !!    !"                                                                   2:<;-;5/:0. -,1?5%:>- "%;90", 4DC06A0(>A/-50=# ;:7@C6 6:6 +>I:A@+)@B4:18IE4"7FKK<1&?KIG@/%D5  (:9")6. ,,/3+7D::KG2(;FII=4-?JJF=(+D1 ,80 0CA,00"38% ,%-?GFNF04BBJH=32FKJA;0E6*!38>9/&+=J9.%0$3=6','8BJNJ9;.(239GNOMIA:>B@9@LNLG@0'DJ?+%:FG1 "! ?5,);6#9PK9#*,>H75=JOQQOOMI?=@>BKNMLH@4;FK6!2ALJ5.29:% …! &01)4=10;00IRA(/1AQOOPRRPRPOOMKCBFLNMMLMHHKJK5/>LMNFEGIB6Km23;?;9/@;'140;PN<:CPRSTSRRQPQNOOMNMNNMLLMNMNMLLB@KLJ@;=>BG;,kG0&=K?BEID.%/,0KSUSTSTSTRSSRQOPQPPQPOONMLLMOPLMLMMNH:(%0;CBEB8*oo#%7#&8E@CKTTUUUVUUTUUSTSPNMMOMMMQMOOOJNNONLLLKNLLMNPNMM?507EKD;/&"#|a#-4>ADNOHISWUUVUUTUUSTQPNMOKNLOIPMNPPNLMFLJB>JLLNLOPNPM>3:HE:. '-?ph':&3899HTUWUUUSVVRWVTRRPRQPKKLIMJONOOMMMLJJD:%&@LKNLNOOMJELC2$ !!#,62 IsV33))/7FTVUUUUTWUTTSQQRKIIC@EDDFKLRQPMLMLMG;@MMPPPNMLOM6,,)('+4;8 UxN B?-%-6CKIKKPSTTUTRRQOIBB@@"$"08:6:;DIPTSQROOOE<CEGJJNNOLLMMJFGACQQNLLMLL?8;>A82341dOMKT`ng_pM-)./137>BGKLMKKLNMNKIGHG+GOLKIIJKKGHHA8**'7NAxlaOVTcmo]#'446MKJNKIKLH><==AEKLLLOMNNOKEGGF1)BGLLKH<, 9@zyI@LP_npYZ-!/05B36JLCEGICA<9@HKKLMPONPNJHGEE>,*OQL=:@BIJC;2''.2-?sqINJ?Gdi€iF"2?:.3CJ>68@A;===OG;LNONPSMMKHEE>A, GMMGCEIJF4)'.;B>* (Z[I8)#*C^\oZ<.,2324DH>6178475CG9+)6,OM7!%Fm}}xF6.!38B99926/(#+;<>;665@KPMC/*11+%:@*1;2 bv`?B9IVT&*34;;2579377529:?CHNNOHEDFEGFECB?=?=;EPM<0002.9A0 721mzkKHS`f_9*)/4457:92195445:CKMMNLLH;3/-5@F528>EHJ?.5IMK6.1106B1#;0)"Rww|€y~€€b<1.3436878=34:86=@82*)'.690(3-5CJMH=EMMD54/-6C.     8>F5<++Zuxy[VU[euPH'12::7837=<7@EINQPH@712144-$/(,,0**:@?CKLJJIIKOC856=?.          ;YPJO_msfK658759\o1'66<@<9588B,            )OLQ=?pym`C3-!.0!&'+3696,43).0,72)%29625;9:2,3954//-19//0('.3:60( ('-=#8?=?>9:::>:56623+$27;38GFD8@C8          Iq8E   =h:BGE2%44.).7E0/4.BPGEC=>>>>:7:3896-%/4/6CGCI>I.8/85 Y}ˆoNG f]461 03:14CC,DHA+FMNGHMIEHD89::6363:6'&/57*bƒŠcGL ,d^J.2,@9445!37$%&!742=LOLFLKBGD=9:;883478/#(,e‚`BdNd;344.8FB:5F85- .#(!+#.BPNFIKEJGGDFGGF>==92$(- j~ƒdKo& (r:45645@3;H9=C;5I=3-!!*&.9?FGJNKKJHGA=;9738<5!'"jy{]ce SB947325-,58A=9<@GK0*&$ *4.48==G@G<)'# !085799::>G>CGD:::8042,Y[prwaE5I:60524-,,559?HD?=>HK6"#" ,5789;>,*,(7889;C@>9A6<>C8448"'OZ]qaU]"1H)$?/2$*3371/286F@QF@>:49.8@2 149==>56@35;5?86' 5TXYgOaOF-9Ui+93%!09;:8(.+9G@O6CQ82;<<'*-!. 37;5;679929063$ARYNFSJ8 1G!<]<4&8=;:83422KU;<@J8-.)'682 <\L0/2581748265. J[MFNE/#0# :: $.)'75.21,,4PF0MO?@4-3(3+",(0FM=2#((019.0% $ ##5>ID)  LWF?DC3.  '3$1:41203E`H,.1<83,$8>((-0->E>?;183 )7044C]jk\3GE:<98/   ".87'08256DV[WY?'80//*G!%6:2LSC1=HKLB()*+334//16Xac`D=@454;5 -    )371(/1/?TPX_]6+3@0416!*OU4RZNJIMG>453114,016USgeM0  0:6779)"   +07005AKND^[A/9?K4/+.(#63I:35B;/3=;301//,0GNZaX53+::0   $6?7--?@.NR71/@HB2.('+1"!@I=+./28>5501*11.:50+.2422.4')&3UY3/,*//04.#$<463*-*-+**1=BJG8)#;./1/3,  -5/-112224/480+(&&0BiC/)+.-.0+'9;-2/++)+*((4=$%;- 47--><*);.9G1&-'5HD2;F;%8?+-&$80";D>8+3COKH72>>;5(=NNKI98FLKG;!9@ (" -B<3@MNOMM<9INQQMJJLKHC7 >?'!%4@7"3794"7H43>8$,$-9<=KROPQILMNOONLLLLHA0&DE0$06C>4  /8@@)-FC3(9;)30-::>KNNOOMNNOOQOOMMLKG87IL; *8=&7RD34:.471;GOQRQPMMNNNNNPPQKKKLGIKM:-9BDJ609)Ax #8=02C5/JPB1748FHOTSSSPOONOOQOPOOLMMMLNNLNF>INMJ=5:AE; tI*8;95*/D@.7A9AOPB6AK22=DEQSVUUTRTURTRUSRRQPQPQOOPOOONOOONOMPMNIDCHI=9:-=ƒ -8??JPPPPPC27FNQTTTSTTTSUUTSRQRPRQRRNPOOQOPNONQQMOPMEBIE4 (`r6=99;MRNJQPHHQQTUTUTTSSSUUTRQSPPQSQPPOPOPMQNOLOPNNMHEKG6##20"{P45&&7MUNNTTTTVTTTSSTTTSUTUSQRRPLMPOQMOOOOMONMLNNNNKLK<(&6A<1%0(7†. .+'/?SUTTTUVUTRUURRTTTSQKJIJKJKKKPOLKMKLNONLMMOMNNNE1'0AC,#8@8Xs#.'0-%4CNTWUVUWUUSUWTQRTLE@BAEDDOJIA>FIF>2)DMLKKLKMMONA4;JIFEG?=>39yNH5(699>LTTWUWXWVSTSSTLB@BEAKJPQJQQSPMMKH;9#9KMLKNNMONLEJMJG@648@:+WfR >83@IIIQUUWWUWVSVSSSQHDELMPKQONMPRQPOONMH<2 +LNMQQNMMMKMLD>989>FD: `hO +#(/8;<26QVWVUSUVTSTTQJLMIPLNOMQNOPRQPNNJHH8 =ROROMMMNNNJB=>>@EHG<" gqP )04841DSPMNRWWWTTQSGGJJGHDIMNONQSQNNJGHGE JPQQMLNLKKLEGEFIIKH@-X{LL!235>GF?:6KWVTSQQOF@:<>?IHJKIORSMJHEFAD8"LSNMNNLLLLJJLNKGIF<'8kOI=Hd]^XN%'67:730=STQPMQP=<:>@AHMJLKLOPMKIFECBB&,NSKK:8@HDGLOPI@<93 FN>}iTQnui{a/ '%,46?QPOPQPLJ@:=>AGJLPMKNOLKIIGACC6,RPJC-#,8?EJLM?400+ DAq=N[l~q†Že,4=EH>9GQNIMMB=:@MQLKKOPMLLJIFCAD=90OOK;++',3ALMHA?@A;'Agz[`Z[mwtŒ{X"(5=B:37LLHGD?@>5=789996709@BAKNOKMNLJLFD@-2;M:.JKNMBFJLLKMLKNE1&+<9 @^XK7/:Vt‡‡ˆV<+ &3B;.35;'+%%5;97FOKOQUGFEFE<'59DNFJNJGLJJLKLNNPNE56>DEHJMMHJKLLFL>%  3C8.1_~„„‡~lUN2"1/! )8;:7782 73 "17@HQRPH>7546+*/+/9HHMFCA:7=KC4      $;;/0]}€bF97DG,$#.5;;687:7773#'-;BHJKMLME=76;=94-++);@@NKC76CJC.     %<;8;3Edlv„‹ƒytuW:23.3863562D:Cjg!-27785285668888:7.+++,4-1/,1//24&5EFHJ6:IIIIHJMLJ<49  =NY]hzŒŽrnJ+$1TvC*87331$1373564,+"'74821666703-$*7=B<-9H=?JFAHLF@?:aH5(3R}tN4* *49*.52)1-!&#'382)95;31:<:56478-)086.@J45LB3BDID>:   \N9 !"&  FKD8'     Eb5*  0^M(19;4#*4;;3FLHBDA<:9=>=47536(8BH:.B:,?<9J?2nx_ pZ1B@7")/)#-@B3%b‚…]K Qh1=(;H'/6%I.-IO:(!"+3IOICJOGDFED::;9567;80%%,4,]†‚LaT[9;45A.48,+!%+'!+:;<9HMHHKHDHEH?:=:98:<:6#'(`~wIS" #d5414F=55;<67-1-) #.2*:QJELJEJIIGCIFB:;?B8%#-drIU,  H:9633"08@997=/6B:4 $*8@IFBMLEJIIGE=89296=6%%, ZziOa( 64:1,1618@9<6B=:A?9BF@744486- MISpgI  !%#*37(&38==<:B9>:CB@8:@92(>>ZukR (* 5$$,478&(D:A?<55:) :ARhuV[X[(9/4C(0:9;'%33@L?TWC:2;H- =>?4.0555:@<:6<72>8=;=/   BSZRGQNB! XKZI,28&/8A:7//1[W00,1.3<*).4699;7::4;697*  +VVOFFR+FA1*#Q# J<CT)013545;GV\J9I?UF&88+4&!/5 )37>938<064'  5XQ@SB1 ?=*"H 1"7-5,9773>COUUST<=BE(2=3 #'/;5# !'-)&     :M=@D4,0 *" / -I419@?JNYb`9<;63-04(*(+-"%9<;2&  ,;-48@[bifC    :4(   ( ,>G=464M[TY?EKC25*&"!".'! ;3=GJ4'4MGD'%&*=9<)027U]daT2 /D282$8&   .9<68.-7QIGBAI=966=715)-,*?PVa[8#  4,1:&   !/77+4803;4/+818;,!& ,J@0*:@6:4.*-66@QROA2     $!10/   ',797./,+,./4)/*%"%+&#,)%)50''*-+,::.3/'-+4:@LMA0  3,-1*"   #'5=5.0,..401**"')*V60.+/,(-2-,0;//0*,,/'&(+1@JO?- 7//24'$ ..432/1-01/05,,$)$8NN:+-,.-1/+06550))().+)()3?GA* 9612/!  %*)+40,/,/1,-/*,%)%/+) -4../*--,(.&(*)-((%)/:<-# 25/+.)(+0,/6-+/+..(.-$+&&&+&'"70,-,,/,(,*)))(*##+121#*20-*+ " '&+,*$-11/)-0+(%&-$##''"37.-*(-.++&'(**&"'%,,%  !-/+))& 1)+*)*.01-.(($()'7)% "%'!!"12,,/,-,+($%'*'"#%)'  1+'%$"+ 2101/*&/1/0**%'%%&%%$#!(&"0.,(*)(''($#%( "##%%"-(%($ "&--2-.(/+/0/,)*)'*,%#!"&!$ )$"%&''''"""#!! '$'"%$%()/0(-.2/*'&$'*'$$ $$&)(&('$ "!""!'$") $/($"*+*&+++&#"$$ " '&%!!$"$##!## " )(* !"(+++'&($$! !# #!""$   "('))%''$"""!" !"      "#'"%%$'%# !     "%!!"     !    !                                                                                    -367( 8=;- 1:<:86;>>33=A:;5 "" 896::98>FF65FB9D7'9<2(;:;!@?+77**3CI56I@;F44=9A:<, 3),8>DH&$72 0<89E@:CF5;J5"! 7KD7@NEFH8>D7@9$9>:7&2<0#9FHC677IHIL7-300'3GNKNMLIOHJ@6 B@,;>96, #%D< .DM;0/0B3',7EQRTRQQOQNNNSNNPOMMKIBFMN>*!#$5G8%$b %)@A0DPH9AQRNGLE>DLKNSPRRPPQRPPQQOOLNNMMNPNNLIGINP5&27=6{, $7-!&8EFBIPLRTRQPSSSQQRUSUSPPQQQTRPNPMOPNOONNPLMOLMLKAELK:"5! 4>;574+BSJFQUVQQPSRUQTTSTRRQRRQRRRPNPNONPOLNPONNNOOKPNHD:9?9_p ,:HRHHHGOTRLSTQRRTSTTRSTTQRQSSRNQQQPOOMOOPLNMOGGNMNNMLLB/+/~R(8JJHMTPTXUSTUPRTTUQUSSTWTRPSQPQNONRPNLLNNOOPMMFJPMOMLLE-(1.()‰:%#&:A8.4FWSVTRURUUVWTTRSRQSSQLIJIFGIFBGGJLLMNORPOOQOPMNOO8(6>E>8%!O‚%"5=7"0KWURUURTSTVXVPSQQMGDA?@?>?<>;2 !4GLNOMNNOQOPMMOL98AL?4'(;<&jd0)997-+7MWSRUWVSTXXURLPIB>@BCACB?>=A=;1 (NPMLMNNOLNOMK>CJH2%.9GA/ )„J <&0)*+/?RWUTVWWSUWURTKA=>@?@ABBDDGCA@=98# ?OMOLMNMLKNNKNMD5:@JMD5O|:I('068LTWWTWWUTUVSPOA>=@ABAHLJLMSQOIFB;3 ;OMOMHKNMLMNPOMGLLIKM>*ab6W+,7CSUTUXTTWVUUVRQNH>?>@HOKPOPQORSRLKIJ9, 8QPOPPPONONMOMNMJJKK?6nX9 H65CIJLMUVTTVVUVXRSQG?ADKSSRSOPORQQPJIIGI? NQPRNLNLNNONONMIFGA6;*moN '!,625BAOI?@ITWWUURUJCAHRYUSRQMOSTSPKFEECB@0QRSPPNNMLNIGIFBFH@CA4jpO9 !  9>CFILC=9*  UI8tb€„|wY(" .6@IQSRSOQPPI;;::?OMNLKQPNLHHFB@A=<6UTRJ:",1*,=HMOC98:7)$E<}H;p†‚€Œ‡o&.47>BKPOPOOOMNA96ASNLOONONMJGFDB==2>""ESRQI8)0,+;IRNLLKB/  'Bjhchz‰|”‰„‹K$$028>:=RID:=7;RGJUOMF30>977/2@NNUMPP>04INNPRQNPB-%+B9!Fsa^Vhu„‚r‡Šh7!3=?.15@-!!$,88@LDJJPSCBCC=8&67JSPPG?=D>GLKKMPPQL@?DJ<%  1\lYLDSfnwwrk|i4 07A>3'?4#.2985761DLRU78*#5?HOROOH;22:CD>8EKLOSRUQPG?./CTC?;LZaXZix}gYT&$/6+&5359;80/64>;9,/8CLJE>5430),:>7 0DGLMONOKJAC:  7;>MT_U=>EOdlQM?A88"&2795;;834**39;?9=EGFDC?BELKIHDHHI@AFMNORNKKD8  0:9HJ_gr~slbYdcdcgPGD8)&.#3355@>99=:4369533-26678>;3B;129:=EKE>AKMNQNJHJD,?AT^Vbuzz}yhL7<<0;D::61.%1953598::3.")240/,'/0.2258<4$--.7KKIGHHJMMQLJPE-1Jc_iq‚ƒ{‡xc7893EiprP17800/.42332/331/( &1279203,/37&2>BEK@9FJLHB9AHLJFE0 AJKE`ˆ…ˆsOI3 'F;AXB10/3/+--1.**&"5,1;706857-5508BI=03G@7G>'.<46676247-5DK72CB*+;AB36" 9Z0  k`=94;::242(/@KE28HB)'BHG8-#jSB  u^7+-75682 +74EF$CLKLJHA@E=:7==55801.:I9+7H;",B;JC3 Kw€_Rb(87;0(!&*)DCAK7-JKJIJHKID:8<>@=941**5CA@@CC23!f‡ˆPE')FhT7!+1`¦>7GK<4HHGILJLHJKDDF>856250-33.878?'g‚†R-4G55.L/!0#)4$>HC*2&'1BFJIHJIKGGEE;897=58541+&#+"_ƒˆH3 D\89*-!H<9:)-1$*/11#)9>83AIKIIIHFFGB;9><>?:57.&!$XyJ> P994,;9475,498<7(.7&'-5*0IIIHLIIHIDDHHB=97:5-%$U€RHJ #6663+8<;723+)B;69*&*4'8?HIGJHIKGJIG=:8674752&(K[IOQ*<<)-646??DF20MD(-J,)!*!7@CGCAE=>BJJFFC75405.0-"  FGGZP .-&07):8@E98'0D;1-U?-&"4.$  D>SdT !   2462'0856<=7==<==3 5;C\}_( IN*)%-06;/254BEA@?==3-F:!*.+6;79<9>A77=9775:448)CDFgYL$3$ RJ(>D&/39;5977>L>JI=:A2B,-9:* *3888:B=96>=2>489<- +:QO>K>(%B$ 1 ,@/#! 0-;21628h_IGa9:E/1%2)36' "351695647=1885:' ;QW79>)47>9!5",2+284.=PTSA@74@&A.JK/ # :81HA\gd\SJ366;2D&8=3(/5+       EB?A6B9"/7OK76:Rcfhf^?5.0>FZ[lkS$       B:>:5% !%.(%#+9KH;2,6HNPN72;)60 (68.)'/5&$>9;AB=@.-/144@-1/<_]f`\A       @47:'& +)*0'&%(1CI=+++/)45+32$+1+,053""0h<5BGKLKOA8;8GG;1/(.N[dbW@!       4.6=! 6'*4483.(2@C2334//1,4,&0,"/<; 0&1ID?NLAE5>@;=.1.'6X[dY>4     ,1,4'    *0!))&)6=362.312)4'-:86+$  BNE>D3134F>44/0+,KGW_D,   -0  )()%((04523200..5'%((1:=1,()''!37,-,/4:72,(,.23?INN2 0-+//.   "#&/%%*0473-+,,.03/)*))&.&')(,,(',3/++.-.34*-&$)//9FKF5,     01--/,  ''.4533+040/113,'*2$3NF%.'*,,00("+/-/*))&'*+/9DD5&0:00, "  .202,/0..164/15.,!(*(EM0 #$./)--.)0,*'()''%),7>2+ .80*.*#' %+,+-.23.*-26*+.,)(#(*CA,&%!-(.,+0&$.*))'+'#*225&"  %.2/0- + %),+.#&.--+-/,'+)+*#"%>;''%21,,++/+#(*)+)( &'.-+#-*/-").1%)-*/*-.-*+,,+*))*+$"3.&*!--/*&+/1+'))(%!###))# ((,+# *)31))(),///.-),)('%/&&$+/'! '/*)*/3(+)'%&#% "'%%  '*('$ (",/2//*&+&0('((&&',-,%"*.!$+,$#%$+%#$$"# $  #$"$"' *!%')0--10-+&#%%.+($"%()$&*$"#(%" ""!#&#"%,.+#-10,&(&"!"#!!##  ('%!'&# " # ! !*$&'%(& "#&'$#%$#"$"$ ! #!!   !' "!(%($#  )"#$" !    ! "& %% !#$"! " "$"!!    !!   !"                                                                                     ((/8;:8(165,+:;996;A?<319><7%#+2#((/!9AAEEA@FF?/7?FF:+6>) >+>:,  !::;5)>G?A>96?J?*$>JLH<.;D0B1>B;3&#;9!.>GI;"8J<<8.1:HG3%>LMJ90>D0B:=CE=5 5E>)4EJN@*6L>5.)+7CJ9.?ONJ;6EA*AA@FCH4)0;9"7G>EIGKNCDOB42418DMC=JOLMIGI>'@HGEFH>62$(8;C3'AQNCDENOPPLEDDCBHNNQONOMLML>%CLJHEC<5'"3-%:9@9D@8(4%.>6*6>HG9@NE9?NLB=CKRPSSPOOOOOPQPOOMNMNLD>CKLLIE=.0?=/ !#?EMO>AQPGEMOF?CKSQQQOONLNPPROPOLMNNMOMNNNKFB8.1CA1<-!;.,0:LLJQRSPRSKFFNPQQSQQONOPPONMKJLNONNPONONGA=>GE2%#jF6=:+5IRQTTUSTSROQQRQQTSSQQQQPNOQOMMLNPMOQMILLJLMMHLNNNOI>>EKA5(To,93!5NVUURSRUTTRRSSTUSRRRSRRQOPQQROMMPLADLI83?HONMMMNMEAFA8pU..:E;8-"'&'C!"%;LOGJRWUTUUSTVUVUVUUTTRRSPMJHC>6-%(5DORONNND>8?LPROLLNM>69?B<1 ki#2@JGCHVVUUSSSUVTTVVVQRMHC@>>>>==7, .JRSROMMQOQRMOOQNJMNI=5"-6(…O&-;EGGCJTTSUTVVVUUUWXMLE?>>@????=><:7+ 5SRQPPPQPOMNNPPNLH7)"7>3>€180:45>>??>@A@>>;:80'MOQPOJE:=FMOPMH9(+4=JH7$ Zr!A&5ERVXXXXYXZWVTJC;<>@>>@@DHILMMDA>8- %IQRM=.2>INPPMG<=??AAAHKPQRQQQLKKLD0NSRJ?GNOOOOQRNLJC<<<1 rP%K18DFAPVXXWWWXWYWTEB;=@AFMQSSSUSQPNGGFCDH7@SRQQNOPQORRNF=:862-3:& w[4 #.3/7JLE>FNVWWXWRMM:>ACJTUUSQUPRQOIFIDFCD;( 'MRSQQSRNGIM>2,--,-1B=,neC 2==;6./D3&$(+/4?J;,MkL1#1642*.:DQUUVWUTUQMMEGGNLJPNRRMJGCCB?@A680QTTRQ@')88*(/:BFKLC8&)XFFQLONRTRNKGGEB?=?2KIRSRQM;6'6..<907HNNF>6-  3Cbf~‰ƒ…ztpD *-9:;;BEJNF845EC>?CHLMPQQOLGGH@?==7JSPQORN9+)=AAJCCHNNK:-,83#9Vt‡ˆ‡€zeinb5$0677759JA5/1874'8?BLJQOMLHGGA?=;+7EQONOLJ;.-DONPQQOOI42=D9* Cs†€z}|€oddlV-+04127F811-4%(2HALMNKMCA?@;/'8APPM@68E>2=JAKOPORRKGJG9# /Zzk_idYYZZbnp_'$*-6:<5+ )!+25681AJKOSF9- *9ELMIB7/-981>;0FKLLRPRLI7* Ec\NUWMHGB?CJWXC +53 03145668:HPPR;.&-<==;645.%%35::'7IGBKOPPNA+)% :LLE7961-422/320.%!%##%#)/0+-0-.'06%*205@LIHFHHFJG<:FL9  *BT][q†ˆrgW>)")X\dSJ16QSI:342.-'-*"!4446975563/-*9@GJIDIGJJ=*?KJKML8  ;L=&/Rv}_C.%2&Kr?0JcdM3412/'$$*9537933686.6117B?30HG>36W2 (*  2B_qP$0468.&,00//+"#,6=1$8:49;56;:2465,//-4AI9/2B>#.B93" *fU0   3jH$"-+0)'+,4+&*7;FKKK@>;>;6>?:76;7/1*3AJ?)28A?"56   ^Y'""'*05>G?+ :43..,?;=>>>5- 6v†y7   7EP\K_R4,7\`3IJ=3*!AIIEEJJJKGGIFG?942855/,000448( (p„pH   4359OW=:0%3)&$$)++-(6DFFGGGHHFGGFC8:7:79674+%%$( _‚fU   3'<3=25F76625:0**,1*&6>::GHGIHFFFGG@9<@A?=:9($#& ItYU   ,42/075<@==:D>24%1>,)263>448;4>;79;DAD@1@GITS*;3 /SR=-)#,./3A;?FA=>8:535:G,)>##*$2=8;@;998:5>;5<1:<98%  +FGEC=$FY4 &-"+# *(41=C;%#(35:>78;::5?=7<76=>%      ALP84;HPB !$17+$+37D?87583-FF0'#.:EHE@3:;.2//<..)$51# 1'&2?217?Wdkj\,    9;;A4# 37<81/0//9@<04/152..72/,+)?2(*& (?E($7D5472-,/029<;.2/9O^ee_>       6797*4 "=(1?A;0*,/2<>G;+-20).07-5/('73,1% 0N22/=MMJS@:97:L?40..9[b]aG'     0/40# *"126443,'-39F@0*2010*40;A1"#"%.HACJNJL:9:G=80-,0RS^XF6    /).% $++1/>;4)&,-5891/132/.94;;;>?3%'" %MBFJCA57CK586/+.AKTXM5  !1# $)411+./.*+03071306;1#((&,845)))'$/@922745:F36231-4FORL4  */-   04/4&*26836)(--//2131/(..'" +&)-+(%$.-+0./6:<2/+/.-->IOO5&  '11*# )/+/&)01311-+-,*)-0-0)# )"'(()(')//'&/.1=71+*),+*4=HJ;-  &2-. #)20)..0.//-2401/121*+'+$&& ($$%+.-% )).76)*')+-06?C<. %756% .202./.-///3351.2//(*#(#% ('+,,&#%+,()()(*)'-8::+""21.& ! +531/+,-,/-/140../+-+%%%'$ *-*+)# (+(((+)'),26/& ,0/,  " ,//++*%'+,/.11/,,,),*$$01("!!/.*,+(!#,*)()&%&'0.&'.,-$ +*-,+**++,/./1/*+('+)"#;9(($)/'+,-*&'&()"#%+-+" &-,)%..+,)+*.,+*,,.+*'($$%%!38&( "0,,-+.+!%%$%!!#)(% +&&&("'0,,+)*),,,-120+((%"$$! ,5! --'#$,+) "#!!$  ($$#$ +(,,,*+())&*''(+,$ !&$ %"&-'',,,"$"!!!   !#"!"")$'#&(*,-'$!$%& ""!"& !-&$(%"   "" ! ! "  #!!$) %!" !   #  $" " "!#&*   ##%'$"! !&)!   "  "'      !                                                                               $*)/9::8  +=9999;?B:. (..:=;8/. %5(9?BDADEHG:! 8456%,@?)=AC5)% "4;;%8BKKHIFMJ7,?=99+3CB*9.8IC+:LF/5>6 9FF2',7ID,3KNMKHHOO>&2DLH<4>JB.7KH.0D5'/=68@L=67BLP@?OOONMKMOH69KOMIGLIB46LI20F?:;8)0 6D= +9INOORPQTSPPPPPOOOQKMOQQQOOLH69LF17JIFD;:*=79FF53:JRQTTSQQTRQQQOOQQQOPPQOOONLH;3EL?5BKJD<>D5 25;FBLPMMNQQQTTSSSSRSOOHDJPPQPMONNOPMJIIMG<@LMJDCEC9182(ADQQRRSTSRUUSRRTSRSQPNB8@LQOK?=@IPNMMMMM@AIPNJFHI<0RS6?B-4DNRSTTTTSUTRQRQRRPQQQK?:EOM@8565%@M/8AROTVTTVNMWVRTTRSQQSRRRSROMKJIOI8:IL<8IN9#2>ENOPL=58BGA8 g[+,,2>H>-/@E4*7COOKJOLMLMLB4 ˆ9"6&.983FRUVUURSUSTUWUUWTSTRUTTRSQPPQRPE/483+,85!%1AOE:>IJD715;5>…%'<>3:OSUSTSSTHKRUTVUUTUVTTSTONLNPSSRQQPB5..:2-# 495EMACILJ=*#%"]x1ALMSQUUUQPNDEOVTVVTWTTSG:0".;GPPPMBBL5-4:HPLOLFOSOLCAC?;z]!-DUUUWTTQHDBPXVVWWVTR@9;=?==;5+2JQQRPNHLQQSRQNDORPMKKH@4%2ƒ:/3;CMTSXVPTROKMVVXVXWOCA>===>===?=7--OVSSRPLJOG@C?LRL>=:6*.;8X|"-7EKIPVVVSQRWVYXXVXXB*>>=?<>?AA@A>=5'"ISRRQ?6<3*2;MP?1/'"/=?>?ADECA@@B>5%MPRRE0*.6:HSO@=9;ADD4;9 pe.7 -:QXXXYXWUXWXXV<,=@=>@?DKKONLPOJFGI="MTTPE74LRRSRPQOMB3&) -rW*I;EE=RXWZYVWXYYXU/6A>?@DGOTTUUOLGGFFGCE0$@VSSPNGQUUURSPL<0".;4!1xV",#472AGWXUQSSOJGFFHFD@A0'+STRRRUTSRC>KNE;0%0:J9*ug4 $@;,%=>FM?1_iI   7864:@JQTXXWUURSRJBHMSVPMKQTTNIGFEFD=A@75)JUWUSRRE7-'1+"&7GKMKG9+ 8dLI%(( $1>:,NSTRTSRN:%"2M?=@MPMKOTVRMGFDC:=;=7SRVTRPC8537;FLB3>NI2+.. "EIR_ZUH@:1-#)3>DKJGJD??G<*1:H??CKLMPTSSPHHFE<=;:8TTQPPRB4+&>KMQPLIOOG77>>0%AH_€lkdH;1)$17CJKKHCDJ<3-2;;/-C:# P`x|…‰€[N]VKM=%'132' %.01495KMLORB!.%"%+/-+*#"*/+;8*2B:0DNLE==2$;9^`qhKC<@HJ@) $*'"!-658<7-AJMTQ2$+3*,'#330/5+*0&A@>>:CNC+;JLM;9.#4+ACHNXiz{fU1 0-276/6<42+&*+.)% "01'&6758:00314(1527K<436774&3CGJE:!,<@:4<;5;;6/2.5=<08JKLKI6/?DHA/ GkW7 ,+    *[- 6:;3E78346+EHJKJ@'8A<5=;8<:1564,*.;FLHD=BK>52/B9$/B@% )`„}R&"'  /W  ".#.,*/2D<)%GJKHKLGIJIG@A>9:?907/3.7F905;E9&:??8  6e†]: (%  0H0FDB>1'-g20/E0$EJHHJHGIJKJI@9>=897;;65<920.6)3CIGFIKGD<:335110, "/02C=F;"'-+'& ",$?%+5/3626#587885):(8=CB=89=BD=BGF@;<=70742H;;?;@4:;<@F@;<9708A:6*?L #+$" "*(+?G%0<9'036B89@$A! /15<@>?@<7@2=43<7=:7;7  &JJ>;*EbE .0!*!.+(!9(6?9K<78>;2464HGK-:D))0146;9;;7595<93<57>62    AFF63#LYV3 /,6>E)%'8"@SH;:A>=8Q?),;A60"/98==AA>1:99@>6;<5:9     /DP=5!;L7"(0/2<>UekTH*0+8,=;;@CGDG>@>B72=14:-"#.>97;A=88<:<>9=?:/  GO?A5D:>-*%%$%3348/027185+%! F@BA0 #016FJEB??XholU) -@5>9 /2149:;<<98<;0+27<75884,,2333,,=641,*(/.%'.CH7/'%*/6;9C641.5F^cibA   ,-3C$ &78=;7.276:99810;:;2!!=('/1354*(2541!$('%'$/FED?:8:=99O>700*0JNWTJ5    "( !,2643/-357930,,3:5'!!57109/43769FC;5+'%!7AAFBIA755;20'*'"184-$,&#!@DB?D936><4610/1FPPK4%'4,  !.011.0/550*34*+.124040-&/+#&%(''))<6+0335931/-,+.=HLL;+ *-4-)"$#)3.6,2,7/,0.+&-+,-./'' #!" #&(&$&,.543/12876,.++*/?HK@1   '31&# $!! #*0-2)///./110*/.-0.2#)'!$%$'$(-033/+.695.'*+..2<&&?GE8)F?0)1;85.>?(5DOIJOLIG35BI6"2DLH>(G=/99 3==GC;/BD/2KRPNQPJJ;3BND9;JMI=)IF"&@< 3)-@MPM=/9LN@AMPOPMLMKE35EMONMMLH>'.JD'%A=29;0 16 :<)=HTSRJNQRTTRPNOIFONPIIOOPMQNMLB.9LA 0F:7?B;/".>2"8C5BNSSSRRSRSQPOOJ<35C?FPQRTRUVURQSRQSONL54CQPQLB>HPQPLOOOL8/@L?=?997  3@<9C>MUVUTRXRRRRSUTOOLQPK6,3@KJ@647;KLMNNOI+#8DOG@:;<4 WD$8AH=ETRVUUTUORQRTRRTSG=CNH7713FE3/76)OTSSTOE73=OPIJ90;907G<-;OG7@N@+(<LVVUSTSUI68CNSMMNLDBHOQRRPH:779J@02FE3*9I?.13JLMNL9.159:N?  *>SWVUTRVM9;MPOHFMORRPUQOSUSTQORO<&7@7"698 $4MI79BKJFIMA5.m- 6#8?BTTQTTKDM>;PSSOQSSPTRPSSSTSUTTTQ?0/4(43.,0!6O<'&6DNL>;B9U„&2/BKQKME.>RONQMGB='"|T,?UXWPKJE731?TWVUWUXV3'-+&'A?==>>2(0MUSTTRM;?L=:<2:PO9./3)#'87 dt/$$8LLPVVWJ;8KUSSVWUUXE-?=<>@=@>=:5"IUSSQK7083-+(AN?)"'-5=ED<%mf;#8=FT\WXWTIHWUYYYVWG'>>@AAA?@==9::1,LTSRRG60/<<=QI9;@DEJF6//&se=2)4KYXWYVQMUWWXYWC=?@?DDDB;;=EOLHFED.!NUUTSM<5GRRTRKQSOL?3 #3y] 0? ;HGHUVZYVSUXY\WU7(DGG@GKOQIGGFDCC:,#/VWSPRH7FSTUQRTTOG<$6@B/5rF (6$:737OSWYVWXVVWXS;9>?;?AKUSQPOLKGDGJHB>:3%WVVSRRLOVTM?CMEAA/8EJO<*,v\  !1=KJJPVXYWWXWWTPLA===@ERXUSTSLKFDFIEC?A95 PWTTTQTVSQF/8@6.$%BNOJ@1ef4 1;A?DRUUXVXXYTTQQPH>;?JTUTSVUOMIDEEGC=<:/>WWXVURQUPEA8%)'8=(ENFBA6) EgC0+-9QVTRQOSKCE9>=?H@BENTONSVSQNGDGFC=;:/8URVRTRUR<65."9AEB+EI3(*!, IQQ3 ,:DPL?33/2./*7927NB=@NPLPXWRQLDIFB;;97KVTSMORD?6(16*.;IQRVUSQJEGG>A;2 5@BMQOB;5(=NOMPTQRPJIF@?- XSTSHHGD:/" 6AIIFFNG85)AF0:EONOF3-8<3" =Z‰x`N3#%KK2-,7@A@@?=:+ &$UUONKHFF&/98669EJ>))&" -89RfhE! 18($P"0:1&*PPLFLP',%!',+843,.)?@5,"&:LE,+7: 08F>;TZE$  (IJ %&59,6EPOOSF!%"&).'07FE*   "<55:'!%!)BRNE3.47=1.-6:>>;9;78MB&6JNLNI>"& A?><:@<>    9.<8800'"IOOLB+&3=3*;$ $963!  .(9869:897)-QMJGJ@=:D;2;=/994+456<5&.LHJHGJ265>C2;>5=<04&27?4?MLLMD1/BDFI=" %`saG<:#  1  2::?J76518%IIKMLKJ&9;?H7??8?=46941)=HNMNNEB27>7?D. Vƒ^) +:&$&   7:4L:6117 9KLNKIID/=NG >`ytH $83$1 R  +8IQ0+4;#;LNLKLL>CLHIHBH?:8>03346->I:90;B#1=>5BHPPF'>80/7;-  3rA *4**F'.8<+>MJGIGJMHHJHKL>;@75<6=627E63,(/5;1  JHMFIJHJHFFIIFC8>A;:2/-7:8+&)3%   >P^>-$/  4yKO]MF?F582*,--)"EHKFEIHGECCCGJDB96::-43),%'$&' !4ITdO6*#'  #BGFcaNGB?$:87('6>%")EGJJGHBAAA@GHD:69;B<54,&&#$ 4@HJU]Z>/# !0''0(>/377;1968?!06A$4D=AFGDDDAFEHIDC>?3532#"%$ CJRLPMJ<+)-.  "."!#+(,6:==3/644D+)76<*%$*370DFFEBCGIHE:9698/07(/# 0NJJBGR@>%&52 +) #!"-=>8=95223;<<&&J1+&;?@@FIIIEGDJ:97::304/ &II?4K>9&'3%##'*&"5;80,39<43=7==>8E8=ADHD@94986839F<7#E9$/("172- ::,39:9867:,G:;9=>:>;75?0>8:=@ECC=:2 F846L\&%29 >6/864G@F<2I #=<@?A<73<6;1?67@9;>8;:  4NC50MmR!("*6@PH*&?.(543GF:,5>;2   &OJ:70 HN-,%&,11?P@&8'101FJ/:"528A@>=?5<65;;07;6:5    MHFEA/ &:I9/%4Jb}wd416.,.,*,4/1:C86*('78><79?;?B7997?8/"       +SOPI7+' 3=:1-$%,=MbpmQ88=<82-/18;<9::)>A>@FB;2>705:51*.499=6<7(FH:%+/4<@. ! D>BB: ":008BFA>96:73.,,6>BA<92/324590#C;0#=.+&'3A$$'7:5635<>6/;;??=:;;7;@?62,5=7.2/9('1704.'$;44*3+!- 0=R76 &-8:8C>6015IXbf`9    0/*<4/%97?=;7=75.624634<@<%8(-/84859!%..8!/#&&1IBK8;6?HMNA75,.=V]_]H*        25.5 598850421358:6899E?&/B-/056'18?;2$ !#'! .:MOB>E?8DTP331.+JQXXM3       < #977873/-2075545/6>4 '<*.624&+"&?>:5- , "6=EHNCB8DE:7//,69<734.//715>50*20*243;/.$'(#.,$#+>DCBD9/:;9441,.CLOI4(  ,06 *)7642/0/0027=6/,93/+%!0017)(0& ##)!)1:5>C.396:15-/)7GKM=/    $04/",'515!7*1/13<6+,/,3+/&)//1##" $ !%$1401+0.21G@,30.,*8KFA/ 00. + ! %/(,,(,1/,,,.2-$$251, "#'"% "#!*+.20.2/-2:5),-,-2;A=+'-82 "(2+/2*+-()+.)('/41)')32.##+%#  !!#+(+/*-,/0($-+0+&.7<<-(*63*  7:9::+,3-+*&,/)-..,'+11&##+&4/*$## #))).++.3.2',1**/362$12-#  +559=7+$-1+-,-,+'.01&#/+#"!)(-*#  (" #)(),(.*-(,(.-(++260"  *.-, =1;97-*++/((0.*''1+(!-%!#&&""' '&)(%),,*&&*("')-.%   %4+'$ 9363,++-1('*(,,+-1-# !%" # "(()+%#")(%#&$"%)+) 0(*%'543%#&%%(&((*/,'%$! "%&$"   ),-'#&'#!!!#%&  &*#$'/'%#$#)%''!*-+(''! ,&#'  !##$*,$$) $!"   &! " #&)!"$ $'%"%('! #('$!(# "!#"#$$ #%!##  !!  "#"!#"$"&# $# ! "##& $!$ &$#!! "" !%"#$$!&&" & !"$  !'$("  $# "  "&"  "      "                                                                                    ):8  6B@ !"!3@;(###?CA<1 +1!0//+*)1=H9&:;,1CLGA#=>'  +<19:7!:;=88;AJC21@E:#8GLKB)BF- %(4C;%=G:#;KNLMLLMH70?N@6@LLLA0BF+&7-8>>EL;+=N?-=PNNRJDJM=1,;NNHKMLMD5CG((>9 #,&2FQRQI;@MPHNPPQSGIRPLEKONA*7J3)1'  *?HI;7NTSTUWTTWUTUTQRF9?JD4&59IH:+$38GQQMNOL6#3F?/(.8/ h8&/1BQPKUTTVSJAEQVTSNC?:28JA2:42=?2*92 ;OQNMNG2,5EPA2;G7%(y5BB>NUVTUTUE717CUPKH:5467BB7H=187&6F7,ANA41CL;$1@RRIJE6,' []  :IVUWUWTRS=,9<>J=9:73:BFHJJQL=65:GA+4EB2+:C9/EL@ELK?5653#~<$$7NXWYVTON>0=G;<456=HSQTVTTPRTNNPN;%1=3"!"33!8OD'-138MD>?KPSSTTSUSQPRRUURO913&%69':-4P>## +7BLKH>'\Y !;>2AVVR<54D='409PVWTXVWUVUUTRRQSRPTRTOIA34F>.3-:F66K83@6/;FG?9<3r`;KJLSSQ<<7874721;NG9:RUWX[ZZH:%,52+ 8NUVTTSR?4:G=4=0/KMB5",! dl;)>><80&CYTVSTH8-;5#)$?P>4##-3:B<)jUB"%:EKJMTVUG7:TUWX[XYV2.;@?>??:4) >TWTSTL>5,;==PG16<@CHF=)'nU A++IPPNF3&0,5r\ :3*?MNUVWWVMBEPXZWWQ:?BB@@=8<>POIEFGDCB6$(VWXPORD3?SSQTOPNDC9&6BB07tI 2-(<81@VYWVUVSTVWVUS!!9BPYXUURSIDRSOB3:+/%?PUYUSPJHHFFCC@<<8(RVVWTOSRKORMG< .=C1:L;:,UVTUQOSQPL==>5,ALG<:3TTTSINQLJ@-%.%1FPNNPODDB6' 1T7-  4DKLC;72):KF7?KGFRG9)&*&( 1=/% $1/-23577763%&,5UPKNMELL."/;[#8VRJGGO-&/,.%"%5:<750DG@4,+0DKB;DB2 6C38$   /D915*!!6$NNOHKR(0523--5:ACDFFF?EG8$>KNLG>5  #4IK/4     '%:5*'.#"*LNMIST)3:65;8015:80685:LG2+HMMK>6#e4,!#0)     &67672/!DNHKJOP'!2;@80;;2954)8;8DMOF(4I<>G@11<$ 4ffD/ &*&  *623987<:9IKJKLKM7$66=B6;<1::5+8@KPKGH9CG3=4?7(/46@=I@IIMI17EA;LH3 Jiwa7$'-    +57KB8738*;LLHGFJI&0B@>C7@9=B50796-2CG@NPND6=CF@@*  AeheS& #-.-*&#  174<68310 GIKHHLH<";?EH>C=B;.6<03+6DKEKOC;?02'18 %EEHJGA966;47423>KKLB,B0," 0FRW\81$&"(/+(1:7'*3,*,"1RY( $=+,3-B=3";LKGIMIGCEEEEGLF<8>366=:,2BKKC'1'$, &2AGN^U='#$&.)0/$".3.310$ VWA.ED/68BKG9%!@KGHJGIGHIDCDIJFE;851(&'"&' 3GMLHQXkj>:#/)!,0,!6=/326;;= 858%:D4 -+15Haf@9*)'!-)$!(.-( /;0.94<7&86#+%17)%#9C8;>FFEEA:/,0'(-))  -486D_nN6< %76.),&$!*0.0 -416973'9!.'!438>GGE>5C8=CHA99=679-   "3@RV?3)&,,330+&! "$*$!+0+ //$776:/5<- !5>76=;B+9849@AEA=<;57 ;9DF40*'"6A1,.+*##''#'$%,** $./47135A72+ 06@;69<<-47687;8>@=<;% +I9426KbI?3!$#"($)*)&#"  )**6/35FX11/99;@98<:391:8488:@952 #@B1-(5TkT6$!# , !11154HU'@&57:7<:736/:2756<>7<8, =M@8; 5<5BAJ;C8'2-/0-0 &<3, 3859637.-/89;>;=662757<4885/$     .PSGPD(7"#079,519.#)<[me[H=9?A=9" (9<<>+(0C.'23 1;===;4414,26,6,      ?MGWH89%/:6/,3--()&4BN\_QJJDD@9. $6:97+;7)>0'."X6,:82,%(' !    EDID3: "&"-5?@>;85<7787?IKJB;7(#4857,D:"9;8 -# $  "#3>>0  &B4K<2- $13@LJFA?96151657316ADB>* /7-0E1 7C:!".$,1:B352E77;07"".8-.64-1>)!)C;A0'(2:92??7/38I[fg]7      0/3407C>A>=:;<4-)39;8.1>5602/3:88<8=D6 &:22,64=F?5)& #),>=7GGHCOYK630+/LOYXN1        $2L=A74;94-.32+5393<@-# 7 %0-'$-:20 +BAABI@GGJD4-.*CA1>8>74-/*<-4=3610,+/?DEE. 23-)#*,)+%!%*-.-(%25/'(*.8- -(&*&)  %/.--0+1103*0,-*6;:97;?=),8-0ABAB! */==2@CCAA@AHG=%:B=0;JIKG74;."(6=?3)@B/3CMMKHKGKL;$">KH>DMFKI=:D9 &;<;HM<+AI76HSOMPH9DM>1:LNIMNDGL?!8M>4:4->GKNQB4CRECNRKJPB,;KE;9OQLOM@ELA%:J52#*;>@9+:PTMLPJPTWPMIEHM;#9NI;3FPIDNN=AMD8HB$$82 LM8$:NNADMA8@MO;.>8  9LRPLILSWTC>HNSURB2>NI3.AQSTO@-5CNQ<5FOOP>3G:  7;GSTQC4>NH7&;DOPE7";FQQC.6?KM<0H?) 9G@+B<57u9B>,>UXXVLO=)04DK@@;+/:=7::5EF:3).=F22EF<929E@*&GSPKA>CI?,,>7&'802@~ :KVRL>>JI797&=O@;DPRXTUUVWUTTUVXXTJ:8:(7=;28#2>31JB%+"'4CE: bh8<3FWUF0(9@7.85?SVXWXVYXUVVTURPOORUWXSRJ>CPF>E>AM:1H?/@?8406CI@.qT;3Ia-( 7ERD6-.>RF:NPD34HQCIXZ]][[Q+$GYYULPUG?3:7##*DS='%&3<-eHH!":G?97@SS>5DWRWZ^]]]U%'/+"@YYWIPUQB8-?ADQN7);>?CA8!.]C4&8EVVUTVV?3?GXY]^[\T+$3:93'5CDC=3+HWZXFJST@7DQOSM47HOGC0'5- :hI 7GSTRMPTRD;7DV[]ZYG4?A?7("7NMIGGEC51#-TZZVDIRC7CI=FRDCK<64';@7>gL-.>:=QQJDNXLDCOZ\ZXG#;@AA;.)4BPNNKJEEDB,>ERZZYQBQI3?RH?NONE0*HB/7kC , )69LVWNGPXXUSYYZVWK5=A?B?8BMPKKOLIE@B>>&.XZX[WENRB8ESHIB;7"7=.JE0/jL 5=MPVYZTORWWXZYXVTQP?AA@@IKRQMMMHFECB><7 HYXYWBKOD4:NPNH4(:GG=MG: YR) /:BHPONRTUUTZYXTKEBFLDCDGVSSSLLOHICDC>=7(OWVVU@JNDDLJHMC4:DJMLQGA- D]A ,9BLD=5DBQLMKG> HP7  %6CCE7,5BJNJJJ>3748ID??FJOQVUVSLGHIF8(!/PO?;CLPHID/'!/FG:?QA<859(   3T2  .:>?3,29??=A;55.3=6"!1EINUUUUTOKMLG!!!%2=CIE;=8)67HSD;6JL>862 .R0  *<8.*/3504330232:0JB9NWXQRPKKKH/%27:B;62))?KDCMO9 5WOONNMMHF)((24;9:3$&@B)!BJB1>MRKHD8 3=4&   "''))!VTOONNMLO2%".9:3%#";1+13?GHGBLMGFC   FB4     $?K3:-"BVTNMLMJF-+/+//**:BB76HIF89<00CLMHC/  :NC.     '/3+%"#"$.')PWPJJNI='.942;;$)5:@GG?9>>:2*) 5RYM7     149:?=<90(PKNMNIMID>):::B7==1<:*(;EJ5=J/9I8A=;1>;8SOB32(00(    -64?=<965&NLNIMJLHE>3>>;@=>>:?7,42=FC7J>AJ0><@@F< >TQ>7623& "%     87`G;768 KLKILJJIE;;<@?A>DJIOB7;AA=4  'GVOB=7226/)$! +/' !!$*#  $7934356DKKJLJKKE56<RNI@0.,(  +IYdlZ32363444-%#,+ %.,05301%,JHIIIIKH>:B?CJMLI>;-@;,-34><=JM>B6#$%#@IOMRRM<5636852/,$"">B:<5+0>/,AIIGEIIIDFHGEHKLKB98?76=<"5::CN:5#  ,EMJGN_PI7417:93/..)"&$"$ #0325/ <1=LIGF=*/FHFHIHHDJIDGFFFIIAAB?<8312?G7  .=HPM`^NM;326462,+10,).-%"$*/2'%+==.2FE<8A&"2HHHHIJGGA4,+8EGGJIB3)%-23  4;8=E@=>DE7( '&0-S^?<46=3647-'&$%''-+,'#$&  /2145#*2!CH7%2>G;89B<8CEB>%A946<==>?>;7 (=WL<3"29:5*"!#(-*%!',++% &555696-# 2(1D90@BG:<86::?7A7:< .H:13&G1*")(+'%'&#%(*%(.16  3775/.Y %8;<<;:75 &EJ5-0+kk@&'%',-#  25771G`&$ 987798:A;" (3998:;1  3K>785-`57YXA2#$%(  26747=E@5*'029389=6$''$2(.!     BRALM,DG%6>9-39/-/'/A[i\A$!$+156770:SBB7I(.):559:3##         $LHQN=!T&07C/66;601&#'.>R[WIH@<>DKRBFE7733<+::;4"     ;<5E2.2>HIF@<41*+-35<;8:07GJA>25/1$0$'8;  7%0/68A,13=WhlaB!      *,1A5:FHQG=659,&&039=47<3CI0*16JRciV3         /(4.!AHJRG8358=++-17;62"         *%)1AFC@14211+*1/<666@BG0#!'8441,(@>2.$(%06>CLGIOFE:6/-3SZUYN1         +9>C>@/6658*+1*2-/7<;?7.( :,29.)# ;A>:7520%  9;,/>EHEAA>69@DFG& ,;0">::JOIJMLMMJB,6DFBFGAFEB !1<@C>0/D@.>MQBHPL;?HA19IMNQI;DNB-0:.,8=BGNHH?-CK?DPR<HO?19IR=4HPPPD'$7+ !APEESZQJNO>0=>DQP@,7II5)?KNNQD1*@MPA&>FIP=0=9 *9!6JF8DWXSTWI;+2ESN@ "1>MA3EA8% 8F?.GN96MTE>NUC?LO=;=+=F?*.27=@:#!@MQG@D=JIPSD8FI=-BORQK>,(3/6;7+>A6)1&5=)5IPONNLKK71EPOD32<>>j @G?+:OSKN>C<)17BF;?7#=?=::5=-:FRLL?:D@9) iA !.CSOD;LQESQH<4A;76)79:?NQMFEKVMMKHMB7)3.!!$!!?N99<>@>=<82 ',GXOSPQVQKBG87EC0,=DEHRVVXYVYZTZSTA73:2+/9?>>%(8+;N7 &'/8<8,A}% E7+G@(././ "<;1 f\):9OSJ@'2?C2=?AOWYUXVVRLMNQRRLGC@CLUYUSTQUVVSVNLJ?)DB)>BCB>2:@7$~?"ANTIDJ@*?MN;(4:1AD<9=RTXRMRXZYZZVLKKGJLSWXWUOGHQPVXWRF?>@QHF4,EP96JH@9,Pj> 'JJ4386,#USS")F7%6AORF,88JJ2"?OUQOMVR90BQYZ_][]\O*AGIA4.#@Z\]SBKRSA9JGFMR?-:H<<0%.  Ap; ;KSF;8DUO<7=CV_d][Z6!*#&GHDGJD+G?X][]O;?MG8G=2:LA7CB-#$BB AfC "2C=JI:68HPDA8NL8>LC7DQINA%).JB-@Z< !0:CUSK=7BSSGCRWXXXV1.CE:*'*ENNONIE>CB)1]]ZWR@QRB6?7.YUUXJ@OB:@HQRMMC13@PKKF=1   CK.  $>EE=84ETSJFPVURUQLORTICBKIKPIKIEICBBG)!XWWQ2BKQOVSEC?<305>K;CB?5!    6[J &6@B;/-@NUMNSVVTMKILJB>;HEMHFKTLLFCIK 3CB)3=BFSWM;;-*4;+BM6740$$     1gk',885/+=JPONKQMHJC>=2";FHIJLRTQPLHGB  '68;GLMA3 3GG=81IOLMH<*  5iW5  !(#&2ABGJIEFB>@@9L /H?DIQTPQNMJFFF"'08AAF<)7EEFNJ16DFIJA8  3WrY"   "#346=A<;:::9)>M'#"(GNPPLMJEKM$&4382!'AB&%=J@);BMLF? Eqk!  %   &')/148,/.+- '%?QOPONJIKL'$$,$!)+3)46,=E>JFKA96    0amQ   *NH2%?TPRMKLNKQ@  :4&'&.5CE<;JIG:#;:9;GB)`dM0!      )7&$%$"OSTUOJOHGL"';B@)B)1$.'25=GCEA CKJLGF 7J@0$!!   ->=>@9556USUTSQIFDJ"71AD/D,=<)>"'%&%  %  & ,=@ABE>E/BJ-1L;;C0" AE.18:0/,%' ("7>C=A=>&=TRONPJONFFE4DB>H:C5E>$*!6H@7G6:P8>; FMA@?=65( ,1+&  "$ -:;566;04QMNNROMNJJN=?H?J?DCB0"5;%?I5?D8JG4$ "Ub`C869:8# 37(,,- (#%!  4;14564*NMLMONKKLJQK9@IKHKF651=@+*=56FHDLC/ *KNGEC=:?>8743,#.3,1#   9+,46./GNIJHIKKKIFLHFJLNNFB12B<(5/(4=JPK@&  #MJ4'#0@>A9248866/$--.-,,-72-(2(10* )?B=2:>,;LMGJIGHGI94EMIQPSD>30@2?> .,:INC9  =OE) 15B:8:<:9362(%%"/41120+).,$(-/AIPPLL%#JLLKLJHJG;" 2IMPRN@9=EB=)&.FK> <6=0$/3%,D<;:9711,)))$.4442./3$-&+9*BJJIC3)*KHJJIJJHA"8LNMLIL<+0,"&+49)  8;HH@=@BC<.,2  ,)1561*,22"*:10,&)',(## 5.+5>5#&=>//#%,=JGC;D>B>@F@AB;?'"2FFMI@0;F;  /;G72!>=96.$!)00'(*,*-2- ,459792%$#9JPLHC4B?7=A7B7D  (;;;@6 -3<5%(+/#&)/0:) 57688FK$&!-JLLNC!:AHD?&@<@5:A6  JL:,3,Stb "*//('(*  4:61-E=/" -)&,IJ947.^„MLF!'!'1&!  7<32C?<;A()%8?+%87==6*   .L@?P>8<6;>83,//3-0(@Q^YH) :8.4,6NI7# F&8< &699:3%'   BIBTA3'.,*<,596-1)#*#+8JX\IDA69 483+ :>7'99%4<3)$    @>AN<9#-39=G88) %-3396@@D?KM;@7362,78<=*!9/&      84>B;+468@K=6.*$026;>1:HE?1 .604;<97*&1#)2!$"$)%7 #&4:BIA*        -,&+;"";BG?>:1373(!*8CD>?B@87AH:1!(6023<;5G@-,-EB@GL:>870*1T]YYG2         %5A@9?7.0(+0&$-$10343-(42& $/%*+)/,&/,('023-/&2.;6 -+2&$"&&.0,+?:4<=8++..2:1   0ADBCCEECA?&$AEEDEFJOQD;BB@LUNHIG;=K?+CMG>2ENC>EJ=GNOOH=?A5AI>,BMF=BNM@6BLE6JLOOLG"  %BECEOROJMH5BJKHLD5%2CK?,CKF?ENF46EKE)DIKKL:("BH<=GLDABLD0=C>BMD5;HL=/DMNLNI;(?HMC5ACIH,-@=&  !!6LD.AKKJIQH<-BDINE6ENPI?).DLM?!!1GF&5ECB1AE>KL=3DQE@KRA@MKCB?(7@=+292FRMIF?2/7;=>1;DD?-23A@%=JNJFGDEJ=!:>@?+(BNMEE?>?<%q6 0CNGE=?@?;:+ { & 1HO?FPTHCLF@0>MHACA@KUUXYVWYULENRJ99;CAECECDB;0=ED4ACLKGRVZWMEADGJOFCBAAGOPUWVPMODEJGNF=B2AB/AKLKA96/{7GH=.(0,.BC:?IKGMJAFSW[[[]\\ZZYX[[Z[RD@EFAKMOMID=@LFD4;JL@2AE?2Wl?".DEGB?/+DG@=NYPCHX_^]Z]G3#!##%&-9JTXYS@;70DEFD,681_U^$?8*8CJLK0EB?BSTER\]\]YA."('%""5IYZXNCHH?8?::8*.=C;JE/ &%!{JT#*CGFA>7DN2ELIRWNO_`]^X+!%'#'1$3YZZUBEMJGD;/AHI;?OB(>C?: 2„9%#BSINMOUQ9;JWWXOW^[Z[7 !#1DE6.07DFZ[YZIBFFK@GSPHA>FTSXY[[--?KGFGEC9!4W]\\Z08FM=?AA9CQECF71DI@ C{8  %7@OMQH>BPTJ@>KUSUVYN2:)0ONKLKHC@,=^^[Y:AFH@69@B;MSRB2DMG># 7zA  "CIC:DWJ>>CVMA@OSSSVUTN@8:967AIOPHDIC(?NBA:'a] )BMADRXWQAB?CGMLKMMP?>DHJFEC;K!".VWV:%8;4E($/45%$14DJF;$  \|y2  #5%-79@>@B>,/GN4 +- >UPRPLLML>$ $!+!,%%2748=*@E:KKL?9 8q|R     %7DF/!+FNRONMKNNV? *C/14"0;EEFIGH<@ECBDGD+ 0geE'      #&;RRMLNNLLQ+#:C4.D!1;AA@.>I=';?<8=*1W>(%     +7 -)$!OVXULNOKMJ)/7E;/B(4#2(5>=+!2?>39IB1H;G8 8C?NG<+%/#- 4! '  <@8HVGB#LXSVQUSTONML3:H>DGBCKG=$6A9EJ@;K=/7  7NJ<+2, 3.#!#$$" >:;;7?'DUQSRSRQPQK@H7IEADKIA4,%3097CKC<400-* .6:80+(+(,(!5=,4RPKKF)%$CQPPMNLMM%"#8OQQKHLLC>A3#%$130  ?1  '<8;<=967/-)&) $"$#&+* "%*5=6'2@E91)%9ONKLKLO; 7<:A052%/MIMMIE1>AD>C<>?;77A5- 2*  -' %#>;A?<4,##-//-&-/01/0  (:9H<%%+%KIJMLE4@?BB@);FB;48-,,-+    7EI0%>72"AHA?60*'/2.,03697#  69>@A4!EKHMJF9'@AAA-1,9>5  +>RL?=8"&(2.-?GFIHF+;>?A>&(0,'5.. +%-.,,2;>7  &;88=DV &'GHJHI@@=<@66?<-!$"* /SC80=5_j5 ")02*%#"$=868HR0"=FFFE:62   QJ?J(E9$.875;=250&)()/8BZ]PD6.%  #72-+/?1!#ADF8!472     $@?EC&61)+78!-!'088>:653.**28>=8<=:2>KD8* )96*%5.1EB>)0,4567>C85:K\jg[;        2*);1"*;<7/=/-110(,1=>?@ID>9A@J<6 "J042)8(9G@4$BC41<@77IR717GY`feQ/         ++1,$*-;SQ?0+ /82"#-7@D<H@&&8<853;BFPP<6/7Nc\YZ8         8!"!8>NG=7 #(/( ,09;56@EFC'5= 36., )6%464-9YZYWK2        *$FRTT<4448JQUPO2     ")1$$?E;68/,%-,+(0-.-+.3;530,( 00'#"3 ")>=*-+:9@DJNOK9140ALQTO<-   &-2'"6A?>7%&#-1*)0,,92),-12,32!0/- /&/::!#5>/7FHI?40.1GHJLD/!45-2*B5;0-'*0,'1-$0554.+*.32( 0,/-1'2722:@@6?B>FA31-->EBHE3*   3261!-25405'-05)1/.0,11),4/19$ 3-.#,3(74,-49>6;A@=620.2?CA@5/ (84'#)/+.,$$*/.)'.12/*&-085#+-#('%&94&'43:767;;7.,0/8>??3&,0.+$4.*/-(*+0,/-1016-&/-0,&*!$,%"'082$#!*()011231+,+319:9)# #+0. <,+.).)+20-/0*,/.%-34-'(361" (+&&)-0-(,'.075/(,1*% 7/.,*-+,.+&+001/+*01/, ,,-5,!220!(+&&$),($)'')2.*" *+(( 0-/,-)&*,)()./..//-+-$  .-&!!21-!%$'"%#("!#!%)*(# )%"#3,+&*'$&&(''((.-)(%%'!  $0-$%!#! !#&#!  $% .*%$$($"('$('(*,$''$$"""%-*+("   ### "(#&$ $#$#%&(&%2*& %))'(#!!" # "# !! #!$$$# &!   ,(&(!$   # $"%# )'% $ "$  "  !!(&  "!  " #  '#"#      $      !                                                                                      )$   3@)3BCA@* 5B@7  &BDCA;ECBBC=%?DDE8 62*' :HIHD1AC6=CB$1CDEGA AA$5C9/IJGHD60?-?FD)5E@AFADD@  4DFC !EJGD?A?'C=-BFE%>#AB@=+  !!0BEDED'3IIEE757*;C;0CEB3FF:*5B87@@<;- !'3FDAAC=!:FECEF6',>C8/CDB99ED1*.)DCCEED73:;=8)7DFB?;;;=4&/7:.$S[")"-KB5GF7212;HF@97DBEEGJIGHA6BCBA:(.9<<72450')=DD=' z-( /FC=?FE7HJD/>FE=;78CEGDDEFHID;>DCB;+-1327760)'(0BD>6!#}.)(+HK;EKLD@KGA4GIGHGD>DIHGLGIJGB>EFE=42?E> Ef) !**'7>/;>5CEDB@'p5/'+@IHEDE8/057AEB??FIIHFDJT[^^][ZYVPICCFFG@2B<@<=A=5A9?A@IC?9A:0y<'(;E70..+2CA2EEECFGFFHPZ]\_`__]]\[ZZ]P>;A84DBCABB98BBC9DC>E1G@BGNJEL[[Z\_SK3'%'++.-.49JX]Z[T@9@99463/207@B8?B6uG!V2-DJHF<6DK=GIFFJGK\\]\^D-+(&%')+*+/27=DOZZYZM79?>9=:*?B@7=GD,  -{50%'DN@HJJML?CNKDJHQ^\[\U-)&$$&%',4AHKMRQPLTZZZZ?9=8>@5??>8AED;w'  #@LH9>DIMIEEJORIO]][]O-'$$%%%'5:AF;1..4:6RYZZV/+)2?8<.-3ACB(<'@t% 6IMJD@1?BIILLH7' **N\^\H)0<9)1>B7BCF?/:<6;}2 #@MF;CLGAEOQGAEKPPQOPOOJFJLW#%?BGIKFB9&")K]]\K *#+(4>CD79BD<0?:8 2vG .:BGLOPH>DOSHCBCHKHIEEIKMSX&%3>=@B7.5,'P[]\D-).9<>@CA>?D.:A43) .tP  (uZ/  ''4HOUOGCA?CEJ;1>G;7,%=:8<>::8<5&!I789/,))#%',+2;<3-CFF=.?A;/TuW   1FPQOKGB>@JB5=HU*';=;CMMHLRQK@DP?,'**'%)&,-,72.@GEED9)2/. $fdT$  (42;MOIJLKILKCC4)>HI=5J81JWTTOHFK<()++((,)/-#$3@@=@@:)=B:. Lsh=*"!3:=4+(5BGKFJGE%.IP@0$"1$&,.EED?%G/+7655#"  +F>6AEE99VVWXUPPNPD/"!D=DG:G6CF*1+':GHA2F:?< J:'&-+*<;%/-(! EGFELH:LVWWWVVPOQF7"5H=ECCD=FC3(1"AFDB/C6$"M9"""()&&+-: ,+ # 0GEFLF>PXUUUYWSRPE-7?KFFGIHLDB,.:,5C@F8H;LK3 %..!97/ !"(/'$0."* .@@DB: ITRUTVTSPQ@@@KIDHOL=4=)3D5,9@?8$'?SQPORTRRRA'EKMDNRHDG5:;E;315?H>,  ,HGC: 2+ 6&&+)  =A:@.&+)SPQPPQPOSE5LNNQOGC:==BE>$/.5AD% 1SC=3 +0 '''+,/38- '*  4PTNL4+)JNPPPQPPPG#4NTRMH@>G>HFB%,*0/ D8# &.0//-)-130)(-.272'+ GOUTYC( &7QMQRROQPO -:TQJIEGH=F?F3//$ 52"!  2<@A>;3524+/48331. 0'#,QYXNOI'"!INRSPNPSP!&,:JRPMKIKHGA@/+ 29 #  "9BEDA:30100'"!(,.#%*+-!'3.(92D@,&*"CPPOQQRP$+>@COIKH>FGDEE%  =("$ >B?;8989931.*12./" $1=:59C3!84),*JPRTRQ-/HHB>:20)'('*)-1396,"  -DFF2+)/ :PORQN43C?AEJGGGOF:)! 7>BH8 $;EHA81,)$#*16217>?9*  >>G;@!.3OMPRO5B;DGA>   ;9ADHC7*, ".7.('&.0-22455==?- ,;8<@=%##&!NMLPP:(;EB;4@9@A=1 =LDCH;R=3,!2./-.(&*+-,78+ >8>EBN'9KIMJ<.@@<16,6>7 @OC2@CaOF6#(! 96;9EG0' 3HGKH?)@C?- !!!  BH60M6[QJ+$/207*$   6=7D5/A>->HFOHE#%>A<1   E@<87*QO(C:52/>5:8/,(;A:9G=%  241(!'11 AIHEE36.    PDI8<6$7<699=73/,0.&04@R[QD/(  :402,0GLGFE"'     'FFRH*"&17<@5362.+2-,68:?>>D746  "7/6#.BID?: "#&      (1:R9$#*778:/('2854;7<95<:76?J=:/ )=/#2-&EFCB3'(0)%15721<7;?:@>35;;B:: '?26-#$$0CF?>$&8C::DE@H[VD@:CZahcL1         :/0) 7,6LE7/&$*.43'*7;C>:BKE@@:?B7&>)1"-3- GE>74<>97BIOXUNG47U\]^Y9            "1"))-9>I?50$(/0(#&*2??<:FGCD7&89! 26'.) 0'#C@=).4@>5;JTSPJK>-DTRY[L1          --8BF=9.)%)-(%#/7644;AA?:&#: 62) 5#'&%2?>;% />>@GOPKC=B/:KRTVQ7!        &+8()@A?<10(#,-'%,+,-..4:45470  44-'6,*$9??=#&6,:CCFLKIF820?MOTT>1     +21, /AI<3(#*1,'-,.-.).351.3/  .70/-$""<9=6D@=?HCE=/--@BMOH/ +;91,0C?:2*"11#--$-/-,*..*74" ,9)"45"$:89,.3;?<=D83,,ADGFE1+    2-:;*!0./>661"+1-.,,22./--0-22!  06"'),&/<66%'79?8;A=:;81+2B>A=8*  -5>"# '(0.1-'+'+..--14331&+074  )%,*(#&6:22&304:698671/+-98>=4' *+5#")+1/3'**-11.-/202.*-,,(   '!-/(#)672/,+,/220/.((14897(% (%10 '8275(*(-31-.0-11.).1/0#%#752,'(',1,($((25771&,,.& *4.5,-'(-1+.,0210,*2/// $*-./.&'510%"" #$-,("&(++./+ ,%(&)*0.-+&(+-*)+*+-1-+))(" &"/1)!)20.")!#((#""%*)*" & )#%)+)))&''()*(*+12-)(%+   ""(/,- !!##! !&'"   "$) ,('##$$$$$())',+((%( ! "! '+*('+#! "!    "&! # #"!$%"$%''+)'! "")((##)'%"&!!  ! "!$&'%"!& #)('$ !    #$#)$  )%$ !   #" &   &#" !!""! %%#"  !#                                                                                   "$$)()%('(**'   ####)/+ &/./)***((%&"%*+,*07401..--/,,*'+-&  $!  !),/,,1109:1,544683,-(5970#$(*$   (140,2159<<974#5977971+04<;9.$(.!&&!#*/7686/549:>?>674+7947<;4&34226,!&.14',1%$42464466=?>204A>><;8:30;869;<2,33331&$$+0441,%$+ (3/1791;69::-6322--)(!'10...(#,' 10.479/<>=@>9@49<9:;A;0588;:83/<9922.1/,('*,*((*!!"$#0/.4/5=4:?;>A5::<;A>96=:<4:869<=700621)$&%$#($$$(&$,,3765CC@@?75>?;7=>=8<=501512%',((%'$),+!,*/47@DDGD?>?<;=<:443441402+')$+-$$((!%a",*349?D@AFB;>>=?@=;;<=88=>=CBA@<7979:576547672'&$-0-!+&! WU).46<;;D?>?B8?<=?@D/;@@A>=>@C@?@8;>:;=89:467940+&)///($ #*%v'4 #&14;>=B@BA=FA9AACB?2B@EB@A@@B@A@DGD@@BF9EDBCA@CFDC@@CB)+:4<><:87;:4/+640,(0,&$)$ c>%5 24:@AC:B@C@AD?;A@@CGG?FEEC=:BHA976;=6>F:99=:98485/+-5457'+%1&%#u+35 3<6@>@>??@:>@9?>?BECCGEBDXbaa_]a]VH40>A:;:;56:6<5)047310-3,/,%$%%" 2{?8-8>;<=8=>?93ABC>ACC=DJM]`bbccaa^\\]\F047>:>31:?93.2:815623041)'+'"  Qo73463618865<26HFEC?>EV_`_aba^_c^[Z\^_\]\@044638740-114/185325,0$!#*&PY3 :5<==R\^^a_]TLGMSSPJDHNV^`^UL8..430031/.)397;81+,%!"+($r@@9<;>99?D2CE2AAC8W^_a`YI@ADIJGKIHEELRT[_XYZH/,51421-52236;:2/0$!*&$ *w1#>@<<CDHMNOW[ZZXYURRWZZVW2(.**1140-26;?0.$$$$&?=429BE@=GKHHHZ^ab_ZLFEJSW`b[F;41+9>A?A[[\]5#,.-'664AA0+5<::.AFB>HIIHKQQXVPEFQSU\SDG?@EC<76:@27?B6/CJJIGHIIHLLJID=79A28:=CH=1*-   >|B  .3)8DD?52FLJIFGFEEDMH><85TO)6><2;0)?@77=#3A?!#"(<>B]\Y1)-$#+26;?=A6+8CCG@)6>0   D{C  !#1697;A>EK/"<:+0+.%,7FOHIF9 J?JPN925251/'+4332/-9?D@99;0H+  eZ'" .<<9;CG@A<82/>J>$;4+#4,.5?KFELKH/2V>:8:;9858/,$')4:648669?E:0)% @f?% 5?EE@;AHJE@D:@CGGDFC@3AFKE<($&2:6MUUON)CF5:<;98C@870+<==651B?51.$#  OI%$574451"**!!%*'!&./'-026IO<'!#&-7AUUUTD=K2)698E@H:12(-=@=5155.1&#! J6"*A?(41- ""111'%#  00A74!"*=:QSRTJ,I)#,27L7G9G32')-;:32860+!#" ;*//)4)&4+ '(-3035, 4;/'"=G,!@TTICRRNL";%+;;50755+!$!5.8)&--1()-- - 7%*9.%&ND@>DF47[XXXWQRON,+(.GBHDBK6KH@2.1:6317..)$&$ )D?*79990(.+ !.@<30440DKFHIE8KXVTUTXOOP7'@GBIEFDDLFG81*'225-3,.%('""GI% 0I?/-#)33,#.66OFGH;3ALQNMLG>7$.+* &1/=B7 .XQL6&)TROPPQROQ6BMOMQPLE:@GGI@*3($46,,3 ;VGHPK7EHJGA2.,0+$!&#',&#'5:>E@5<;'8=.&  !^_XLQL-FJPSRNRUK%>APQRPPNNOLMFD2E=1093   =VA2BD?IF0' "%+-;@?:34/$$/-.%%);:/-1 ,% >E5& #EPOKRQSM,ENLNRRNNHOLGE:4>?;,-" II:?>ALP7% (5;BDC:162044% )/8?*.;56'(!8;&$)-=BPQUV#8JKILNQNLH?KDH5767;9, 5FJC63GAJMNNNQMH=@3/8>?<;   2AC?9:>=C345AD>8DE5222.07?=7" 15<.%7-#2PTTVO">=?HKMKGKPIA-3C;'   (0?@51A/*MPSSM <7@AIIFDIJFE,48@B<;1  8@E>F?=/)/EF<."-;6993-   77BL?'2>NSRVP!9A?DGIEGGH?/>D6>?D  *AA;NF2D4K=,"#%06660)*&#&    2:E<;6,>MMOL%349DIBDB:3,A;>/B' @L?6O>^/&#  ".    -9B9DJ25$MDKLMI%*,<3'00-++/,@7<@# >@:;NAW(' :,,.$     6@6A2*=;.1ELKF:$&$&#!#-,.319. A::;8GG7*H(1-1=44<53&#60;E;(  /40 &#7(FJIDF8/!   N7D5&3/-5?617/200744-$/2:5/+.<<54<48;6:3/044;>@&4!&"30DFCB%'7ABHLIHRSMA78?XafcO3          >*17//:;B652#+(,1.-+6>B98>H@=936@<&>+$./#43$IGA; 46ADJQXOJQSA28?Ke^];       '/'*689D62')'-0' $-5A9=8CC?>?-;<%.5,+0'#..'DD>/0+?IIQSQLONA71>QO_^N1        *1B?;@*,9( 35)9. *'3BC<% #%:?CJPNMK=6117-$ 15!15*$)>==;<;FCPLC2504>GMKE0      2?>5&*?<70&1+*083860*-.0/62 **.23) '<;;1.5<<:AG@DA.0.6@CCEC0,     '314;!,(+;558 !%,+*,03852/43-12 $)&,)+)4;69&+0;E=;8@A;00.8<@@>6( %*29"(0)4(5',))0*/+16990(03;8 $ 0,(')7;14),(+1>=95@0,055:@;0%! &,2 %*.-33%)*,21,.5611/.*12)  $ +-(%(764/!/())*/5544*)).7895$$  ,!./&5279"*'//-+.1/311.00+0 !"#951*'&+%$-01-$'$2335." !)()'1+6,*&&-.*,,1041,-.+.. #&..--#'52.%"%+-&$+(0&!!#+0,/)  !)'*+..,&&'+***-),/30*(*'#  %,/(&")62/ "!&,))#*'&"! "())*! !!)*%)&+&&&&%&&,*+24-%**)  ! *0./$ "#&"#!"! #$'$   "(!# &$" #$$$&%,'(/0**+'!""! *-)%'&$ #! #$"  "" #!!!## $%&"'$&***  (*)$#$#$!   "  ! !#!%$*%&+('  !,-% ## "!   ##&%#*$ &*&( !  !"'#%# !%#!#  &%"     #!! %! %%$!#    !!"  "     !                                                                                   )&,-1013448432. /7986;A@A<@EFEAB?CE?9,)2==:@CAFDJJHCGIKIKKGHDLOND40.  8?@::FGJ>JMKIH8JNG?DGFFBAALJJKPJGMIJHKLONRQOH"0ADGONA:DJHH@AFGILCFLHONMGHKKLJLQOOTSSRA *B@EGKLB@BGKFFCAKMOFCKPJPJMKNOINKOORNQMNQM9;  -GD8KMMHFAKDMEDGDIJKDPHNPSPMLNOMMKROSNOOOSS@@B2 4BIL9GKJKHJDFLFGIKCLEMQMPTRROPOQQJONNSOPNPQQALO>0 /GGLMHMLIEGJJFIIIKOHGMRVXUTRTQQOOQINQQQOFFHOMIQMF>5-  /?JIKCMJOIIHOKEKLONKKMUVXZPKPNOPOROFKMTKFJOOSMMONIF@<4  6MKJABHSIFEINNGNOJKJLHONQQKMNPNQONUQTSPMSKOORNKMQNNJ:04 (q:AMLJGELPNGGLOKEJEGKJIQMRTPKMMJEINUPILPUWXNOTNQLNROKN59?;    ^E8 .>MLNHHRMH=GJNNPFGBHFCCQUJA>EGF?HI:VPLOOPSMINQLNPLONNMEOBJLPNNMJHQQSQLA,:HA0  H\F& *DG@=IGFMMHMABIILQJ9UKGFKMLPOROLMMNPNKIELKLLIJLLKONLMGKND3&8?* oC'=$ ;BD??>OOOIJAIKONSM@8KCAKCAKTXVNIHLLLLLFHJHILLJKLJMIIILKLSQ/&<1}*-=& $DCGEBDNPNJC)#91,/ZbefecaUJLIFHKFPOSXRQJ[a]YP0:7C:@5E@6?FEC7) @KRJ4>]C! 0@I8%$)4VGQbaY/".48BJJIHLPKRLMQVXNP0A<  IvH   $9#3@8F76FD@=<6(5HKD1DHEGGFDCF/27,+5@47>DPWXVK=RIPPCFB87N<%4GIHAEHLIKONNOIO;T0   !qLP714.*;PMGJEGD71=6IC&FVXUW\]ZUFC'*AFCHIK?OLH,1?KLJOLONNK=$"  40>KH?@@>.77332( ).2044>4  "NMTLJI*>\WXXWYYWTJ<(6KHJGIL=NQN>#0JKLJLSMKF1$" .AKHE<49=F;1-.54+"(84.-5>-  >IHIIG3PWVVUXYWVVL/0@NKJGILJMNPO7':BLNLOK;2'$# %IGIE?36<7<:8892)%&% &%"5=+  ?DFEG/RYXYXXZVWXK@IOJJKLMQMNTJI0 /HNNMF,%#$ HE;@H>@AE;4A?<<;9,06,008?66(  3JKG6LYRYWWUWVWB>GKJIQSRJKKIGH=-;NKB9"$(+  LGD6DJAHLD=9=F8769612)")730/   [TJ8 7VUSUVTVSUE&HKNKQURJMJDNL54&6E8*&25 /JBIB?H7+20)4+'%$.6*!  )`VO6 %-XTSUWRRPVL;OPNWTNPNHGPLL97%*4(3@ 9I<>F;CLDCGILPMHCAB),.,'.212(;=)   4^PM<'"SWVVUUQUXS"8FRSXQLLMMKRKL?F=,"(7;'  *X@2@ =GICFQRVZXTOLF5%B<-,(15&(.9   GIUWL*>UYUXTUWTW%*>KEXUPMOPNLNHJDKI?51@5   FQ9/72?IMQVUVXYRPI>20""-/285/"59) LWUNHP/ "PTXWTTVZW$)HRUPNORMQTOOKKLNSTB06  AD)%58:FMU]WVVUMA4$)5:/# !#(661- !"-%"9A8)+VUXOTUVS -GGJNQMNPKMOQNPNKNTL8)?1%*=5?=FUVTWOG9*'57AE81/*(>A8=DOI4G@8#)+&8>(!%"B[[TUUS"?ILLMQOQRMLMPKMLOMPS7  0E=(64+0F^WOIID2('.=B?73%$%'%&=@>C214/'#:*>+,7(BIOTVUM2)!'-::3-('(5=-#@:PI  ?.5<,0)BYURVP1@PLPONKHPPIEFOPKPLNM&     )5GD@?E?9:21-5>:0%,1-/),01.'/6@F  #?=+#).8SSUWS-CDPHOOOGJOK=;NKMQQPJ 3G?BA//3%1457208567/#"&-2*1==   -C,6N.KMNKL@'#0K;?FC?(&  $   9D:=CM.0",3LSNNQQ,(8@DDC<24BDEHC@>  ;G:=R@;:'8000& (-  6=3C55@@12VLOOP,"474?9959?AEIFB,   B@;DCB7P.B(622C8586)&,.@D9* 35, "583&#JMPLN)&2/% &8;9373    F88GN?6"  7&#+;!2/OJNLK" #.  P@?79;3@9A1778<:813,*:779=GD?77 *>9%'9!JJLM@ !(    !8CB78!>>HK?1%#$433480179862;<@@@1 &772:HBLI8!#)2'5;8?B7/5Feee`B      5#88*&)8BDN70+&*57,5;=::;965/29=DF!">#)&/3 BEBD&#/ABA:>:");EMA;=830&-)(1/11>CC9:CFA81+4F?"H&(0!60 (GC=9*;:CABFJFRYL844BL[`[;!        %);*CH@E20#2,1.''(3;D7A;IQ>3=)@A %A,-('4))FD?-/,BG@NURTUE873;WJY\S2           *4EQ@@:**$-3*&-12797>D<3>/.;$ )92%6' 0'"4@B@ "$(9=ENQOLH543;CST[T<'           -,0(3KCEH61,*/0%)+0.).1<:<89@=26 13..611"!9CC@& 4+7LGIONK7645FORSTC0        *54%+ANF<2) *8-/375,1'00539G9.2 /)$!5)(*(?>?4%3EHCNL6761F8JLQH3"      2>=3,0C:52*!,+)1:5670-/./-94 -155-:5<(.11::;DFJ>.4/3=CBEH6-    ,2.2;;:4#.:*60 $&-.+037;<5056)67" # +*+) )=66-04:?<>>B20300;BBA;+#,17"'-(8('2'1 -..215<@<7-21:8  !.0,#+.=81)/*+.33:==,/1..;@<4&  %/2)1/(2,))+,1012:9741-0..,# %,+%!(383''*.,,+&4261--)-7995%%   ,#.0 %0.75%)'02-1953710/2.,1!  #!654"% %))*)310,$&'.343.! %)%,)0.5-(&(.,(././/20,-*,* #$,**/# 211*'))&&,*$#$'--,.% !(+**.--(**-))./,,0/.'+*)% #./)%#"1./"$+)*&&$&#"#$$&#(,$ #'!)*,(*')&&%%!(+/00-(+)&  ! $/,*')''(%$ #!!&&&$  ")'$'$&(& ""((&.-.((,( ) &! #"(,+#+%'$%""#!$$! $  !" !%"!#$$#!$!*+% *()" !!"   !    $%(*")("  !**'! !!    ($&%" #!!')&%"!! "#$%$ "#  &&! #!   !!"!"$"($" !  !                                                                                           !/.012  (46;=?@>@::==<;52  542A>IDHKLKNJDOLNPPPOLRTPURJ<823  %?KOKJRRJNKMNNFQJLKMOSQWONNQQICBID3   &BNRQFMPORLLKMLPGRNPOOLQRWPRNMQROKOH;6/ #ALRPKILNOJMLOLMOOHSMNPOOTPSNQRPLOPQPGBC>3"+=GLRNKJHJNILMLNLNOSLWLNRTNPPTOPQNMPVQLHIM>:<#2@CPOQKLFGOMMLLMNLNOQQXQTQTOLMVMQNLOSXOPMOPCFJ91 '=BB@NMOJKGKNLMLOLNNNNRWXTXUWMPLQQNPPNTXLNMPPLKP=36<@ENLKLSRLOMMLRQOQQ]ZSTTNORROQMQPNNORQJOGMUXKNLNKH@94 -7>GQOKFCLKMQTKOKLNQOOR[RNNMPPQPNNLKSTOTORQIOHYWSJMJLKLEKA3-v +7FIMLJPL;IMLQLLNPMOOPVTQSRSRNOPPPLPRFMKQPOHKIVMHKIIKNJQOK; dV2*23GJNHLHSE?LNKMOCGWOJMMPRXQOPRSRMNLLNNSKKRKLJLQKJELTOLQMLNF0 ‰+2B.69JJJJMNNO?GNMPMISOJKNPPUROOMMQRRVUQMQUNISMLWRKQMQWMQNHJJKO?4=8 2;9ELJNQPNMC:MPPLRSLLOPQVSRPOPWXVWUONMPLPKDNNHDDGPUPOMMJDJMSJ3 M]K, #:@D7HJOQMMNI2ORNORVLSQRRQSSRTUTVUXWRMRKLGFHFJLPJHHFGILJJOLIOOC! r?&B' #;@NI:IPNLNL6AKKJQROOTPQSPRRPQVVVRPSVWSLONLNQJJQPHGCKNJGKRTKKMI; ‚,4<# (7=JIJ9DJJN68KJKPSSQOMJPZ`cddgdeda^XNOTNOUTNGEHQGFEGNIGOJHEIOEJ@. :€;A .;@75ADBEA@MMM;3MNRPNJO[aabeff`\YSYZZ]_abaZLJILGJOFEGDEGJJDJIGNUSLE4:0  u`35 3C@EDF9NOL,DJ5:;_cdce_TKQSTSUGEMT^cdd^aba^TKLOKQLNOMJGTRVSRLHKMPN:)    4A .D?FC:9JON$:I28F_acddPKPUWSRI=GLTUTX_]U^^_^_XKNJHMSQIFOPROLJORKKEE4    F„/  (CKLID0>IA;#FA8<]bdfaUVUWWSH=EPQTTPJKU^]Z^aeaXLKLRQGHEOQSMJMQNMGII8  L€%  'EOMFL>6EIL12F;1>^gec]XWUTLB5PLSRRPNFAPX]^accbSNKSMCIMVTQKORLTHGRG8' H! )!?HDANO;@FJG+ED939T_``[SNIFC7FXZSOMONB98YWb``bXINRJEGRUULGSKWSJHOM41 A}& 8@:2LPLF;5D,8EA88;KQTUYSPRT@<]WPMPPRM;3KR`___LKOMHLGJPIIFONYUMPVN85 9~7  '6>3NMPNKI518@E208GLPTVUUXbH3OPRPRSTQA(5Y_a_^8JKJIFEINHDFQMTYZ]VH=8- <{J  .@;LNPONNI925>:):IELOVSVZXC9JRYOKIJDU+5Fab]C4DJJIKNQRQICTRIRZQKKG63 GnE %CGKMLNLMMJD9:;5(=MSRRONXROMSZVUGD?6R28:M^^K<+!(:I]]ZYZ[UTRKE<7ETPDIB?COMJIRNQRKRYUSMF7    KF" &(%'%&(%'"(>KMDB=KJPHIMCGNPOLKKKNONQSVRM:     B:$$!"$##&( $"$)),'#  2PM       24/$*/4,-.&&&154:)'  %VP?KQA-#SWZ[WX[\[YA2=CIGONAKIIGGNPQNPLJHKQNME;     /B-'),;3.20-*/5,&$"  \W]ZKH1@[\W[[WXWXZG(8JJFML>IKIMAFQNJNOQGLLJKC4  #C2$(3<=784.+19<40!  7UQRSG>"T\ZY[XXZWUTP*EKJMLNLJTM?=,     H8#08>>C=8//:C=?:7.%   /CIIA3RXTUTUTYVTTJ@CQOIKQHPMLJG:=FFHOTPMKE=6     BI<#B=225;FDEC=>+   6DHD6JSRWVSRXWTQ4PIOPJLSOJOGLK<@CDHMSTLB9:3    ;MB2)FRKAC@54:9D@--2"    'WP56.1;FDGLRSFHA?B>A=2/1*/+,8    BTRR@,!RRSSTRQTWO!#3IYWUSLGLOLNKJPMG3*%-3! P9"%/;GOQMKLLJB??2.21.*,*2- 4NQTXJ,@WUVSUVWXT./==CTRRLLMNOKONKJIH0 +0 6=  1BJJGGFEJIDC?,%$&(+"%6#!  /gaVJHO1$$PUVWVUX[W72EDCMTUVQRUKLQRMILLH0-26 #:JJHDFIE;6825,#!,07.%()?7=B<'"PWVSTUYU=2HOKMNLSVONQPQNIONOH<%= 7IMMMPJG>1'"' )B;4/,3C6.1@9;>)":A,:MROUTQFAGMKKQLITJRPNHKLSVPLF&:  !>HEGGJKC6(&(/10("3FHA2%&(9+$.#C?:=+#:2&:SPPRUK7IFILLHHOINOMRJLMMKED ! 1;@SOPQPIG=1("$&,:9.*&'  1;&&+88>:32.*"     C=ILB $7"DHHMLJ=%;BADF?HGE@@GMLKIEE=G=JB=? %00+#    E?CKP5+ '(7LIIM-*FFFFE?ED7CGFHFDD"=D6@NLX+0&$'.5&   8>:<<;AE4&&BLGG$3HGFIH6,.9BICDD;    IA?@BWD72D#033<21,'!(%%?,   999 :83#3?HHH$/>FFE=13+5=A>0  M4A7*B906?22121-20+%!,76HSVD0+ "?4%47831(%&$&569 $?3 !8"09.+AEH0#"%   ).=J4,/8;<7.+*-7/%&++58?@454HHDE/@8" ,#@2/ADB'#"*2 "+329O621?MdgdG%        7'2>)*F@E;3/*+53*144?A><;7/4>DFD!G43(& 9)2CA8%7BB40>?=:KP7339NKjfT3         @)29$/0.?586-0*&7004:70,/IB! G,-.$/;&5A6&6?HA901'30-.*#-29AGL;96&?<$$I.5*%?*(!6?24 8,%&7(*.//),,/16-0==3$ +80#*$%%77'0AIMJPM856.5;KNOK5%      1;82)$6G:60'!0.%-21/2.0350,41+  -2, +3-&2/14.6:8BDG@222.5@BEE8.     (83<:"'/$:>+4'"*)2*,1/0350162&48*  -2%#')*+2(4+)04=>?B1/0//>B@A6* "+55!*-5'1,++%++-4-+5752+0-57(  , --(#("13 *.,.1+0799,-004;?>7(" '03!#-,&0-(++--.1/158422/*,0.*-))%'  0+&,-,*,*0842+-,.3=<5'#  +%/1.4+7,))&2.+210250102)+3, '(!%1( +(++++/.++*(,/75+" %''/+/*1))%*-,(../020.--)(*$ ($-.-1$&-"!'-((*"!,)(&$&+-/1$ "&*+)+.(&%)*'),*,-00-)*),+  ' /.*&&,!,,''( !*$###$%*)(" %$%*&)&(&'%$#$&*-,01.'--*&  $!%)')'%%$%!"#$!"&%"   ,(%#$# #$!"#(',+/0+((((  % $## &% &*'%% !"!"$#!$  "!"# !!$#$$!!"!$,( !! % !"" # ! $#&('$'( '!&!    ! !"%#### $"  $#"  "##"'$ ! "   "    ###"#"   %&"                                                                              +79A>6)063   /4;<=AFJJLII65HHB1%    9CCDFIKGGLQOTTJ=:IOJ9JJI0   /=B90EIKKPPRSKJOTTWSMC    $5@GFHH6LOVPTXYXMHJSTOOSK;LUTOUVM6LL:+4  !;FEJLRNIDJTTGJUZYL>FPOCIVJ:HRWWWSG@MQF9L6+  4HGKPRGKPLSSTHEQXWH8GPI;IXM>DMWYVPAESVH@SH79!  2HRWMNTJ5HC2  .FFHGKTRMALWWM?CPXXTOJ:KJED%  >GKPQE?LMKB?DGITLEFGJKH<4?FGLYO>LXYSJ?:?KLSQQYM@OTRTO;EQC866@KUUSHAC!  9FKD@BHSN;LXXTYXUSLC:HFGKKR[ZXTRJ=KGBLTFDP<=?COOJL9FHEMMJRI8HRF>"  el:  0JHFNLHJJAMLOQH3AAA;9ISURWZLGFBCD@@EHIJ>FRRI3ENOH@BF:9CTRFA ‰8.5"=IOPQF=ILAITTJ;HKDADENVMMYSILLQRRPPSVYK?>HG90A>:>1;7=KM@IMQLJNUXSSY_Z[```a`a[WUNQI4<7<966<598AHCDMFNH< VcE+2IIHBFEHUKQK8EL;LQPLTYZXZ[ZUUUTY[`_^][KJEEBG@EHJPBGI@KRE- vG/B*/EOJA:INRIFC4EIEKXRQWWTOJPQQSWYVPMRV[[UWGEGKLPVPNPALVKO@?=8DPH< $…-7<+85FNK?AHIJ@7CIMP[[UMIGMT\abccbdd`_[PNX^]ZUVTQSUKBNPKA@PFB:;;BME, ?C= 3F@;AHEDJEE@IKQ[]SKKKT^b`cdd_ZYY^^ba_[NV\\[WNNRE>;HH99?MQSMMF@EI>  _oD1%1IHB8C=FSRI;HRWROLX_bcce`WIA>8367:FT^c^OIOYZVWD>ECFE@JCHOWSPOOKH='   qW3 8HMOIF7IPH;GLNIIRacacd`K?@A=;3,-.29LTWaa[TJPXVEFQG;BCINMSRJ@;AE?-3   'fL 8GHCDF8JUJ;GKHBFbbfe_OBJPOJC5)#&-5:=ACM`abWMMUYZYOJPICUUJAC;8=:<1(!   8‡? =D6:804ERNDJMHKQaadbK@HTXRG8+$"0JPNH;QQJ?:9?JLH>23    F‰1 :CAGGC=DFFCCGKNO`dcbRCLWWN<+$$3TPOPSIA?JR_baa^OEQXK>=DSPHB99FPKB:?9 Kz* 6HLNMPADGIMIEGMNVbdbYDJQUL/$/ORSSNOKI9?YY^]bd\CLVB=HRSHF=;FLJ96KKC!  H‰&/FEBBJM@CIJPGGIOS[_b_TAIZB'$";UXVUOQMLF5?J\^^a\EOWBDPVMG:7GMSC4HORE1 >}- %1CECCSLB>AEKHGEKQQWWYWSC;9C;TUXSPPNNLL873Y`ab[HOPBBMQ?:7/FTXIIQXN;9  0{7  /CIECRQROHBCGFFFIFEHLWTQRXZTYTXPNNNNMK9,>^]^aVGQB@BKXLFDKIIWKMVWKAAEFGKKMJOXROPWWYUSQRONNOMQ2)<^_]WHKUPPOVPIJF?=CGX[RH7=E:  ;c@ 4MMOPORUXYQE@FHHIJIVSSONTTWRNNTPNNNTQ"%EUJ0?GEELUPC97>;MJOZS@>D>@: Aq:  :KLJFKPRPVVNOLKFHOOIIHFTRWSSWZY\WWSR= !80,7=@EAGNGC9GB>SXYVK?OSM??Pk'   /8@==DFDHTUSLKBDDK@/,7RSPPPW]ZYXXYWWO+84-8>AFJOIC8CM>=OLC;8GTRPJ4 dP( '#069=>LVC@8+   Hj= (8D?@<?>FTOPSOT[YC;F=( $_K$0)$%&&' &8@@@D>BNU8&&+$/WYQUWXSUUWJ.+-*FB33CLLIHJ;LMFCJVXZPMPG6LN!0.-1%&    &)6:46[110?]WVSYRUWXJ,,*2KM6/48FJNRBA=18=HMGLTLN7   @C ,1/44"()%    *EQNJD:*##TXZZUWUVZZ3%.9@JO8;@69AIMQRPNMB=7=:NMH(      9;35+ "!$&"    P[YSA>)>WWYYWVUWY[-7IEBK8CL683AJSI8CSJ8AC9GK<'       >G,5("38' !    -OUO??5OXVWVVZYSUY=';KHEP":UUQTTQPTTRQTEFQQTNPDBJTOK@7-'6/  MXRSD+HSUPPMQUTL:3ERRXWVSJ<&# 3:#   (1.(1/4:64@9+'"#--%#''+#ARE?BC':OQQJPNOU<=4,3HPRSQQPMJDB97CB3,  $7   &65/)/'"+-&)(',%'DF@>>3 =B?8$.29HNOP:BB77FIIPGHNH@BAHIFD7  ,,.(6>?;:'-71,'$($ CH71FA$5LOQPO:F=AEC;7KHFGPMIJHJE:5   !=JHB4+'',&)()(%  38BF533 ?MRMOI'*8GHHEAKHCHNFBBA8=B;  &/%"$>@=J.'(-LLNMK,$=BDDDBHFAFBGOMIF<; 1MFCH2++!    ?>ADIk"#?KQNK(1AC@GKFMH@@CAKABEE! ;L;=<3=+    $8:>PR[;$/2=KHC$;DBCEAGIF?@C@HEA?(   :C69F2MB5'&   '88>B=;=21&%CC5+>BGCABF98?@CDCEA       ID9?8@S)>5.-")&-   %5>:':E<9("%=?)%>DEE@I5%%*7:F>&       ICI@ 4?+A;0/$&$+;KVSI6/  %6<0&"1BC;( >*57#.HAF=7)"! %      ,CH[J$%/34642*-'""&)5B97(&4=A>-)$$!$,-+  0-?A?5        (,=Q6$+989?3/+'($!+)-1FMJC  G@?9>78:9!&EE>0(;@@Q_RJL7941=R_c`Y5           *6JMA51!#!&(&!!&.1996ABAA5"%'"=,0'9'(%+HIKSSXVRA5412FNTZXA(              )&:(2LOI93)%"4-&,**/,14;;;7<2: !0&0$'$"8 >YPLRWHE980/5MVRUH0          -1.&!0JH@;*)/:(.3+-2,..33/9;6. -.+.0* & 64FDGPG854109FLLO8&      ,44/*(;C>70( $80&/23621732/,1,/ /*+-,*#40(08<9BGB21610<4233/C@<@CKHNI@KRF3,DPFDFH/  (BA*;BFLEFCIQQSRHOSF:=HVF5GSI.FF15@HF2ALRUSJFOXQRUSRPO?9HVMDMUE6IK:#:7EFFFJUJ=BSXRVPLQUMNUQILQC8JVYSSQ?:MP?9J9.ALRQSQTSMNTVLNWXVOHLRJ;ATH:EMWXUL7>OS;9UE$5 (8$8HWRI9ETVM6>NVRRRD.EC9>D= 0EFMSVWH?ISGAMYG4FVXSD5ITN=@F)@C>LKDABE@AENVRB>LRKGGEHUPD*4CA=/;FMMRUF3HTSVN7CP<(6;+HLHNLJE;  @JF:6FREEJ-@A*ASVRODKK?$/n 56EQKE;8FTGNXEALMMD7-CEEGFMWUGAEDA(973:IPRJ,BDAQPRQC0BDHB$:FSRRWSJB<687-02@E79NUA)DLNI:AF:-@LEH> rB-,  3HLGSH?GH<@NSE-C>664EDALHNJABE;>FTVV[X[ZXUTUYY\^_`][YXPMB.1):?/8E:BBCK?GJESK?&wT0A,$;HQ?@GIRDAI>2A5ANZ^[YQIDKOTWZ\ZZVV\\]\WI>AD?EMEGODOUSP8@=>KRH;  …6@6CEKF30BFMQXWPHHLR[`^^_]___^[USYY]XOPVQW[ULRUNE>K;4-.8DOC>‚!;1!=H<:AIIAHGIE;CDRZTLJQZ^][^aZLG?BIMX^_YPO\__]X\VG==LE228KTNLK@?KG  bsH*$.HJ80=C@ORH8@CVW\RD:028;8"(qX #7MH@EKDBVMCDPRPRadafQ5/29>@:0!!'/3>BNY]\PENY]ZGCPKJXPC01-9605 6? #?I92322?RUIBJUXY_`_[.-(6B97,&;GIKHB92@[^][QKSXYUOCHTH5*0=EJMI? HŠ/ "BHEILA8HPHC>FJZ`b_b^3%.:>8+$+OTNNNOF236L^]\^XBOZK>?MPI?/,3@ROF9K|+  9HSPUQAFLMNKEEL_c`a`9,::>6(#4YWWTMNLIF)@DR[\[bNIUBFQYJ@1,8@PG<6AHISLBEO\cb`ZEC?C3",3VUURPOHMLL;6OT][]_MGVDITPD8.BISR8,>KYI;  ;9  3?EIAQG<:CKQWTHAQY\ZKNXULHLNTTTSTVPQOQQJ1).6=FNYWYVZNIUOJMLHRSUVZ]\[XRQUN;!''$EJKHIN@;&UJPW[ZZXVWTNS5!)),@DEHMO?+5FZGBWTOH2AS[WQ=   I}u:  #%')#"9AIONSMJH2/X?01QXWVVZXPQQ3*#57<9?BC>.ILKOGCD=95JZOI=   ]wn  ".+$!3=BCEJJEA#,J//)>]RQUZXVSQ3(**-*);><:=79DUNPVRT[WB3?E# 8wu-      *.578=DQE+'B+(TXLPV\VWW="*%('6GKMRHEH9FNNIHOOSIHTSA #ni2D    *><10:49I;9=YSQVWWZX4"4DF)%4@;FNOKB;@71-54COQME: VL)2,    20=MQM8C GUYWQQOVO+!!C94G3:@/)473=NRNNOE,9JLJB:5K6.8=4 &  DXMNJY(2WVVSTXPUR8"'IC>K1>K;)6=>?O@@KR>2LPPK3C<;B"56'   !GHCS@2>QNRTVRRRUJ3MM@E7BJ6C+;?84;IFP=GKOQI1H+ /L8C;,"'  42@D>/>QPSUSQQRSK(:EIHH>AGBC(3=:6MULSJ4;A6*;G)  LREG$ 'C3) "  'LOJH;>QRURSTSRSI66LIKJBHHC7;E?:DKLIKUD>4HFKG$  5a_MG> :=)! +" 1)   UVJIC'-OPPORSQPPI=9@HQSGMNDC7GE1648>ATRJEEOP@ B]ZVQB3$CD92- "!RSPG>* CRPNNMQMMIEGLKPRPUMDDBJ;7A<>DMTC:;0:BA((   0     !%+*(' ,-! 93:=A#/A::;'$$MOK.(195DISSQQK>>@CGII=4#    &CE4)  BH:#??<"IRH.62BFB@7IJJPKIHIIGF<-  $ !-&   (3GG,+D'7,GOC0(4CF?>?HFCJKD=??1+6-   /01)&  %9=:HJ8'270=N9 '5@CECDHA=JNGAC@=BC   )@7J600  '/0(&' 7@=7=F? (+5E0=HBCCBKB7DALKBCA?9   :LE?;!$2, "$   0;:9@?BIBDB@   #J@;=60'"4648ENa,!1 (296ADAF@BA7:=A>EE58'  *B0.<97_?'"%')!   *633>:PG+3-=A>?><      A?5>5=W1">$'& $  %-/548O328" ,:>EFA>?BC(    PG=F&,<8>7*#"9FIGGD85( 778(BWND<,(;&8G@?;*&($+0-       ,KHXG)$6)61.,),$'""(1AMONSEJ&!89:<>\N;2/+: '04      -.9N>!,<9/'&%,-*/6877:LXONA#%?9=4.54?,!&!  -,-$&-IP6205IopqP4        8/,?,4CC>>8''$*&($/2::7855>8DLFF# !B>C8.!1/-)";I?2'$3@@GJM5/00Sckm_7         +12(!;B:452*$,4/(,06>@>:=BMQ<=C/&#EC:@NNHKA2/0>NdcdM+              *)?:GB7/%$*-&&.2<<>9BAE=5#/'A8;:0%243')$3->YICEL_SOQ<7/*1NZfe^:               %.QLB>2"!)'&"'0457DB<:5#+.>61'2/$("$FNYSMUTR?43,,7MZa\H,           $%1'0NKEB7*$'.()+(&$&.3<@:>96< % '035/('" !"5&>IHPNSCA=4.+/GQRZO2      +.)#3GB?8)!   ,&0/.5'1!.'(24)2215231*+,.,- *-.!# #',+*(*+$0/)*+)04;91! $&'. 35-,'-&+12*2-/0-31)+2.3,+*&+0.*/&!",-()*+$(*)''$).332)   )"'"5/0,)+'(+,)2+..+/1&&/1, *)(" ! *.*('+-*'&'!$)'+-*#    !$#(  10-(&($'*%&*&)-*//''+3, ,$ #&$  "3/0.,')%%!!!$$%'    %%') .++!"#&%#((**$1(%"('  $#$''#  "'")$#! ""&#$#!'- & !!#&%%(( &"$%"  $ %#! & $$     $"  $$"('%&   # " $! $    $$  $$$!  !""#      $!!&& # $!   "#!"!!&!#!  "#"   !% !                                                                                                &+"=?<,2>=# )??A9)=DB2:BE@)DHB3(.%(<@HGA5?NF2=IJ@#>IK?EF>@+%:?@>41?BLRH8BRJ4BMQD*AQJ:IH: 9AD65?@DA<1AENRMBHTO=CPTI7ETI;KP?-C< ;@74?NL<QUPDHC(EE+=MC7 DFD@0ALUXUE=NVVVNALS<6BF0JF6HPD;" % :INB@DOTULSVXW[XXPB32<;65@KXVVTD:MMEKWPOL-?B5=SPJSPE;'%'y-&/?QN?7;HVUVXMHPVSE70=:7:AMWPHKLD4G?/8HUWE'>JBOTUUNGM>4=%Re- A;4HUQC<9HWXMB.?CEC7/@FHHMVXRG???3$/1=16MS@$AONK@HI<9LJFE@iJ)& -DF9ISNPF==OSB,3<:<:3:BF;;LJ6/GA48)?>(0=SQK?*1g-<BKWX[[]\\Z\[XQQQOPA99D=&,A6((=DFPOH=( U^E6GULJRIPNPL@@CC4ARMMRWWXZ[\[\ZZ][^_[YYVKA10&-1'=9:<7DMQRMG<-jQ*1 7*9MI@IQWC=D@2?=7GXZ[ZYXXWXYYYZX[[^\ZYZYT@77):>49JGHLMOCFGINE?9"l@65%A>/BSRB?>GNA478CFJXZ[WXXZYZYZYXVWY\][ZX\ZXKEHCJSILUPONLR@86>FPLA/@q,@-">H4ACENGJML@0AAP\[\\Z]^^[\N>4*%#*/9KVYZVW\\WVUUOFFQD64@RTOJJNMPD9_lM%%CLVUMLKLJC@.wdD)>GUMHF>:NK;2CHWY\_ccaYI.&())%!%,3EWZQKQWVOM@<>JUUPC653332,(]H  "9IPCCJF?IRC?HV\`dd`Y5$-13/0*$$'6:CVYUJITVVBAMZ_`ba@'6<976+ $3DJE=,+))?YZ[WONTSUVUTH70?GFDFFGH+Fy6#>PNMI>2ATSF>;@Q_`__F(4@AA>5)$+ARRNMNLKC3--KZYXZNOWVLQS@27@FGNRPMD$J}9 >GKTXS@@HRSNH+$'IVXYZNSQTYN:/4:=DQLF@(?< H{@ /:EOSC?LX_b\LFEFEBCEPWRPOPQKJIHG0J0?WWUXMTPVVD64BGOSNC7'@OK7 @€C  3??OOUOEA;9GNB?LY]^RFIHGJNR\[STMONMKJGFF.FSG,0BPWQF   )sG  ;FKTXYZWVLA>HPDDKQVUFHHGJUW\WTQNONKJIEFG>5WZWVPJURVXUKHC1EUS>FSZURH# kQ  DXY]TCMUVTMGA@=,AEHMLEIPM0,:STS_\WWUTTPKL%!>HE@IQH70DU\VW\ZWP:;MY^U>  Jaz(  #4;;50.26;=CCFG1"$H\9-WWRRSVUON1%&%2934>CC=4II?MTQJB=>NUXPE, "Z~X $ $--).1658>>>2'*&&"B[PNPUUQS=$14.)'5>?85>8=9JSPRRUWUE:2+ ?qy6'   &1-14BB5'!-A%!"SXRLVYS?)"'/-->GKNOMEEL9?NNKGNOR@KOPE 'd{H+R    BU_Q747GG&"0'5YSTTWT3",<50&5?I=;HKKK:=22/":QRSHDB VdF%:B   -G:BI>A:')&&,QVWRVT1,:8D<4026&4;==QOOJME$AOQ=/BA  EQ0$+4,     -8FHBRI(ISTSUTR6  A>5A:6B>/5AHHHUL7@GNH:8I= =E(,,-2&'     .899MI5#OQRRRVR?!DC?B99I;<45AJD5BQRQBKM@2.;H1 *[<4:#7!    29538;7#PORRQQRK+&FHDC;:H=B4'7BH>OSMSIE>52(@K+ #\R3=, =&     $HLABF6"!OONNPSPO2)DGHGABEE?7:>9>DI<ADSKG9HMQE";X[`^G>5 5) '  %#/"=HQF?D@.!*PMJKNPOL-$:FLRQPKDCDED4;<8AKUK=E>=AK=NKIJMLLG9@HMQSSQFE?F;@CE>;>IG:27:3D  (AFFKW\XJ6- %8D>31142.!$*/,FNMUVQKMHB%!'DJHKNNMIMLKNLPPOPLG>>AACB??99/-*-#      7A:AAOjKJF>2  '"&#),"'9#.289TPKPOH1*)DOKMQTLIURMKMLMMPOEIKNKB@@5,% '     5A@HF=UU==B;,+(!''# */7F1%0JKBB=B$% ,@8*A?>0?J9""'=?<@HQPQPMHJJKD@=%5EC2  "$%*$  %:861+@A'0@7464BBAA8KJNOGA>A=>*+% F=JKGB>=:3=@    %4DRW75%-99/),*2586648: 99;:;GQ!1$.5+;EJK@;C3BCFIF>=?=5 :L>=1%($*0+-)%24"  48<7:::&1@$  .485:=m<=#21@A<0Eg;.   0556>BY\(!%"'<>>?CH?=3,?=;?>><;   )F<>9+8A!ND7*(%%/(2#%% .-068-].'%3!$/??:>=))(#8<.#$-8JE3'$2:>?QQ95/-EZbie8        2-6( ":FC:.-*(-71(*+5;A?89AFF79)("/9A@G9'&6+%# 9DEITI46FJLZK:6/,7QabcM,         )47ULF8##)*#%'15=:8CGE<4 216;4?>>?E8+)-%)77HSIADLVGTG672+0AS``Y7           #"FSBF;-(""%!'/.39CB>90 ,.41,!**(:4'',"(>NPVROPUL743,.2QT[\C)           &/&$EODJ:0/-1*%#"!$%(079<:935-#22371)(&*.#+)AFB6CDB33/-,,7GJH7.  -76426913../.-,,4)*,2590-->=1$41(+.+)" %!10-1/09<<82-02.:AEE9,  190 "(9$-.)/-.(*0)03312,./;>/ '03*1.,#"$!*10*.-/;781.-2/17(",4) 5.,+.+$(()3,0/242,-)61* $,-(,)*'$)#(&$%/.--+'-2+*)(,12::."  /.' $8762-1)+-/*),330/+.47<)  (-+&%#"&$*%(#$!.0,++.',+'(&#,+.13% ,%%! $;0.,#(''())'+--/1+*+,,  #,(%$"% !5/**,+&,%#&"%(&..&  '"&""7)+%$'''#')(**+.+%&'/)  %++$"& #.2/1(' '!"! ##%()    $"$'0($!!%"!$'(('(0-'%'(#  '(%#% **$ !%!!"#" #$ "$!(" "%&'''%'%*+& #%"%  "#$!$! ! " "# %! !%&%%# "  #" # #$ " #    #" !!!$%    ""  !"# !!   !!!#$#! #&!%"   !# $" $'#   %                                                                                   4>?>?@=*& /3"9?EBDG=9 ?EE@/&:>46AMDGKA;4DNIHF"9>5 '=E>4BQGJPF>%9JPING6(! #?AE;+5$"&';E>'4GQKQPKA3:PNHOI5'C?!*8CNPC;>6*&,1/9JF=?NRNRROM@@PJGOE,2K=*$'>?9?MLOOJN<7436:>EQQMNPRPSSQRNMREJQD"?H++@=-&?LHOOJKSURKBADDLRSTSQLNSSTUUUSTQDMQA)ID(4GA1/=A:=IUTQNORTORSTVVUSSSROFJTSUQTTTUPGPQD@PF/3EG412 8?JHB>HSVSQQUUTOSSUNRSSSRH@JSTSRUVUURMMQRQPJ68KE)-B=?LRPGEKTUSUUUUSTTSF?IOPOLBDPUUNSQUTVWSOTTJEN?;QA$;I9-AMTTOORTUUVVVWSVTI<:?EHIEEPSTVTLFTSNSUTUO9@O?GS?5KD*#(ƒ@ '@NRSNOPSVTWVTSTTRA5169?DGPUUSVRD=LD:?KUTF.=#B~( 2?15HUWNFHRSVTG;=LPL@65=@HOSUVSPOG94?3,.7OQ>$=SPRPRQGHHEKB; jf!$  ";FA.?TTUMJKTTH:/6;CA;8?RWWWXXWWUOA6613C>5MH1/HE:?;FD5=LOA=7'‡51 0?MRFIQSUURLQRB2:>98:?GTUXYWYWYZWWROJEGD6A;:NIFLUUVVVWXWUVXV[[YYWN;7:=65;)1'$-0?RPJ:2/1$ mi"9<;2.8POPUXJ:C?75:6@UWXWVYUWVVXXWWYYYX\WYVJ>0/%+&)=:=BFORQQPHC@;}H#2"?A8BLSOEHRL=680@7?>71(BVVSRUUXSR>642.% sV. 0?NZWKIM>?TC:>QW]]]Z7/@@@>BB@9+% =QSQRWVVOGOUTB- $' 1lG 3DVRB69BEVM>9IX_^]R'>@@?@C@<9NWIFSX\\HA@BCGGMTXVPNMMLHJHFD=61TWYWVUTC5=>CJVTOF= 9GA,5z=  9CGOTVWSLBDOSNQXX[T@ABBFPWZXWTOKNMKJHDBD "yB 6B=>GU[YXTOPTUTTVVVD@ABHSRWWYUQNNNNNLFCEC#LUWVXVUYWUNHC=5MUD.;IRNLF#U[( $9CJQOJMOTWXXYXYTTQAABDMVRW[YUSQLOPMFBAA4VVUWVSUPFBED@9,JUQKNSQSWJ:0aE;DFHJ@977@GLIKOJECOHADIQQSVZWTSPMMLGB>@3UZVPORSD9.28235CC=9AIGEFOOXX[YWTVPKKJCB?16FCJQMO@4 :=;KMBNUWUPRXTD);WE /8@GHB;2335;=;3?=N0,>?<;987*!'"1XULMPUJ/& (400),3737<1@42IUUQUUQB2)&  #VE3!!   1134<-*; #&"EUSQQYG!#+,15@EEDILLFAJ;'DKGCKQO?DFB< Bi:(    6JM6:12&,) "FRSUZJ%+)157<;BIOD6FGJI271+'.JTRSMNA5fG0!  0=WC658755%&23UWWV9*32--08=>878=FQPJEH:.IPHCHM?  ,ae>!(      &B3;39BK6#!FRRRH#5==?364,,2=GLK>HFRTI9GL?37<3*+6BHDRH@QO@,:EFOL9Qa<*6;1 )%  B:3;K702%2NKLMOPK-?EAC;BB>?=>;36?JH67FSI73H*4*LLLLNQQ.:BLOMNHA>@?E;0>79EMREI>@;B>8 !;Vi[V?::80(45644/-!&3CG *$@LPMKOMJGKNOQROE@B@;9<;>?9@J@G;9@:F';L_ziG<:4520)$5;74-)',.0-0CH*.RWEAA<@LM)-8KLMKLKKLNNOQPNKI@7<;?;@<884;>;<.!  )PNKLSQLMKLKKMNLHA@>41;@+%$'   I>?JKKJFHHOQP@?85<<>E1++ %:CB>N[`L *99=3())(1/+  3?:+":6<<:%*2*009BABHKNPPMIHHIIB?:.!%0G]mI9<5,51*%*0,*1%!=70+-BAF@03<=BEGEDIKRROMB>>@CC.)% 1;Z^B41;1'#/11/.+-2  &5/6622./%+DI,3@A9GIG>==6:<, DE96!'+0++*-3.,!   (,75067EZ>5='/6=D@=BBA9<9;?@>GIECB;   6P2749-)$!   "!18276DkOCO&4=F><=@39:-:@6?:C<85  $J>5EA"dL)*(  A /649;GPQ>G+,++4@GB<>?<><6A=9@:8;8      @E:77%2V#,DVVE98-5,3;".1,)"/;39.(5578*(:4@>#593*00:=>8>6@;>8&        +SM[<&(?!!./ $$%$*9KascOQG@?8/+%#-;;;80="4.38!#$%#-:7;@<>>/      6NK^> <;%,+$$10,-!+?9CE%!7376!"($&!   6:<=6HB( 339+PQ5&-4$-.*%5$!.6:672>?;&$35(00'',::E<"#2664GQ@41.=Ekmb=      51>( )HAHB5-&'076.%/4>B<2:B?5=6.%$&0118;;'&'"+2&)*+)1;BDMQN68BIKRA=8207L[giX4    - /SOVK7(&',/3289??E=$*&'30+.:GEE8?QRTX><22+-7R]^^8         7QAJE:1*"!$"+*+6A<8:0,1&42"!)-3-7A6.%,*('PA?D>AIR;71,((/GSZ\C*        &-(:IBJ=7/..*"! %$$,.6:;;;3'/*-,..- -)#*.-)1+*++&*NIF<871/.(-?HWWO.      !'1(<==542,()..,'/,,+-*47<7+/4,--2+&+20! !&*#'/$E3068HHB:4--++/:QRK7(      17/3+3;781/.*,,,/+,1448146;><# +*'..)./+))% ($%32+:4239+(121,,///.  )/)//-1/-401;5//./1/3@DC:%! ,4/- .5*,,0995-,/244/-3:<2+00+'-,/5& 0..-,&!'/*+,.,,/7@A9* *5,!  /444.+,(*33-13.2-.241+ #..+()*,*$%$&00.0/-("-+)(+)*-2:>/" --*$ *0.6.*2.00&#-/482--//1' *0)"&$!$(&*&/10.-0(%.*()(#(.110" +*%) /-.3(&% !"&+..-42-((*) )-)#!$ ",,$"373263(()%%''$%.-%  %%)$+./*"%$&&'')-//1)#*-( %,*!!"#)( )0-'*.+)'""$ "#')' #%(# ..( "#" "$)&'*-,(%))% %+(%!# &"#,,(#$%$&$!$$!$$$  %"!-" "$&((((%#')(##&'$!&'   *%!%$'%"$%!!"""#   !  $  &(&%"#""#%""$##&# %%%#!"#!!"  !$#%%&  !$!  !#!# ! "!   &&# &$  % %"!!  !    !! !"!$#""  !   $                                                                           5>@??5   ":=HH?9'6AB>/!! EIGA3<<4/ (62,$#8HQN>=90CNNMC01+  ->BIB::.5=9,'527"8KSK?>=*/FQPPD&'D@$;EAJLDA57<<5/<@93>ORIBB@>1GPONB /J5)6<7E?7;OON:.4<@B@GMKHNNQLB=@?>MPLI@?D&;=; 5?EM<66ERS@49=GNSTQQNSQQUQGDINOQQOJ8!G@;AFA3<5#,::AOVSKPSSTTSTRRTSQRTTRRQSPQRI26MHAHKD3$;>:,#8IRB:=@OTPVUTSSQSSRSUVUSTSSSVVQRQNEIPLAJN?* ;; 4>K9*#4FSMIGJRTPQRTSURQPSRUUSTSQRRTVRTRQSSRNIKO:4G<  5=EK?:=JOTTTQTSQRSLKPQTVSUSVTTPSTTSRUSTSROPRNRI6'C@%"0(n7=?OUUTRRTUSTTTTUSHDCLRTUTQTSSSOOROHMRTWSDIPRTN>DM:";A78!;;'0=ELUUVUUTSVLNRSSPD?DOSUVVTRSSRDDM?9=EQQA4EOSSSUVQE>HG;&lq,FJCML3&&:ˆ#.")"9NVTTPPSTUE?K>>NPQSVVUTRUUVUVWVTXVXTQ9;DD7%@D5'16?GKOJ::>@=3 bv7>>:/,FUUVTRDJH807AJSTUVVSVUTUURUUWWWXXXWU=763!4:0:86547>JVTUWWVUWOD:.#$*+5BMUVUUS?/.42319MNUTVTTPPE<=C?(1ƒ:%2 ==@>=?A?<8%!NVTSUWUWVTQVUSH<,&&$&++€a61CJSYYPTLIQJ5:SWXXYN<;?BDCA?A@??9/%@USWVWWTUUTO92)%+,/37?7 ,}T 6FX[ZI=LSSQ?7OUY\X*6;@ADEDB?>BKRPOPM?@EFIIIQRQJJIJIDI+ DSVWXWVUG1:HRIE@EIMQC%?†a  6/8FWSN=9FRSQMTY\V&8;<=@BILUVTTOLIHEIHGG?0!.XWXYUW=9FRYZVSUVN@+9zR  4=FVUUTJJNVVUVYY]G?<=?ADQWWUWRPMIKHIGFDD4" $[ZZVXQ=?><@OVSSJ@$(+$ -~P@HRUPPWVWVUVUWY[\ZB<>@@FRURWWSONLIIJIDCDBAA=7:OVVWYXXXYZXWN>?@DNSNMQWZQQPKJIKDDEC-;.NWVXWXNMOM>1ATO5'6FB7B< ?iO(5=:5;NCDDGPSMRVXUQMJLKFABA9LWUTSRUK8'3:7$4ISTVRC?FME( -i8 -  !3@HGLD934434202ALB@AJMRVXXSOSLKOFDEB8;MKTUOJK<6=>C=DVTSOEGMRC(N84  (8=IOIA?=:1-62EINHB?::8;=;DK:YTSQNPMA)BLQF9,6?6;HF=>HQTQRTQMOE<5 04E9 8(2=BDCDB9. $#!LVROQW=1 *;<6:8'"2-88*=?;CPTSUUQA4/$5J@9'  #0278;>'X&&+,,KPUWZ. ##369;<=::FKGC?IC8CICJTUJ84/*  37K1,*  (OM($'%%,60" 0RWXN% .,+8=@AIRSNI>BOQH590)4GUSG@472)]%9JF7*,/2,+'188>A>::=:BRUOJDG8BQRSIFF9 f[1)-*    2nma<DMMQLMTRSMCNNEJPOJ8 `oW& )(      J¦¯tH8-0%$CNI38:>D587/-985CNIDRLNPQF/=LSLI9]‚J5!!+$%     %:VwqK7/+&=QTVP5!A8;D.;B7#'(/9HOQI==QR8+HQRQH8P{W#%40%#39(    78NMM9*3#9SRPQO6@E>G:AB8:3=871:CJ@4BQQ>1HODFK7'tj>(;A3 (:$ ?G1>V.%'? HIMPQQ27CJF=FBG63@5A7,646CRTSC+DKB5D/ @lH(0OKEIE@>>=C@5;92=JFGOL/C9G;7AQ6%&,:<:271 !Y_ 8=I?(f&AD+JMLMKNQLKMOPIEAEH=6>=A  :_K6-5932+56-/4fd9&+0HG/)G$/H?&DJJKNMNNOPQOOMMA?>A:@==<7?8DEAA2& .LKSQG912+&,C#:   2KPjbA,%-0&&#1:2+//"'<'"-7>DI>;3*&$31!05MOPMPNQNKNJILLNI?A=96?:,%)60HQWVk`?%*%,+)0-",&& -+9''9>6).,/7#,,BJLQOMMJLHIMNN?<4187<=#*' 9GPNK[U=1 ),>6" & %( >;&)<><@0%,3CC6.321*@LOMKLJJRPPHHCEHFG930BEFGS\8/($.+ '#,2(  1146488=AH'*:DMQ;.89>DILNNNKKRQPKB=B@C><6" %@AFY@)!2:2(*$!#&   BHB278@GF/0*EN>&=8@E<>DKMRQNNNG?>811(#3  2DAP5*!(595.)'&-0#&*0  (HA:6:==9CPN-O#9:?G?BB@CIB@?IJB?G6>ABAIIC;@98        !9B8@0)IQ>13$   '!!@(0S:04<77Ws\:]#6'*92?A92:@F99>@7>6@62*       LCB=M*J]O:&%" !!+48CI694(?79>97AU73?T>."7B>>@7>EB;7<=8@78=7      >]J-8CF7*'?BKF1VQC:-/=E?=2       /YTM54Q5 #=73E88% )CPi]?:F*&2/0' %+*$1801         .ENJ75?!&#&#&0A54#(-38>?MG:UZOCC<0/2EF=>GD8?.:!".5WH36,+/0;@186KjyoU4        '*@8+#&)-6@J==@040!(+J[84AJE%"#03/2F6F/+39Gppc<      186( $)5EDKB30-/223-8:8=;7849?641*,1:7.5+!/12) ',-%)-5:GLPRA9=@MK3B2+,2DTcjU1           +, 3J_I6164*%%32/426>C99*:4-)+20&0I>7&!&)*&#/34LPPMK8:HVO4D/*(*1IS[\9       >AIA&)434/ !)$%/,0887;3%0/2/0//,((18?A=72(./(% =RC=B509I5<3/)*3GQ]ZB-         %.'(FI45+,+'$$ %#%.268>>0%0",)+40/ &.9/(05-,A@48A@FH76...+(BQYYN-          &02 $ 3413/.-5-%%,0-1542962!,13+'.7*"4/'$&()++))&3L84:TSM7'       9:428=220*+)/-(-*24??::<8:3143.(--($'$(/1/)*().0.@517;@>65341,/;FKI4+      ;=3+ /<2..(&./,+/,7;C;6;;6;6-9512/-((.+(-" ,--%*,1112.3;>02-1355JG5% 52, ;763-,48145999511021,32022.-0/,2% +0///,"&9,+,/-.27?@9% ,2/"  );699:0,32/.,/015/04/,.)+12+,,'-4/.)65-.212-*3,-),(/43<>,#  ,+)) /0893'$')1)5204//+*+/++&.1+$$((#/',$.3:1.206.0(.+)#%(4652# $+"+" 4/471-,(&,.,,133+)$&+!&'0*$%$((+(0)%77569./01(++'#%'(+-$ &'&* 0,31#"$ "$$'0/--,&$+.*#+('%$$#''!(13*(.$!(%('( ""'(*('%+(4)-)# #'&'('#+)&$(.&!")%*&&"'$" '+)0/$)-(&$$('# "!!$&" %#%' )(" #$$&(+(&%($%"!#$%'*)##$$)''*.('%"$&$#!""$ "&! " !")'(#%"$"&%$'!%##&  !&&#%$!&" !$&  #%$!&&$ %$%!!"$ " " ! "('!!!!%$$   !" !"&# ! !     ##                                                                                      (44. %59?<2+*   596(!//(:GG<( 8AB@0&4::5 &9:>=.'59&(=KC3=KME@ 27>DA:56!;53>LOI5&;?GJC57%!"'AQNL@-J:.7=74@QM80?BNRKEFMOJIQO>+'//5IQNH89H777/9C=.6FSA;BKPURRPPSQOQPD47:?IQQNF0FKCC86.  3EC( &;PSQSRRRRRRRQQRQPLFMOVSRQPB /LPKE>A006##?5$ƒ. 4-'(3GRTTUUTTSTTRQTTSUVTVUUTTTSSTRSNLPSUSQORRSWTPRN9?KC4Sv" ;@4'+9ORUVURRROMRTTUUTVWWWVUVUVTUUTTOOMPTNBGRSUUSTQOON=.~V# 5GJ:-8MTUUUTUSPMPRSVUVTUWVVUTTVVUVVTSSSRRQ=8ESLKQQSSPPC-0<2-5&&(6MRNSSTUTRSNQQSRUSUUVTVVVVTUVUUVVVUUTPMRA07KPB?HNPTSQ>*9EE< Vˆ/5=9%#:QWWXRSNPF@ITTSTTRVUWWVWTTTTSSVUVUTTJ==5(7BG@DLOSUTOGCMOLD: wo17GMA8BRRVVUH9;@CNUWSVSTWUUME@41(.).8HRUVVR;0.51:EKRSSUUTQPNA2375&ƒM0;FOVVVWWTSSO<9?PTVWWWTVOAF>;82*$0MSTPFGLGKSTTSRUTURM;0&"$Iˆ,'.%8=JTVWUTUQJIFQSTUVVTEC?@A@A??>A=6!ATVSTVTUSTTTSWUUP>3139:1  i{0(,(/ASXYWVSN@DOVWWWU:3=>>?@@B@ABBC90 3QVVUTVUSRSSSTRB::=@ACB.zk3$*=GGTVYXVUSPFLUXYXW9,====@ACDGECEGE=-QVXVUWTRQSPFEFEEHIILF="w] 7KWXWWRPRVTNKUVVXK:<<=>ACGMRQNRRQMMG&/SWVWUTQQRD>ABFILNJHG="-ye !@BITVVUPNKIKJGK8!BOWWUQQN@HTSRRQLEC@6 6ƒ] /8>BGTUUVUVQOKJHHHEBC6) "&TXWUTNIEBRWROPG<$ "n\2 :GNUTIJUZWWUXZWWPE<<>>AKSPNNTVTPLJKJIC@FD6-RWYZWQG@8CSRJE="#/"Pg= $6=A>7;MSVWX\YXWSRE=@FMNPLKOSUWPPMJKIFACF@4BSUWXSIND5;RS>,!1=8''/gE+ ,2:BOTUTY[ZWWSKMLACHHMOQQMSVUPMJLKFFCC80F3KSUXVA6=?56NSG??CC2)98" ;fB  %4AVRSUWWR?/-6*(FURPQN;!4@<,JH1  %8OFDBGJQQWUTTVNKLHGGA=9QTSSTKO:& 5?JST@7C9%6GRSSTTPF>90BKG7  -2=;30 #*-.=: /8BIRSGED;27<&&-KEPUSUTPLG4'%,BLTUL:493=DHB@MSSPMIB?LNG9 62.!#$",/26SPRXU96%,BINE@@6$%'8811:JQSRRPMPQKE= 46:5D3,#"((08;/.89;1>MSUH%"8A;535659?FEA>FKJMMKQTRSC?@9 ):9<.FH*   DJ+%+.':;9<=..1><#'27<>@@JPPMMMFDPTNGB-EJ0  8N27!.& +6:>7,%, 499956=BC?8<:?34?/ ",1072/5:1-**('%# #%*,-11001+2;60*.6%   *19KPJ8/60-.*'!%'"34.,+--,3;=:/"112@FMJF:8CQNCKRQQK<( Ee6$)#3&      "26F\>3-40?@;,5::@4>?3<.;947:>D@6?MSPFHOA8ED,%lP &8/*%$! #  -5543=$&'2 "DMKJE/?A?:D@A:4B8<;,680;HPHKICLK<5B>yiB @A-%+   >l ;4:8,7,8<$/C@?=)$:907-1+OY:VE8,36.'e2BHE*+HJJKKLMLLNMMMC@<>C=5   *')&%/910E=@=94,3698&673% 1B?7)4=C;#2.3:5HLNNHJNPPNMFDBA@BC=8/ !;FBAA><0+   "#&'+89;@2";@GNC(888;JJMPMKPTMMQI@=>>;785  #=@@I;8(&  %#!,?4:7<;/7@=I13'GB 5?:7CC@FLPQROOMD@:<47.0%   -@I@1!'. "-('!4=2A7@397>B=OV-'!"?B6?J>=@KIAAHPD::?7*01(       !CHC/ 9B>%   %*(CB E@=238?IY`c"-=! /<=>D?>BBC=??FIEB:<=86       (JAB8KcZ]@1 !$;;CW<!9A@@858?A9=>C@D;@DB;=C;=9:<:    OIAA< 575$#4;6850-06C1%/5;C<@;A98?@>6;<6       3SICB7 ##++'%:Wgtm^;.DN>4CHNGOHMBAAB2I25<.69/$/'-<>;?;69MgjiZ=GH?;8935>JPFDCC.I>:753,)#))/9707:79(      EONG7&!8?/3),!+8DDIHVQ48:644468<@J>@@>)?.;?!&,.32*! $!/#$7FJI3    +D71-!1F?E;<739@H:;=?,;2:9&+4L8BEI8+.'+)'.-3B8B1/0:Cklg9         *-611/"9:+:OK83,.30;<7C>.1>?B8:5.34?69<1&4187 *8aC:2>KHNQK:6@IH?=/-'2I^hjT-        2" =.#+I<70+)&96299,;;27:8-/67>4/9<0(#(!!"#*"CVHO:4@88GS@:.,*.5B]f_;       ! $5!0B991)%)17566-?A++69/-:31-.3::F@560.,,%!*AMIGCC?=G:76+''-MU^^F.      )21#*,:3"")$,.056596(*,-*&/4.+&$&'%.8;3)-4,#=N508A7#)/2* +56;7:3+).200021246/+,+,-))+,(636(', +80.,,.2/2,-+*-),79>;%  '0-+ '32580/*()+321-.+*+3/'&*/+1*)+&;3/. $'!.9862283,(*/+)#()487/!  "))/( 744502./,-//-12+'&&.'& ,.'('%)(601/!31++0,),-*+,,&&%(,0,!  #*',)  4032%!"#$$+.*-*+,'''" !'(%),'% 14,!,20*,3'&+)*)'"$ $*,'  )'+'$1+,#" %$%('%)&'$&(%"##,*)+#$#"/2&).+**'((#&)*!"#"#'(  (&)( ,+&#  $#$)%&'#! &##&$&%!"&($!-1+&+(&+'$#!&$" !"#!! (  !#! " #'#!%! !#$"#$&&''#+0( '&$!""##!!    "& & $%" $&"#%&$$#'%).(#$"!!    "#!  # #&)&++" $   #!" ! ('      " '(     &"      !                                                                          $*+#(%)9>9  *6::9:<<.3=B8  :2';IHHIIBFK=*6L= ,45:JKG<1A<& 6BLF2+@NGEGJGJOE:?L:&7:CMOLD66M@1 -:2$$6ODBNMC?BJNHGMOOL:';EGLPNND3BL@0$, $98'715ISRRND?CKOFELQSN>7CQRSSPPC+(HE50<9"742=3<<*6LTRTPD?FNNGGMRSNJDMQTSQQPB(;NLDHB1 1:==**@5?F28OUSSQLGLRPKMPTTRSPQRSSSQPI>KOQI9-192 (FM;@QUVRQQRQPQQRRRSRRRSSSRRSRRQRPK8(""3D?$),1C$8JK??LSQMPSURRTRSSSUTSSRTRRTRRQRRRSQPPPPE?:>GF.,@:*}> ,.)!2ISWTTTTSTRSSRTUTVTUTUUSTSSTSPPRQQSRRQPQSUSROI:DK<%9† 8>8.$#0DQSVUTSSTSSTSTTUUVVVWVUUTTTSSQRRRSSRQRQRURRTPMMM<'  ds( +?IB9=JSRTUXUSSSSTUVVUUSTUUTUTTSTSUTPRSTSRQPSQRRRSSLA=?13=2 ‚M6#*?LQTSTUUSVURUSTSTUVUTSUSUTUTUSTSTSRSSSSOKOSQQRRQSNG;33BI:(8‰,(%.85#'@PVVUTRTSTUUTTTUUUVVUUURRTSTSSTURSTSQQHINRRPQQQRRQE6:EMC8* a€+3AJB7-"#DRRSTRRRRSRSRSTSRNLLMKI>& [}+#//2-3@OVVVRTTVVWWXWO<=A?@@@AAABDEEDC@?5&KQRTSSRQQRRRSUQMMKKJK?+sw-2%;KMPUUWWWTTUVWYWYR3&:=???@ABDJLNTQOHB<0BUSRRUSPQRRRTSMKKKCA<' sw;MHDJTVWUUVUVWXWV=.;??=>@FLPSTUVTQPPN@#ISUUTUQSSQRTQKKH@6/+(zu ;B@;:KVWWVVVXVXXR.8==@@BBNSTSTTROMOMLNG3GOTTRSSRSTRKF@1$$"##/€R /8996EWVVVTVXXXXP/(;=>AEIPSSWVUTSOOLLLKKF8VVVSRSTTRMC932*!26%(wX8 $+/9OUVVUUWWUYZVA>:=>?GSWVSSUVSRQMLKKHCH=(&RYVTSQSQVRJFB;*+=;) Rc> -;BJMNEGTUSTXXXWOH;<=NRMMQUTTQMJHIHFE=1R9!2RWTLD7..ASOKKID8!%( !F8DhSF0&,321' +;AEFKQJIB4=LGAEFLRQSRSVQPPMKG16>SVVH5<2):FPUUWRD5))'-9C. 2H~Œ‚x{taH;66./5:EODGN:3:/$(.CTWWF72,;@LLOSVVE85/0;EH5  >Z‹ˆŒ‰…€}oVIJB();<55D@55$#249<9AMWXM90&%:GMRSLC<2%'555/?NPUMB;8BIOJ; ELku}†rihTGH@@<%'6=;4$&29781<839>. ,=JQJE:24<<>@B=<@IEGRRSLPPQPI; .BDRmm{|mUF;7AA9=0;?+!.3,28836:>>67,#$1?FIIGCAEJLKLMMPRTLGDLPUUUSOKH< *@lJIjovo]E4/251799>LJ;:2,*0689=72'!(.07@?CE>9BG:54:;>QSTQPOMRTTSUMEE; 0FJmdTmz~vbC5')/4NN914=21,;1033378765441-//058:;88:/;CFJQRSSNGOQSRTTRPHE9=MYH@88;??1120044655521++1100221/,6?BBFMIADC5AROQVUTRNH>@_...Nppm]>*  MqS9;?@=501/../21-,%# *357:98/,596?FD6391CRQQQNHEOK< 2qb<(1BHB$$   ha.+68A93/.-.++ ,9<769JKEC@=?>9;?@@@<3<6-#LBAK;" >zg]"%'%#+*'%""##gE%--&-''8,C;#?MNNNOMH>;>@DA=8;=9966A@;5;AG8@? >vi[' '-%(("## !6lGJl=6=."*01LD=?::;?;5)1:;7JB*  2rvS.#% 6[I`o\UY=#'5db9G;LA5IIKJLNNMNNKA=B8;47.)-6A5  !InNG ,3*!! 1F)G[`:D/-)-)%"8PF1 9>?BGKLMLKNQOROFA<841:=5)%. !GXHP (0/'!%'! "8"5:C=6L8?;787>,#&5=3 #1<=EJMLNJKQRROFDC@??B;;3-#  =?DN%,&!!'"! &&86",=43BE;;BJ<6/2>>C/6:@?JOMLMNRSRNPNFFB=<:88   #>H<;-/ $%,6.+0<3<;2599;GD:8" *58A=AMIJKPRSNKD@?<;64962      )CG68 G1""$"!"&&'KJ+;8.5E>K<55@I@AEKHA84;>7/ HHC=/"MXZK, ,2DH@/++& 346=<9CDC@>>397DQIP:##(7??@C??F>;=>E>EDA94/ ;EH@;&/HSRLA@A5) !* 051C@?FEA?>@F=8@OO^-5B'"07>;?E9<;7;7  '@IA7+,?GP@;6" *15>E/,2:;C9<6<@>=2:6:  CL>S33E3'+!7:KX`R=,+95/@JPZ[iUO@63=4D9 =1)*'" )*<<7;69>EUfjfaVRNA77<0=>1,$34/13! -268679861   .QEJ; "(.%%)3?FBNSO>=5/6Obdc]TID898&:3/3+##5.894 ";HJF/   0ECD1 &0/),77==?<<=FD?3217GNNJF+081/.-!-*5AIIB83+)/-"'3G=>0/0=Dkkb9    +4:>36;<94;9DH:544774-2990$ *9H!7@JOLKAAF7:EA4710)5S_g`L.       $.4   8;@422498./759<:13448>1+@/64"(037C%$KKLP>6;9;H@650/,-IScf[9        "   3:>10,&32.3704;70/323:8$3,8<98#(, %(ED958:AG;;883/+.=KZabC.          &9&3'&(&.,138343,/12.1:7%,)+0,4==<3*0,$2CJ3488EK>87001,1EUU[M6         ,,52 '(+(-'1-:37-32,.261/55,300++## %/,5,!%01573283EB5944301CGMQH4!         <4.:. ,((+3.12-85698+3:,/366/8518621)G5&1.,2-#)42(#-87698275854BCFHC-$        ;4/5# 0.3*-+00*35669*/4./334/64//306AWG#'-125,265.'':<024-.165>BHFC,#    2311! ,45/23*.2248-.1-2633240-,.*5.71 &32054432/36/.1+,1-8AFEB/#   #-2,. 1!5936/%33.44/10,154417,-*+#/23/,2014111200+0.-/,.?ABB2$ -/..(.:74:3#)+$.1//0-061.*4-.)*#,4;4(&6/01/20*-**0.+*-19>>9%  -/,,  )48318-#,-*/0.++(,/(%)1-,',&+56.+"0,0.14/***+,,(().379)!  */*1-12+',%%+.,.,+/)&)'$$)2)+)(&#-40& 4/+*-/++*+**)$*$*/4+" ')-, "+/'"#&"&)'&))&(*$!##'+.*+%(& (.*140../+((+*)&'%"&+," (+*- ",.(# ##$$%&#%##'$$#&-*(*$'"#%##),(%)+'%%(*&#$! '&$  &'(! #*"!"" "!$'% !$$$)))*('$$&%" ($(''((%#%&""$#!!"  !'# & ! !$"! $$"$#%*'&'%&%%!!!("!!$#"!$ " &#   $'$  !#"!"###%&"$ %%"##"&(##"! !!     "# "$ #" !$$!!"     !!"     #"                                                                    #!(,02! "39;:8<:%8:2$"67,9989:ADCI=--@B0%=?=@B=*8><*.?B9;9EHHKF63G?(7:=BJJB39?4!8B@1,BC86:@DACJBBL9(:FJMNJ?5;C:* />M93G@4(4>@=;BOOI77DLOMLG@5>B88'5JLHL:/.<=:7;LQJ7 ;KOOLFE@5D?)- ) !:94FROP8,&-<<4*8JOJ7'<16; ,E@,6EJOS?/10>=.,;LRN=2?OSOLII>-5MFFD612$1B3&'>D-7BHIRH:87E>45=NORM@HQRQQMMB1BLL;-1=9% #.BA1%1?H-7BGJSRRRMQHGJNRSPRQPRRRRQOIFLN@+4::>E1-# 0211'+:N>5;LO:+&4'3<*wc9,CSTIGJRSVSSRRSUVTTVSRRTTTSRSSTTRSQQRUSRSRVRQNTTM5:0*AB5&‡A(!782,#3NQONSTSSPUSSVSTUTRSRSTRUSTTSTVUSOSUSUUURTSRRPTI7EF66=LD9"M‰#(=FKIIOQRVTUSQSTVTTUTSUSPRPRTSTUSTTTSUTRTSTTSRRQSRSQQA8GTPPMJ>;3 or"/8>CITUVURUSSSTTVSQSSOQQRQNMNNRRRVUUURSTTSRQSQTSRROM>DRQNIJLIC6ƒ\- -4FTTSSXWVUWVUUSPUQLDCBCCFHFIOLMNSQQRRSQQRTSTTRRMLSRO??@?@D; <‰A:69:9:?JRVRWWXWWUVVSNOJA@ACAEIILOOPKJHGM?7CQLOSPUSTRQPRSSD;;988;7 a~+?">OMMSXWUUTWVYXWXXRGIB=?ACEIGPQQSUTRSPHI<()HOQSSVUTQSRTK:1,.64*u{(+$>>00:LWWWVVYY[ZYRG>F=>@BBLQPOTSRUVTTSSMB7LRTRRTUQSSPF81-.0'+#$sd0 47(28GSUTWWXVYYZP>>?=@@DGLTSRTTTVUSPPSNM;#9QOTVUSRQQE<2(%" )392 1wY9 &''7>MQQTUUTUVYXTEG=@@GNNNMSWTTTVSSPOLJIM*,SVVUQTRM?1$#$2A6%{oB #7IQTVUUOOPUWVVQM??AFNUSKQOQQRUUSPNKJHMFJWUQSSQSF=6:5->C6$PqP7  5<>>BHALVH@OW[XSPCACFJGFKOLLLTUTTPLKJGIM*0&-UVUQSSSRRK@0+9GB;2 .jYF )&)83+>N>4NWYWXTQHDB>>?HKMOPNUUSOLIIHGJ3+!",#RVURRRPSSC6)166<@6";`N98,573% 4GHDHJTUUUUSB==9=EKNROMQRRNKJHGDF6G!$QWXVKGKRG3(-*' /;9(6VDV?\qwvibU,7DC=6DTUSPOK>9814<<*  4k”“~x|}xhru€W,)+2:PQOLA?C724;=QQQW[PLFEE8-;AUYXM@3)>GOSVWXUD?@C5*6?+  EkzimjYMJJI\u…y*/41;EDB<-(79<<278IP;,),)4>GNSPG==0#223=LLTSJ9;5,3BE3  :HZNT\P;3437;Jcg5/9??<.#.764611;4##(*9FKQPQJB9JD4>HWNGIEB897779f]>D2;%%186&75635=889/*=ANNOQILOOIIGHMPNMTG17ROWOKEJOB3  .D@eZVaUA736967Cba\_T==!'"0373:;3)0+3?@BGJFLB;COE0.56AQPRSUWPQWYVSTPFD9 8YXggs{ƒ|nVDEPMOH?6;D1'.! /067?<;<>@>B=;<76;:;C@8)>FMPPKFI@ERRSVVWRT>?6 $FLfpous}ŒŠt[iqgQQZ]c`KGE6.$$0569@CC@??<:2185/14;:31=EMSO?7/63-HQSVRBCLH93 :RE1?czvzŒ‡l/$2RQ_dE9993(#2<62377477761..+/3585.067:=C:4135+>NRUS;1>M>0 -u17 )\pye4! ) 8~†./884-&-745554/1,$(74:8<7.:56484378>A12LRXUL6/=C5d}B"   .nr[8121/-++&+0153#9:08A871:?99=819;><1/JOCHSPF:3+8„‡Y    gI8CA:5543##$-11+-*6>=@@:94@?;>:5562'(&7JD:DM=EK> UƒŠD  {R15+&5@B7(( 8>)2HLNNE?<;D?D>6:>779-!7@8)GM@0A9]„N   #eCRRPD#151.I?:IE6MKMNNJKIHB?;=B;=<=;5"!.DJMB(QƒƒK   0Z4XcZXQ1(Ao1>28>C?>;;+3DFD=       M}B      B+Y^NS:*$7c =666BN6$FLIGHOOROMMKEAGJC?@:31,(589+     L‰dRE  @K)P0V+ ..*04=-:RV<4&17;EDJQHMJPRRNID?::3.::(%%*          =ƒ[@F!$ ;/?U++!K9:=<64-. &+(),?99@97-.      7fF>? +  *95@26<::59A?<;?3$)33%83/82       =A?HO !&$9=<4187AA=6542MC9=*!'58?BJNPLLMMSRLLE@??<5<49*   BA8IE%$'("  <((%493?FGED33WVC?H0)$#(:>?FEHNEEJEDMMB?;5*%',)#BJHB:&"# +) 4 )19437;EG<:=LQL>K<;7/')):<>@>G>985>=6!ANNHJ6:G3?NSF.$.:764.:===?9CF@M?P>N&0?,198:B>CK=7??GEHDB52/$9GIE9.$BUM488.X;  2;;9358;9>D>J;BQIIY@8NI!!'*5B>=8AG<8<@D7?<;<8ID@453'@0B;N(7 ))01841356DTbT?;GVO@6-(9E=>)4:87C<;5:??<6;6=&  $SN@=(4C;RD"* $".<=2-/<\d_KI@DBV?3<#+7# "+(3;;7808=7@4;/ 9R9E1!D#DE"(!E=E654;O^gml>J=MAO28E4( ':04=B/&.485137597 FG;;4"?6" 'F7@GGbeennnW?6J;O4&8-1*&!",:@BG/%#  FGE*   FHA;4/ ! !,-+'2>SN?<0;cpraDL704=@/(#-1-28WULE?6:+*&1774556HGjj_7    9:;0#1 +..68?;52:GJA2+8QRMe]246:=4- "'" ,8)FXUMJF54512@?:4440HUccbD(   31&   )+3=;322479?B7+065ag?VYfdQ5       $ 8-3A9--05525<:02/2E?I19=>60$((!WI@198:??:78934.6LIT]W9!       13-  24()-/4405.)./04M7%74+.46<31.'.&!)/7HB57;5:87765304?JSYY@.      64//  &(64212.34440+/442;1):,+!+&"'$/1"#/31),;74;>778252.FFNRVA-       8501*  ./.315524:245//253112-;).++783.*43))150(%;@9;5331534?KNMM@+     525. "--/-*.0006,.///232,2406&0.,p_24-0/-3432.-;<<,03-02/7EHGG?*       0971$ ,21/3,/.5*-/*.44./01--*23,<*4821303424@:,+,/+,..>?IG=,!      )87-- 2 753+-/--5)+.+0520,159/+/2+, +42133/.3*(..-.,.-1=CC?)%        %47/.!  %54/!-*('-*+/(,3/+%-.1+/(&* *#'010/0.1)**)+,,*,,34==0%     #5+,-+  ,+)'+',.-*0+)*--'$3?,)0$!*'''! -2/0,.00*()+,),*,.572)    !4)*--! %(,'%'+&,40(*&&)'&#&0-)&(#%))#%46,+00-**),,(*+%/10'%     !0(*-':4+%!#(()/,#'%"%%"#))'(#& $'+,),+2*%&'+*'%)(*,)# "%0-%$"'/+(,')"!&*%)*###%&$$)% $!#%&***&&$($'%'%##%"#*( "' %&$##$,.$#!!#!#&$$!%!%! $%'(&$"%"$#%# "!"#)% !"  &%#&"&&$#""&&&# ( &','&%&%%$     $%$   %((&&%"&' !!#$#$ "$ &&'&$%!"!    %$"$$!"#$## !%#  %!"#" !!   #        !  !                                                                             '0-38;'06!(0040# 46$!1689AB9&;=+-;?AB@?29"1<9'.6;9:I=3D>(9FNMKD="860;>.4E82665BKGH:%>NNLGB<#@<%(!7J89G3.3-+5GOE44@QPD??@$C77908JOMC-%*--BPD19HOOA3<>#!E0.+ !5F;!4ACII2*6'*()=NF49KQN>6;=%,G2;*!2IA(*762L@=A42/691AROB59PQQJAB?'@PK7(!4:DGDORPH=GRTPMDG>;LN4(5>DM:"&,#6:949>OJ>FRO82327HQSSUTUTTTRQQLLQSNOOKKJMPO;8AJA53Ž6%6ENMKMRQNLPTTSUWSUSSSSUUVTWSSSSSSSVTSSRPTSRSSTPLQROO9#@>8FTWTVYVVWWRPQRSMFDFJRPNPOSTQSSSPUTRQRQRRSVRTPD@QP9$&K‚G< 8JEFMVTTUTVWVYVXVQQQPGDFIOJORPMQRSTPQNRKRMOSPOSTSSSUVTU@/+&#!gs?B!56'-7KUUVSUYVXZXPPONC?ADIOSMRSOQSRPMPOOIEC4>ORPQTSTSSSR7440$"7=5  m[@:'%$5?FRQRTVUWUUTSRPOND@AFJQRQPUQRSROMNMOPK@#1JRSUUVTRRO8360+5;=?:1wpP 4:>?<<>>CHQNLJORRRQMJKJK;*#!9UUSUSPQI727@DEHD4 %WMNb4sˆytl_G/;789D5LBn=eƒ‹Œ†}†ˆ?%37456GSVUPPI=::<LD9AJGA638:DECGGIRUUSSNNNK+,4M07F47IPOSUVVJ77DJH>4 ^naks}|{zm|B*7@A85<9BWUXTJHFHL=&95LM=RJ=4:FOORWUSGKQKB:*1 @bjOC;ISZSjshk_8+15>:47:.,9886.-6?G=2+7*2>AKQPPG=:+!-=HFOTOSDC?8'9>/ @NFGBDUYZNWj‰‘ƒa@"!39966" 387464.;9$.=@GKOQRSLH@@>@AHF4BTTRC31*)D@, -F?CBARTSFEM_s^>AD=()20'369468;277*9@GNRUSA9COKIJORRSVRNKRVSWB0/DI:$ $6=KFFYY^PDCIOXb\NKU94 !(3865<>646-5BKKTOOOB85AI93;INQSSRUWUSTYSMOQ8, 9BOUZ[ery}~{z‡{ffhR@99,#-7987>8;8=CFLPLM<4:74424073DQVTA79BQ> ,TIWLp†Š…„tHPL9=YqrM*17::2"/5139;BHIEA;80)7751&#'+9=:=<988>>@77LUSSD<5HA  3`E+.d€“ŽxD4  -(;\25497/"314478956553)&..35762872*417@CJGF=3LTOUPB569!u87 4?A  !+ya4*5775-*,3478:;6" :45?<35;;718626?B7==7JKCDQOG=3 Vwb0 ( Mn@,,(+0054'%('42 -,#9;<=888>?6<;56849->6:>:-7O>BD;"v…#   1KR?6.&./57) )F8.GHA>;;A57@==9450/14.;QC44':‚Œx) @w1DGY?&;86+&6320R-?9?>8@>@?;<4)#7EFC?D†…MG  3+E3+J_O) #CÀ~*8,/7"((;IKHHINONLJHBCCBA?<37/)/684        B…|K_!    G`E>;3W*533$[@2FG;+3@82IJMLKNNONLJG>@>535?<*$+%        ;…€AX3    T67W?"(#L828:/-(-3.*,/1,=LJLKKIPNRO?=@>A:767,)+       9„i;P-    E65<<%F@;45@=:640'&%#:>DDKMPLJJNOQMLFBAC>A:63.     ;@=>LB57>?5$1;;BD?EOOOMOSONICCA;8=<86  AHDJK1%9<<.)4.6<;C@?FBELD>3&!1-:=<98=JDHKFHLF><;6)),0/ BKG\O>G>=GJB=<4@<:07JIJ__G'   0/4 0?>7;5,5875B?=OGLU3S;;&$!%7@?BA?@F=;AEJIFE?56+ C9MXUKO%5 ')[81"7?@;6.)6;=DBBEE%NUA:&GI)$!*<;<;BE@=:CB;D<;@:( +ELTFKT4%2<:3,1>AZaYB31POL6'@D/&"("+<7;?6>+  @L=BC6& 4J9?!F;+"13497735LcEA;N,5M31,/1!!&'.3'7>;=:6;=8@6:1JJ1@:&0B21>EP./9985455EXIS2O.@?1@9%#+(,UdAC.#09;40297;5&H:@>97 4"  , ##C)-:7,5RVhhX1     66<@,    5*!.26J?=7.Hadca]FNTE?45134 ?P6?JNJ3252=>53/14?]TgeaA   47<=*    "7200)-9963413JNJ]cV7     )2/   $*,-0(,7@3,23<2F:24855-,''-#1(+.0-??A3386;3766330:BLS^W=*2/-5$   3.20.,.3//0-247F/(.0.,$'(0,*&%'/330&.@@A?643734.3HKMMS<.   8536/*  '#0262-0378/-/79<9*(,4.)$.8/240,-1374'+?8E6234-333BHIGK9- <218.! "!!),-2642,,0633---'/.&(%O__>-+.243430:?C6//2+/01>D@GH9, :4.2+   "/3156/00,.-005-.3&+()))A9) 47/2. %% '*+/.-/.086/--/,*&$/1&.*165,&,/1.)-,-'/0.*(*,)*5549:,!  22,,' %- (1*(/+++.+(-,*(*'&%<6&'&$-+&,('#221.-,+//.))+)'+2222+'  1+)(%-' -34*#'*(+2-())$)(#$"+)#'#&,%&#(/+*+0,,*,**'&())-,( 4)))% +850*&)&&*-*%($"%#'&,,%!&")+&+ $'&(--+.+*)'&(&'*(*-)*  /&.*-*$''),''&! "$%&%"$"" $$'&'(&'('%%')$!'"" )*" $!-,'#'-)$+*)'%$#"##')%%!""!!$$####&$!#"&$!"$" &+)!  ##!$(*-.,,*)*)'&&%"%% #!#'#%%%''%%##$!! !#'(   "!%%')*+,)')()(&$#"""&  $%"$$##"   #!  #%&&#!%$'(( !"!$!!%# !   !"#"'$!$%%&%" !   !$# "$$&%                                                                              .4+ ,.#$'6<:,7<#2=>><7"  49.#$2?E=D=#9FJE@;*3(9:-7>+%7HNI9"ND1.?NL>+$ $G96:=61=EMA+2;/' 6IC/6FOF1-I.,<-/"&8AI:"(83E1%9<8)8AM=,,$4H97F:#1A; 4JM<$2JRG7 #8L=07E;.:OK<+5MPF:((!"EPF4"6??+2,4?IL=;KOK<4.2(;HGOJ@DJA>LOI:-=PQF;/.%5LN21:E?.1L (4<93DMJNMPQPH<96.8KQTSRRSRPPNG;@JRUVTUTSRRRSUUSRNHEIPSPRROTTRPQOE<0%7AK9*-) †91  4CB1#).?I?=LTTTSTTSRRRSSSTRQPQSRRSRQQRRRQSF6"*;IRA!"5 A‹$&& &>H7&%862EEISUTUTTSSSTUTTUUSTTSTSSSRPPQRRPM9".?MSP8#77/6>0 h{*)820HH;36D;CJRTTUUSTTSTUUUVTTSUTVSSTSQRTSRQQG3,6DNPK6&>JGJG9-…_'0?HHKNLI>;FRRRSUUVUVSUSSSTVTTSTSUSTSSSQRSSTRSL?=FMQL='6AME5@@69Š='&.:LGM?-'23," ,yY 14>=@JLFFQRSWYXWVVUSUTSSSSQNSRLOOPNONQOQRRSSRSSRRRRRTRIOA27H 9BJQSQNQUWVVVVTWVWSNORTROLLMKNQQQQPMKPQQOMRSQQSVTSSRSNKJE=;@ID7h|_&7540113::BOUXXVUVVURRNHGFEEGHLOQQQMMPQRMI==INPSUTQPSRNHGECC?DL;*Y„m? "4544578)237RWUWUUTLECCCCDEEFJOSRPNQRQQTF0#'3=PWTUTTRM>5206D>0-/DfJVuU`a`U\N3%09:0:DNRVUSQP@?==AABHILMNORSSRQNPPB/=RQQRRRP@7?HLCAC9,CLN€NPu…ŠŽ‰_,,0(3<>?@FNOPRQPTTTOOQPF0%! ISPQSQPIDJIDEFL=0 =G|SKdwy†Š‘?)&1:AIMQUOJKE<7>>@FLMNQSSTWTSQOOBE1#"-POPSRQNB>645;6@JFNOQOQXTTUTTQ@A8*.FKNQSRQA403?ED?6$ eumZSO`n…€‹O<037>9/-CIC>9768?MECHFMTWOSTUTN)429&:CJJMRVSO@>GJMSTQPPONKG?*  IdJ6$%1Cz‰…zyqcG-'5836:;5!,;=>86,1;FGJL@11;@MR@47>EC9 +B=4$+Dw{]KBDUo=')"(268887.674*08;@GPRO=7ANMHKPPQTVUUSSUWVB3.=F7  2=?:-+9\y}ƒŠi][^eN4 ('15668<;327:>JMQQPJ<324C?8EQORRURSWOQTZOEJPC,,>B=VOF]w}{…ˆ||…oJ76,)$#(4=79;<86;?HLQOPK;551868/4NMD@B@EJPQSXSLJMPI3 2O^W`Q}‡€wtT<46906:;?JORQIFCA:2"/-/6:GG847;?:DoxP"3:<981368<4:BMSTPE;544796&/.8@EF<38BJNJJ>>SUOMJG<<6  6\KC?SyƒŠq]::0-/I@$'"/79:84448;=BDEC@<2'/3-242.53453712>EMQCK=7PSPRQME;)7`@'':_ijK#  @X)'/69=89586577;975,+&"08:6/5;:5680666BE6@?5GOMOORSH3v^9  tI&.'46697400-20 !*&%5:<468>;6;?72877;2A=07EECPDBD* OˆuP hu:JD%+1361(&*%./@< 6=?8;?@;=@;5:99;62;E?:E<9RJ9(n‰…R j†7HOO5'+,01.23)3M% ?GBFE?C>9=@<6:>>97;CAC19SOD%}Œ}O( ghO-+JP9(633722*'578JKMMKE>>684/012DG>5 1€ŠzK=  fUqG30KI"!#ˆÅ=(!#.0#+%2KKLMOOLKHB=<=@?=935-)/9:,=‚ˆtGO qc@;;4/( ,3*VR29;+6904FLNJMMNME@?D?=82/8;2)(/   =‡}iEe# +{?>>7=1&K?76;#"";: ".24>MMMNNONLNJ?=>@=9:96*('8f\GX$  Lg:5746+=JC=>:;,#-%!- 8?B@EQNNLNOPNNIEBBCCC>4/)  9s_\FP*Z8<78995<89B>CED6=A0 $00;==:;AMNOMOQNJD@><9:>69,  >WOKV[1 /I97:905=4/4:ABADBOB.-!%196:;?8-,2/>FJSdWR.  9@996-8=<*//9>FGIQvZ<9"&-;;8>D==FA>ALI@=;;;9.G7NlqSh. "+/(#2?6/9:9:8(--6@VQLmžT:=2#*8=>B>?EA=@CHIDC>745) 0DCNcJ_k- 'U[CD;&""2?<:>8*075.3HA†x==:<(;& 36><==4 AJTQQPkU"+&$A&V\.<.699;96/0>E\@PK~P>BC7077"!,<8>?@78==<98>66"MJI@IG@56"1-9#HRB- 2=<=;8741E@54ONp?A:5)400('7A'&)5:9>49=<9>4;/ -UD8CJ80!!.)-?F<&9967521/<4V`D?^X<622,%$)0EXR+%*73;576:4;00O3?G>*0 # +0:(4=55103W\^EQ?gL706;0(*.)$470$05$85889,%% +D4=@A+$ '7@/'443558baZWED`F93>S!*.(+9*#,WS:/&"%$('-+*9BFPbhO#  &?=80(0   !/:A/2+/4+!  )4=602IFIQ=M63A<8'$$%,'34@A4789BD8:91./GXKR^cM5   '+41&'4AB42=1;/?B63,0BA92FN4%'12-/80:5287=77:3109D@MT\R;5443(  %#-5:;01-,-42K50-*0B26,:D<)&1545- 2A?B=42432/,@LPOTM4&!<3.,.# " "&+*16;2''.5:?C.0--0-'/,3N@,*1226-)7BA@311-1//:DGNNG3&  )A945,&$  "*1:?7.--/34G;20)..('*Eia3+-2333/4@B@>0' "461/)   &,0//2458641,+35")*&)(% //225431-0121-,,)(,5:<;<+( 9511( ( # $/+..00-6;666/..0-#(*((**-(,*-.-,0/+..2.+-*'%,54480) 4/-+&-%& +52/+*-*'+4430.++.+),%%%(&))((/.--/2-/00,,,)%%+.3/,' ,)$(,.((723+)*+,0-13/-,'%'+,%!#$$'*'+)),*).---,-.+()&'+--+!.+'# ',%"421-,,).+,/,/-)#!$&-(!!$"%&'$%%&&''-,*(())'(+((()*% +&$%!&*!#-"!')*+&+-.+,*' ",-& !" %(&'&%%(''&%&'''*%&''%  %(&&! '!*-,)*+*,--,))*+--%!!#%!'('%%#%%%"#!$%"$ "## "&%!## &(*'(((-*,..+,,''(&,%"$" & $&%'&'&$"#"###!#$" #$!!"((*'+-+))(&((&' & %!%$&"#%"! "##  #!  "('($%&&#&"#( # !#"#!"  $&%#!! " #"!#!(!)    !  #%"#".   !(   "                                                 ' $8;7951772&  "+8CDA9#;A?=6  4,7846&+=ME7/?LH=&9@2  15,7:A9$8:2$04HE04FMC5:G4$46>"!@F2EF23860@KBI9*"0=52IE7>I7)8KJ:3LN@)-,GLKD3,7 89G<2?PEMC338*:91ILAK?28BNF8 9OM?-3=KLB-6@22.6@AMLPPIMK75=,/39NQNO?=@KL@4&APJ;+4BE>-5KQI3,;=CMLPNB1$EE:/"x+ 9>;CBLD4056@QTRQPIERQQPQRRD7:;41CRRK9@GJNNLHD<$(57MJB8N|/ 3=:)'.3D?/ *8QRRPQRSRQSTSSSP>14;FPRRSKPSPPO>67(*@HL?-(!ub:9=10,/<8+4DQPRPUSRSSUUQQRRPDIRVUUUSSRQPRF/$;KPG3)*&…J<6F<1 5>418/9QQSTTSRRQTRTQSSSRUUTUUTRQQQSTQ:"1*,;JQ@('79<9)G†+.3.(?L<4*8C206IQSSTTURTRQSSSSQTRWUSSRUSTTRQSO03;2.;NG73;IH@4 hz!$$8DFEBD<*,?LG3!5;C1:<*…].)7G<14966NQTSSTTTTTUUUTTTUUUUSPRRSRRPPSRTSSSQURSTH1),".A?&)#<’@,&++3;>>831.?I;",+ Z„)("6LEMRRTUVVTSTSTQQQSTTURQOOOQQRQSRSUVTTSQPUUL;D;3BH:/5:;8)ul&2$6;DLI>=KRVVXXWVVVUTUSTSRSSTTPPNNMNPSRSUSTVRSTSSTSSPQ=BM836@FC>3'|g+J!)27@VYVZVVVYTWWVWWUSTTTPRQNNJOONGJOPRSRSTSTSQSTTUURSUP;2@NGB@2%;{[ R.7=@JTTTQUWVVXWXUWWURQTPKDGIGGMIMORQGOSTSUWUSRRSSTTSTRTKDPRKKH=5 9…t81A"8=@=<<505JSTWZXWUTTSMBCDDCFEEHFKOPONOSVVVRTRPRTVVRSUTWVURQQLLE6 zmF# '/4440-%1=::RWVXSPRRD>@ACBCDGGFIPPSSQRQTTQUTPQTYWUVVTVUOHHJE<91`dHV.)1>JB4&'/4/3946GQTSRRQOB=<@DDBEDHHHMRSUTUTVPKNIEJPQXVUSUUTGHLH1)).+ ,bHQmb]NUbxƒd3)*),:GFKTRLLKPFA>=A@CEFHJKMRTRQUWUPE<$$=PRURRRQRNNRL:6==4 5LOŠ}SUdjjt”P />NPPSPPEFKOD=@@BDGDKPQPTUYYUUUJ;%5PTTQSURPNTOMNNC6" *DxrCSd^nn†`L"28"266328KLC@88>>GLRQRSWXXZYQHG8# >NRQSROQNIIJB?<6  W[P6$!*=a|…_=6.)/0/-:I8=?:<992AO;CLPRRQUXXTJK92&&CKSUVROMJ@:.+-&[D5(G[Y}X=2'/616G??630-9BGI@>JLTOOVXUN6972/ +:HQSTTOMA9758;+ LC27H6HjŠP/")+2EA=9, $7>A@B@98=CLUWH0685;/ )AIPSSOPOPPLJIB'FA((_::9Egr‚O"0==0-)*68>=:7#26)",58<:ABRO?91.3CQVYSSPSUSWTJ<-3. .=*4z~ZCAMX†[2*:6&'-5:897,39<2)2794&"08:9771447769>AGNB5459?DJORROPRRNQQOGUQ@BFB+;F93ID>HNQQQOSRPA<886=C)4ZhbU`w|oA-9B6-M€S*'875:/6:=FMD5B??733560..-!5967:92=J>@L@KHBRQMME:?<L]H/C8\z~uX)+80:)55AA>:96;9882)'3632.*+-65334365691=F0?G;KNEC:CL>Bl<$ "'(%  HR4818<@9863..() "(.6((02,1;=829<77530:;/@H>97;=8258=J@2ILK< pŠƒjN <Š‚{>)AM& 2:;9.)$#& HJIMC<JJOMOGB?<:::@>;57.-'2>8 1†{„VYU \‰]A8:6B3B:.-8)zV.5&2++>LMJLLJA<:AC?>7.1:8,&+) :ƒ[{MJa k|E/6@;;FH:BB90$1 =5 *./9KNLLLPPLK?==>;98<5.'%6yfyWOi  (xt?3696:E=C;QA- 7'**;309DOOMKNNNLIEDFDEE>:-.#6{y{PZd'   AsE?=8=96?<-4M@?@:22%)18%%5.17>50/24 ;gWQuoOQRs]<;9617=I88,>JLD<99?<,#  6[LimbIk  &3#YqO=>137@GD43)3Ab>WrH9F8+$%6:;==;=?B<=81(SV\^>\_VG3TZ6A2B5$5:D?7745+-K2KSH7768>>.&6;7;@978>8>59;6+ EXSD3JT2(/997626:79:7=- DRE9HN895& :' 7-)?GB@A@;7=JL^OVB=4OEQv^:ENZQL3'!/8330789/6$IK8>N<6/$   %,),;878363Heg_OG@6569ƒq?R>5.$)2*E=#126:7<,"%!,!5;HF3DL38D=5-- .08"2767468L`_D8>.4.&/Z;6;;4.-%&%9WT;&" #))284EKNUmlg? 6G999:  #/<2%-8;769XcND5,/31.)6 -p9OG&$/5191-6G636>49C]U^mhQ+   7263+ <90*17589XU>;3@D52/04-KA69&,<6466IM998=13E][UcgZ6   &21)'    $9=&2/3=EE9K7;aS7249710.01,8.$,@;55EL=<6>73=:6D@&.21208&#7EkL@:/,2=0+10444+ 7@EA23//56/<92--03,7BBRRJ91 8C=6301 ! )4640G>4360-/(7@23+%/?E*(242/66:0284.-2/.3>DEII9-  6A964/,   $/+),/1+4;L.+08//,%-,).-063/2-0-53542-),;>@>B6. +9?620* ' .$.1-69<6831/-/(+,2 #()&(.10-,.,3961))(16;890)&<13+0( !( 820/-.3::6641/())'+."&"**(,023,),(-//'*'%.146/& #5,'+/!$ $97<0),)&.3451/+(--'*'"))&(-,02,.()1&)*&&-10/&  "4),%. *,807320-1-(5040*!)0+!&'$ !&%!'*(,*(*&&*)++''-..#!  "/+'$"-,%9205-../2/(-01.% 5/"'("  %#()'&$&&())+'&))(   "- ''"5)$-!,+%&),0.,-/0-)"(5.(6+# !!%#"&"%$$(&%(##%&"  (#'% $ %&++/0'+,./..-+.&+,,/B.""  $%"$"$$#%### !  "'%%" "( &($"+(),.,/./+&('+'02C- ! $$#&"#$! #" %'% '$*+)-%+%")%'!-3<' ""##$%#!  !$  ""#('%$(&(#&# $"#!"24! "# !!!$#$%%""!#"&!$++1,"# !%$ !%+""  !#                                                    "32.).*#  162$.;<94/??<1 +7,/68943/7FA58CHA2"A7.$699,-=F836:21CA.8GK<&+A?$ +5=8)27-):J>08A<*AC39GF7 893F=5>1 1871B<%+-#7KH7CJ83BD68JF27AB:I@9C?.645E?1;D-,3 +)7KMEK@-,;ID77NG7B>HB7/">NF2AGJNMNM<5-:/$&478BJCB8@F18H3&1=PMOL658:A;(.EOF0)EHKNMLNH=!-@9% -8:6=3179;;CN9=M<5>OQQQQ@337:47LNE$;JMOORLJH9)@;6_A-74;AG9((25FQPNONOTTTTROQ70--*1?QOD.ANOONE767$9ALF:0.ƒ(,4*'-6<8%211KQUVSUSSSSSRRQL@)2>DQRRK@ILLQM0";KQE7+X{."76"181-6-5>LRSURSSTRQONSSRQL>?QSUSRSSQPNN=%*!,?NK:&#uh97>8#*QTTUTVQTTRSTSTQRSRRPRQSQQPPQSSRRRTQDIRQPI23@/%:@/!Šd+!!.373<<+7QUVVVSTRUUUTURRSQRRRSTQPPNRRRTTTUURSTQPN52F?+8E9!09"@ˆF0.6:4-.6IIHRSUUVUUTUTRSSSRNPPQPQPQOQQRRTTTWUTSRRRRD2CD2:IA3&;D9Yy:?%,7>HH>:MUSUWYVXTUVTTTSSPNOQRTQKOONNPPUSTUVTYSTOQQOGP<9JF;$2CG9%ob1H2&26;QWVXWUVUWTVURQRRRRPRPRQPKLOPORRPSRTWUTURSSQQSRTOKLA2/?I85) &€a4L4599CQWVXXVVSVSWTQQRRSSPIFFGGFHKMNSQSUSSVVWTSTTTRRSSRSP?8BNF<>9tj= (26>GNMMGBITUWVUVTPPRVTNIECEHGGGGGMNNROTRWUUYVTWTTRPNQUVSQOROOQ<- mk@"%&278:<93?QTSSNLORTJCCCGGFFGGHFHLPQSUWVTTTRVWWTQRSVSQTTPE<972GoLR+4ASjbG.#)22;6039MTSKFIMRH<@EFGDHIJGFHKQOSTVUVTTTQVYYUUSVURRND1'&/,WGQŒˆŠ€|~†~?&1.5936QRH;;ELH=>BDFDHHHHJHJNQVWXYSVUUUXVWVRQSQPQMF?74<6* )AGyˆU@QKdcbkd" -;A>:MPK@8?KND9?CDCGEGIIINRTWVYSMO>89MTUWQRRSRLGFLOJA5'EƒrOBC@CpnP>?/>FGKPPM?627ED@GD24CEDHHMSY[][UO<1(7NTRPQRSPONOIFA:* bD2*Dd_Z><8.264>I?14??@>ED/@>?EIQWXXZ\WLJ@6!#@SRRTUSOOE;5373* %T81/6isE,'138E728400GRRUWZXTQN93-"),LVWSTROA2,-+40&  &J2!(93r‹‹mG)06??8659$6:=@A=DPHGJLSUJB;7)0,OWURTTN=@~™Œm3#3A@:0$='77==;4.2*/:857965:CKL=547CPVXTQRQREBNNP@/ /:DcNLq{tM7-981- 249?71'27;<701563HI5:OMMLKOUQSSQSSPG9FN9,)2  -@$qŒŽ’‘˜~?:# %$#,29:<44313635654CFA207IJMRTSRMSPQQPOF3BO?4<;:594-1::55FHOD5-8DDCJSRSQTQQSSPO;:JNNMH<@U@B/!OqpooŠnX1'56:97549B@:*<;>@AHLLL=;<3.:FCCLPNNOQQONQOND6889:B:  -P]MDT[ZMGD<27V„e309:LNIIOQNMOTLB==70( >`wlijipbWGAA\ˆ\ <*-=2558JJC;:643353778<:6.*10060475.346995/#3 %03<;3<<2/<93533,394EPNHBDDA@B:1077-/:39LB%~„e}Bk  DGdrY+1 "66t¾+  .) 9 &FKJK?:@8<7;<=<606*+#2>*#ovjBd,+[S^D9=8HgQ@99)w; *#'EIJLEA<9:AA9:3,:83)%-.|tjCtM AxqF-9C>9A<:7793 ):"(5 %&KJJKNLNHF??<<:<:;4,'' 6~†‚yCcT  ^}uE::<9:>V<==E961"'% +*385B=6/:J@O4\Q+) #*48>CDCLKKPIG??97;>=6:8$ 4{yjbrp^   Ps{GC=89777A1+/=TB>…v622*..798>D??95668>B>3-9a;Mj`47(',**67<:@A7:;@B;>95$ RRPYFVC997J =?/526,5:9>7764'(2cPQ8<@FG@DTaY]\ZG,0=>9318:4:948/RSFCAL::)/ 3' 96275=:78752;SaTWE87AM@~ŽX5AHBQZY'44603;:825 2UKC@A92Pb]>3?46=7MafZ-IOMX^[7#8.4995'04;XA9541024-2FNSTTN5)?@85//1)!!  EDEN848F8.6BA^>4,)63-.3354.5C@8;:82082.5DGMQO@5,8=892).& '+3$8OIlK3(.5.+18344051./97423/41=AIJIB-' 9;946./  ,543)//,47:/94ElT9)+21*.3-3.,-./26:=8),,3>ACE>+#8;650,,  7<5325;>;452*687eP:&%$)+.01531/.03100(**/38:>9+' 15.***" + "D@;.45398:7.1*032YE<*&$(-),.0/-.,-)2,(''--234*'  -6-&09 &0 *97;/*,*-5023--%*$-M?2'%()*$+-.,*)',**)')*---)% '5(&%&*#%72:90+--"+3331#&*L:-$' %($#)+%)'&(',*&&-(&,&  '5")' "*%32/,,/10,&&,/50%""0R8%"$"'$!$%%$&&'')((&*%''" )-"-*$ 0%)1+-/#%$,,(*'/.-'$(+=Q7 $# %"$($#'$"#%'&#&&"!  (((+!!) (..,.*'+),*'(-1,-+/>G6 %" $$$%$#% !##### ! &#)% " &$"((%+)*.+,).-+(&14A2%%$#"$%&$!$!" ",(  &+++'(+()&.48-"#"#$!&"!## "'! #"#()'*)!#'$'$&! (//#! ""# !  ! "$#'&$$! "%"/,*   ""!+-" !    %                                                        *5982 496.88/9<>?=::+1;9( 8BB< /- &(,=FJHDC@9';=+$;KF:%9,+))8EOOKMH5/<@1:LC%%??@FJCAE>/"/6:8)9A*39",7GNPQN??<-$=L@$(C?@EGIMJ?/ $5=>;5+6B)5A01AFB2)#$/8831+6G.2I==DOQOMP9&+1505ILE-0EKD?:=HOB,.7+%327 '%++:M84KLKPSNONPB3.+*$&:MMF02FMKJKKC@55@2;^ 299.!)$#-APNKRQQRSLLNPOB:03:GOPI64EMNPE/%%3CF;3 eG )(,,*6;<=NQSSSSRQOE@MORPG6.;LPQQPA;FMOK8.QQSPPSSRLJJ<6MPPQO;7JPQPPPPNMMKF/)97",?B2 Uƒ%,&1%1A?63);QQONGJRNB=8/7LQQPQRQSQQQQQSROJKB*5D<"2F3++uz%*)::2 3DKGBGPQF?AKOOLG@<=NQOQSRRTRQSRQOPPEI=* %#/7+*\%/;>83%';FPRSUSQIEOQQRRSQQNQRRRRSUQQQRQOOQPKK5-FC3AG24<+"46"O“;,&50!-0#6ISSUTSTSTSTRQRSSRSPRQRRQRQSRRPOPRRQO:=OFBK70A9$15.p&0##(4=<0;RSRTWTWSTUSSRTSSTRRQQRQPQRSROPPPQQUSRQNN<1@B-07/48"‰_+)'77,,:MFKSSQSUVWXTTRSTSURRRPQOPPOPQQPNNOSQRSSTROE2:K83:3%(8=1:€M95&7BF@EPUTWWVUVUVUUSSPTTUQPSOQPQPQOPQQPPQSSSRTSTSI1 VtK=<+16OWWWWWUUVTURNKHKPPSTSRSPQPRSROPONPQRRSQRSRQTRUSM<53/3AB3% ^uG 3849>BPUWXVWUTVUVPDECGOPPSQMMKKMPRQPPOQRRQSRSSRSTTTSSURE>?HI2063 [uG4G"+:BDBCLTVWVWWSUNGLRJKTTTM;@IHIMJMJFEFHHHJLNOQMLMSTUVTVWTSSOHJOQRPMJC@>8'3nO@1EUWYk^4+9?FA56ARUN86@GHMIJGBCDGJIGIJOOOLSVWUTTUVVUUPA9(5:6.69=PQ:125CJIFDABDDGJIGHLRQSTXWVVVTUVVVQJB>BIK6/11670 ;;€„K?ALLQWR>/03631DQE6-1?BDCBB@BEGGHIEJQSVVZYVVYWXUVURQQKJN?0+5;D9*?dPB/.7BEG<2 '7>A@KQN<.1>C???>@BDFIHDELQSXZZQRSONPSUURPQRPG628?DK;+ /US>2LmJ9<&2=AIQRN;*1;GFBCC:@AGFEDFQXYXZWLIA78>CMTSQQQQG?ENPNMF:0 #W:2[x_B6%18CHLM;02;C?1)2O|‹’|e6-=BBA>8649+1:9;:75662AG;FNRQORQOPNHLQRTD28BD:%4:!K‡ŽŒ‹eA;&&+!/4:A;43347853641@G>31=HCCDOOPPOJPRQRG35AG60);C6%r{…‹Z=<,*-*/425:AE;6,8477722HEJD809GA<=CFBINNPOQSP:/7>MG>,?OB/ &fm{…€„lE1 $568=>=7881-8@>;8CQURRQO>,338@9"BZ?ALCCVammq}?1#*7?:@AINNKD;89=@EFGNB1/.33,/27:?DF?;7DPPNMRPIB;6/) 0MƒzXYU[PJKR`x0@B%*861/8CI>93/13035;;73+48777)047:::46EB/9NQG631174  IxK%7TWY\[U?213>WlE3B)4=A6.4878;:78966560,61.32411043/&8@:-:?DNA.7@C.2€^\ + (7ERtD0)47547=@<8676)$;- 49:2/8<618862205()547KH44:>xiC^%  (ej€„†57-#+26597853) )8835==504;769;<2)(%&;HJGD:#?Šf>?[9 'ch€‹td/04#*100122(  '8;;86:>@D?==;98:40(4:9EC8  l‡jfA]D O{WIlN.'+/#!*H+  2,33+64(*+73r„‰yJR[ 2PfD@GD@;6O2+ )42Š{  "EID=::;;>=<52:67,'(+ $}‡†~YYv "HcShP14;>:7H;!#@,.zF '38BMMLKKGD@A@>:9:;65($,|‚ƒxT^n!  !.4u…mD9;79:9FDB8CBon$ ==F@FLLKOPNMKGGFFF?98/%-y~xlyf1 '@l~[>>=;84:96;6:G3hk&  )-=>A@;AHJKNCA?<89;:7:84+t|yuwxcB %3Zn}‚NB=:897899;61D; YS77),-*96;@A@=AKLLE?@@=521953, -rsskx|XM (9gqw{zE<::367624D6B^6&E=2+-,-*/779@<;=C;EIE?;:72+-.# 1nrro|Qa  +JspsxrI@9:99657;IFCj:5G9&+-))-49=:;>:- 4jqongULn7"' !+9CgvoI@979:=CB>MIOo]KC7&(+'*;=7=B8;9C>CEC;6:8 =E<>;3.1.$'07855688<864Dh^[>?Q<0G52:85HSX`hH+572.9::477OPAA:=GFA1,-&,6828;6;<5873541/:<(3C8N:NSWWY<23.#" #/79BI`kdotR*    6=;13858473$  #/C2-:37;555GJ734.3+4.,,&18CAKPC45883<:044683RbYWin^6 (76423;>:4/!;13496475D7595/.&)31'1422(ALF@:>AB8742484GZ_]dhc?& *03569>;84(  )4('.18411:.GO6-($+/"15556DHCC8DA96453122@YWOacgG- 9/0,(3U5/#+.0-/04357?NKGC>5665520.:RRRU]\F1#@01,,75<9,( +74(--/088+081,);5430000224?DF<689<<83.8EHPXQP>6&@4<1-7620( 69@3,-08=30/1.*)80424002108@A538760/3..&   )..0+/5?9:2000%%%%-1,13/6;6.557>777-211;0023,,&%#-10**43760.23301.00,88==<>=( '2',2?F>C>/671CLB'&02>!%5AA<::#(* .2D-.57;;;1 -+&$+;D.1GCIOONMMM?,+'#;KM@+,F> '3=5 !#$',=J5(CMPPNNNPNF81(1=NNH>+AH1&.4>EB-%  ($)/4EN:/EPSPNE?MPLD;609FMML@,=OIFJLD7176[ $6647@LPMHSQQOL65GQPOH:&4EMNNLD26LNML<(-;7.  7X 12)$ 5AHKOOPQRTPONK4+DPQNN<+7LOLGNK<@MAAG3.*2>3# aa + %7C;35.4KQMNOGKSK79<20FONOO@3@RQG=DLJNF4B<'6@789!„H 8 #4?LHD84HRD<:34JC//."4HNQOQPKPPOG?INQK31@5$>D0/@1&%G’/7'#/:IQPPOOPE0068C@<$480m~+)*% '8KQQSTRRG3;KGDHIQRG0=O:5B9)<@."@E(%#9DF:,ERA9ATVVUUTTRSSRVTTRRPPQPQQQQPRRRRRSNRP:=<,5E3$!180  ez8;!833?KMHQRI5=TUWUVSSUUVUTRRSPQPQQQPRQQSRTTRRTSOC;/2HA,""39A4yk)#>%"8CFHQQTWUNALVVXVUSNLQSUTSSPQPRRQTQTSSRTTTSTQRSO=;HQ=)+3?EI:%.†l!?'.48KVVWXUTSWWVOA=;8@GOPQOPJMNNOOQNMMPSUSSTRRQQTSPTTE87=FH@6/ˆP1$,;DEPTVYYWUVSVU?2635CEFEGGGEEDEEIH>==HGENRUTRRQTSTSSSLKKM=0*.& 1‚c%"O. 8>@>ALGKSXXVVVB0;=@DGHIEEC@GC;@9;;>MQQRRQSQTRHHMNQON=2::37uO%#6*$%#.8@?3;HTUVVC0:BDF>7:BGFIIGHDGEGG:25IPRQTURQTQE27>FNNOKGJ@5_OC0Qpyqmf:#8<7?DKILUE,8:CEC9@FGHFHFIIIGIB;5DPRRTUUTQRQ;--118FI7433)  BPb‡ƒbGHIKM-.6=BAF?9SJ0(35@F>ABDFEHGGHIIA?9=PUUWVWUTSUTF>;4)5A;3"25#4GqpIMELNTPK9 4:75-3MR?@BC?CDEFJJGEGPSXVYWX[YVTTNKM94=C6+,88+Bn[J9(%.:GA88%(-+5EPI80)6=@?=A=<=@DDEHLQRUWYWVXXYXYUSMNOC984.-19K<2  ,HE1%DGH@9@CEJKPURSSNRQKNSTSWSQQRRSMJNR?02235A/ 2oŒ‰‹jG16:BN=.2864;=HJEHMMJOPVYTOEA@:5=DHUVUSQQORTTQN;4/'" 57) (=…Œ–—<$,("8&-95AGGNQOPQPPOEAA<1-%&4=MQUTUK78IOQJ65,+ ! 7*-=?y„—ƒYt6,;=2L199?CJOPLH?87=?:9::9:HLPPTURQH728COB0#%*3& :,(E\uˆ•xIR:56! 02;;@CMF;99<<64349EDDMLNQQRMLO@48AJSJ9++7>'7!+2€y„O?4)&(35ABBC=076635346AJ717J=886=DLI98>LORR?1-?=$>?0Y‚‰X89!$,+&*0/4:BGKA/276-22IJD:41??244306GJ@CGPRNI92*9A0 9MD)Fvzz„n@/ 278<==?EJJL< 4325GG9333.)454502609HKEMMOQ@0* /;*  9NE;G9NOPOPTOGB<3( )>mjI;;CZu{}ƒ‡R1L-(3;5-,5HHBABAACEHLL?2/7>CFC8.*17;7/1>OPPLNP@EKK>*  *AFldRHWo_oyŠŒd22NJ#"+72-5=C;CCEFBBAEEC>716;658:4#187307BF76768883&(603+.,/7;2665101(3//;::4GG6&K‹ha9!* $1gNV~j%(+'4578510101 "0588037;59::31,)$'&5FK;4#€r_oG8. "7ctLUŽ’N%.*%+150&& .<91-7@A??A;3468.',!5;A@7 G‹lM7OT#W[C-#<4+. $" 39;@C9633428=<03.2.+-25j…†z,Bt  >AGcKDPW`;23!(&($ %&$3;8:89@>:555;693+*.t†‡†@Gv>   *WVLahOF:9=9:@3 D#  -<:7>LKGGDA=>==<6:57.'&y„„R9uY  =f>h]M<<75;:8;4. -/ 9@;:ALIJQPPLLJJIHA944,vƒ~…†LUk  +Sep€ƒW=<;96688>943C )+4=<<>;<;=:9689%q}x{vwRU)  AYlw~KA=:7:7759?=PP4($+(,9?=:2;7143:652 k|y{yxn_C 3V[lruvT@99:65837BBDmi82%,+!35A=48B;DID<:872/00," evvztww[j"+TL\WcmtuZ?:;9;8:55CQOpc45*,,&&(*5><76=8;AKC<=@A96862   %elmtlZG`C89;;7:,6PchK847978H8&"506?47<@<86>>@>) ,_g`ZH9<99<:9::40109GS;5478<5?Yai\V??2OYRVXNO8,3<:0<;353;7>*0^riV76;EB;;7950258;PQ5478251/=VCFA8>($/7;AQ^\\ggZ+(8:)<:74176  1T_X>:?CG@=83676534267316<89:85@IF87="(479:?VV^aU]fD-()?6>62 !)5'7PCJP2     +NPA8:=@D@750/70)4;:68574:;6=22DIB456-4450DGGC?:GR12* &'"#067>Y^nrtj7     C@877657654..3%.-22427<7<8466CE.85("9325$3G@>95:75>;406*'*++23211/7952;?9P4-*+4:%028==:78>D@;;89:83324T]Z[mkV6       /<65346940$#+/'!)-635.29De;0&4.'*3/2=CAEJE=I96;;971.1HVG]ajY;   @83111/17?:8.) $%*,-2.0//.71.))-00//4:HEEDI>>=?B<3-.>SRS[\Q;$=931116<<:2-.1! +#&-,1/375/12*/>83.//139BBGE>CCEMK8012FHTUNC9&4705,/8>:2.21#  A2+/.324;115;,*1;>B6133AE@0-   +7-0..143'( $-254/)534:3/+05''12-(,,-3810/.0,310196892) #7.++(%&'/('5;0605680:)73*-/##,2,(+1---/1--0+-/15585,' 9.((*60+6&$.90.135611501/$*.0*&(+---+)-,,--./353,( 5-&*+&"01-3111)(10111020'%+-++%'+-,*.,&*,,+)-/-.%"  1-(%(* 2)%"$--*./0/0/0/&%.*),%',''*+,+'()))+)+$"0-)'+$#+ $!$'),0-0302.#,2 (*-*')(#$$)'&"' #$$$(,)&% &! )*(""$-00.3,*!!(, '&'))&&$%"#$%&!! #!  "*++(   &-1-.+,+%"%( !##%'$#$%$$"#! %&(*#  $#')&$"))+' &  # "$%    $&#""!#!!%')***% ""%   !  ! !%'&"""# !                                                   .)*179, )79: :746.)39B9:?B?..  .46?7/63/1?E8 $:HIC*3%=6)77+5@EI80CCAEK<5*;JM@$0@/4683 '4:>*5HMG5:KNOOL903=LO@,,G>#!+ #.89IE0(CNDBMMNLMK86.7BNNF@(BC'(8+(8J7;CAAC=+  .7>?@FPD22IPPPJ50?OLQK;%4BNMNOF63LLJNPH7/*+ 1@GJLPML?FRQQQE0(@OOHL?+6GPHFNI95ML:CB456P=78:936LQNIPRUUVOCJB/*AOPFE=.5MN?2?8!.9)%7+ 2{'-4>DFB43DPF8DI8BQC.34*6HQRML<0=PQ?':AAMF00:(+@='38  _u(- 4BCDMG6>MG145',E=*1.(8KRRNQMHPRN=6DHOG0*&9F3'6+6:,T)!  0;OIFORRQQ<)2:1;;7AA6,?PPPPSOQPMC=PWR82JRSVTTSD@OQSQQQRSSQRTSNRSRQRSRRQQRSO?@OTN?==JLD8zo: ;'.47OUPTUSGDSVSMCC=5:8GMNNKNKHCIHHLCCNPRQSQRPSSTUTUSTMIMH9;7  }b3%#"9<3DQRPRQSRTRUPKHGNE24" }c?/*37JUVYVQQ<%389@42:1;=81264B7-5/2,58NSRUQSPQP;28951.7JQQRTWVQRSN36:<-"2C5)"&'  4O|rQRGDIE5MA)3>>/:QO8%-66>AB>C?==<<4%73AiWL4%-8@<9@! /BOO@7*28B>@DD><89;>;?@HQWVUSSWWTQTUFCP@1353-0>G7( %CA/ 3`ia[2=RRO?1"427<>FH<7;<:99APVVWUTWVZ[YVROPNPP<2-4AI?73))B.B|‚~y#!6HJOS?&&413;AHN@:::;@JRUVVVYWVTTWVYVQQRQUSLFNUI41/# -:*)sŽ‘€1073:N:+#132=CHMFA@AKTRWZXUTXXXSSUUUTUPRQKTTTQRNA>9'9-&, G—•—}")";G;-+*+:?GE@GOOPRROQFAC@7FLOUOSSTMRC09JNTQDFAB  = 4N ={”ŠCgB;(8<4E.?CAAFNRSOHD6858410A)#-2!(53=??IOOJ;36=:895=KOA572=HJRKB8*8<8(M„…e97+,,$ '/1;EHPN6)3118:LL;6(19539>50DQ?148FNPNL<8&6 /FF*?nz€P5=!$376768=GGKOK>2:B?DMRF6522(./798/2=LJ:38LQPH30(*  8EL6C25?pst‡ŽT:K&$34DA!$(55015FMIC@BHLNGDF<58;;17<>81%$-26@F<86::<.8+)8301*"(58<;69FNE;JB5&H€WH1SqgWFB7/A~yFHF-*!79AF:/0/2985'(32.3(+.30+0/*%-3,)';:=;1@K<% )†Ia7+,.6?89H†o?L‰X$16864<631(*% %53&2:;59<;7,,-+"*-)=D8" ifgp!  $,cˆ[;@ŽŽC!*&+>::1)$#(  2&'1=D==;::518!'-%&+:;6'ˆzZxnK 0w_WB8IVg85N2.(1 %.4@?=71,09554//9+/--/.#Mˆƒ{VX|9  I|]„6/GZ[Z51     $+(46598=<;77==377,**' aƒƒ€WLtV  (Y…o…>2GaX?<;2"    +$2(6FDB@?@@C?78856+(j„ˆv]1qs  /alqM=GC995:;;9% !  $ 17*1ELNLOPMMKMIFE;520&g|€ƒƒ@Gy&.5kv{‚g6?8;889;528(aL  9;3,9EMNGE@??:<8>879/d~‚€y]"HU%M[ir{m=;<=;979657<-qiA #  1A113>KII@@47.3:6;94)]x‚m[U ,eYZrwq}r9:@8:65898407yoU 8"&"#7 $6>.-B;;KHC;4:27..0" \v{{}gwQ6e[zrUVlrttl>9856548257/BvoI<'&'A8"-8?0/D:;=IJB>A>>;;=,Wsvxuomsl}pLK?`mpkx@;:667897:JNkss[W,'*367@!(&750@69>;GGA=:875;Xptzuo\zuXMB=B;?Ylj{Y:69;:7/8>;jiacJJ"#)58G==& 01<25:7B99;>?=<#[irqgLJU;44:><235F=^fB:9599??MlP>C?>1#(71DC^G96%"49?45?>9>6?<>Qfg\E9;7<==<62366/CEWWA>=885/7PHLK:7"$,99;T`Y`g`P +<*/:=460:3   J`jI7@?9?>A93692378@G6/43878739GF?=3 %04=Q\TLOIIY`+#0A9;-'Be_=9=93<>9959868:345=086<5@;4AI?*&6B;9;56==6;62-/>56118B_^etv`>      5NE8:>970;=D>93@?;KILJMMI;12TV[]\iD9        GL064<7102<=:-+02.( ',)20.2.712-7'*/3202BEE>EEHNUQS@<331?9@BB<47542>HLH>1+  A0,100:>2-40!(!#!B+,*/--046/030'0/30,8B9:2201E?1/00.9AED6-$81.00.:.)0'.)!&<)20(-)1;71/3&"321.,05;>56323-52/+1?@A1) 23-///-22+!?-1 6,2/*662?<9..-'0./11-30566.-/0/0/-:==/, ,=,**+*53 52(5!7821/&.'164=/&('52--3--7712./1*-/*2644)! '=0(()0: ,5+1"<5<41(-25,955$+&.6.+0/..551,,-+0++.31%!"9/(('/- 80.1275,.<413020-54-!..0,--.&-63/()-+&,.0%$  "311-*% ( '&)9.//011/+%0/" ,**.,)(&',-/*%+%*)(*-0..'#.0 ('"&"-,-33#')% ,&+,0+*+(*)(*) "$$'),/1(   .+'&!$.,(##%!**'),)(($&%%!" $!#   %'*-&%  &*'),,+ ! #!(("$&$%% ! ! %%%&""$$%)-*(&# ###  """ #$$"$$"%#" !#)'''# %% $!! " "" "!#&%!(&                                                          )*( $"0;<,%;>@=% "41+/8898:G>45>GID07' )!6;@405DIIFKJ;4MLDENI>5&:GOLG?"@E( $35:A<'1F;/:IG<6EOH?9-;JOMJ?(9KJ:-4KLLG9%2AKLMLB48I;DHHD=4 2<;8DML7,;NJMMB/%=PLBD;)5FLFFKE76NNH=B=4#T />G>7@ND=KOPON=&,CO@699*1HM:;DA1APK3161"4_ )697,5BK86MPMRTG8B:%2GM?334&5MQ;(9;3JN@&))&;8!YO.(06DF57CJ4.>9.:O@%10%9KOLF;63DPP=24AMA/ "9D-!! )|02  5;01CCBJM?...(*A8372*9LNNPQJIQPN>/GJP@+$&"7I6"':;1 L~", !2EB74>PRQJ5-9OSI27HM:,(7LE3$5LQQRRPLHH>EPPK3=@75KL7 /D@C=1 0‹_$*/0/BJ34C@K=;FOLA>IQK>:@NQSPPPQOPPRSROGMKDKOG0!,@JEE>1T‘E '!8:.:87Q?,/0@QSPTTTTQTSTSPPRRRSRRSSSTTSUQTSSQQI. 1>MLH@6/.xv5!%8:DRVVUVTE6'(.5854?1/..,2+,43%+!.+"1HLQSSQRRP:0++//4DC6( b`M=$0+!,5578CHFMTUQE5,58;62504643304;34/.?9-=EQRSQPPJ:1")38:@F;5 R]V0‚}n2 14:9.6CKTH3+5>A5&/09;<7624A;50$7 (Sln‰ŠpQVShd$!',/,--4PM5#49C:/58;<84108>71 -AMGCDLRSPROH5&6:8&+760-+ 8R|WMOOA;9p0--%!9LN9$+5;>59<834471&:F4'.7/#8;.>kVG:'%.9BG^<#%6BIK<6("49=;4678<><:32237MQUUSTVSQTMG90?K3,,.14C;/ $D>5 ;o}xU;DIOM@212.67===9:82-/1=KUTTQSRSVTROOMNPRH;*1AJC6& ?2?y‚†h#GF:89:=@KPSRSVUWXTTYWVQPRSFBKQPQLFDD;!40%0$]Œ’–-"47C9*/$'4=IK?BCGKNQRRPSTUVWWSUUPPPTR=5;NOMIGHE4$9 +K"SŒVJ7.4 4:9"1%*7BIGBHNPSPMMHDE>>GQUTUSSRTRQH82=>HNPF>7 9& K0p‹‚H9)$%#!%0338CGGLRTLD924,+)5INQSRSRQQPNMJ<-0/6KMB;,!/5 +„†P:7%!!47:60093IIQOJ<) ,CM02g€‚oA<32531/06CHHKNOLG@??BFLMF9:7.&.>K=2:NP?4):LQOPC<;/DK6F=56rzƒŒw*QH$(04?DGGFFNKNKA;=?>?CJPPKIJE705@DHLLHJMD=?J@<:9.(9DLPRL:6M<7DC;$ IAnhf`Xp|„ŠlYK2HD,%.6:4*17HB3026;?BDCA;;>715CB=77$3=FLCBME=KN<6=< B`_g{s{…†Š~TxVC/A3.(39126CE4,-.248:989965/8:665/(+:;;>56EQHJ@GA7&  ,zU`3pŒ‘ˆ{kf[^€V@:5%&&&%04;EB620.*33&"01%,4561,/**,0-13"5=BBC67I=940+(%*,&$+#76$pzlT{r( 1c‹{]95Ay13-+,'"  5:><;9*#&+.-3783-'*.1$ .‚ofeS!Dy„[<7KbhA7&   .1'()04887:<=;44..%+* D{{€xgwn4c}zzd:?B>@?<8;;6..(" V†…yyjqy%Inƒ}|vDADF767796) #>   &5?E@CNPOONKIIC<65*+[~}ƒz€wA)#2_n~ƒ‚†P@9898;7899860BdR +%5;AGNDDB@C:;;><7=. U|}}|pnf"^kprvzƒ]<79;::6687=87Hpu) '/1==AIG;=<799;8=88.  Oz~„…€n\cRCmwjw{~ys^;43837743799:Rws&'*!"+2)19>=BICC:;7671-.,Iz{y~ltk4hsxtpxyn8647654689617mul+604-91$4+4=99?EGE@>>?<:76 CpuwxrquV0mZcbjximln2854588477?>QqhnSA**9@66((2';36A:C=E@:::55+  @rqyvrkvxagSP;Ukdmfi.64568479B4TWELD>/(6;9?:6"4276A5=>?EOBC9:VSHE>8>RZGLGB9,*/64;OZacc[;+'!7:=669:)   -\lcNEKFA<>:78<:<>C@<97232463/AIIJ@2(%-56EYRSPEIRU+992,!% ?K>IMA5  'UhYI@DUE;9959:873292:=316<636CGJGI0'#/7BO@437457;5)!/57:R`]grhB& KVI>@NOBB><:66;:=9?530/299;=5B@HG19##C<;@76769774433345756;2>R`_gmhN1  GV?::EXOA8867282215'+/564462@CxL98+.0/?<769758:=;?DQSNPE5>DF[`hfP7     @XG98CJ>77541-1/131+,2/1420A9348&#"*(//,,0975?>:KUNVYYB498SY]\[N9    7TE:8CD<542100125&*()+386.>8,77 %001355CH::EFDVZG;=<884INSWS@8   ME:7;L173396021:)&*,14308;5;A'*76:>EGMM@054=QF738;81;GRVJ71   @G624;019=60/.$11$'(+,12-18;975$&1/9@KNHP>.8:0==135;34BJLH4.  2E510427=21.%)9/5#)&"+,-2./8;7-1!':009DFHK931302213676;.#>)&-*-,-899/+,"%:-1.9EG?6/22/171301=@;4-&  992/-2**0$ 85/#6-.10,+8::=-,)!"/*002:AC<91201002.2=;6*$2:1-..;>5*100"*-2=**-6@222+#)!"2.4315;:7630000,,,375(!  ->442/2=$3,.%9;?@/!+818*,0*-$,6520..66454-/-(+0/1'$  '536003))"%+&1670-2-/2* *31)!0/33-,.-0116.*)(*/+*$ %25650( (*  ,057@-$-*).0$#)+00-,,-0+*.,)$#+''!,224+"  !'"$" (,+-)"#*&*.//,-*+*(&&!%$#  (-00+%  !#'%#%,%"%(. !')*&#&*%!%"##% ""&))(+  !"&$"&"#"$)%%$$#"$# #" &'$(''!'('%%%(()()$! ##"#$$$#!  !#$# "! !  &*+)'$ #&  !  "$$! #!"#!#                                             ,& 0495 $::;:::==78;=>>,6/  +42!3=HE==GIF8);DGEC;AA#+5&7<2'7IJ?62DLF8.>NNNG? AF*'(-)58*8B//AJ;3(9NKF82AMLKI?$=G*9B?:&3;6A6):B/7L@2!6HJ>;8"3DLAAD@);L@HD=9/ 73.9FJ1+@G9JK71>O=-243CK7;B>%APOB-&( +9@2$5NA8KOMLH45HK2)0*.@L5'6/+HOI6%2 SI)57.-=>&6KKINR=0937KI264.0:KJ6"+?ND:"#$-8<+ %m12:BKNM<"?CHI5&326@G8%% Le% (1,5ANF7L=-('*,=25=3(:KOPPOOOMMK>(HNN<%/799DMB2!6:1uY1==3/;MHO?16?=--&5J;$0=MPQPPJ@=>4+KH?.0;DK=%$9M<(1DOQQNB863-?LB8(7LLGOPH7/@E267% _Š,$+5J>+9;6J@84BNB>JN@2-1>PQONGIJJMOPQLAEOOOPOI9&9J;&6FOP9/=:798DTTSTSSSSQMOQRRSTUTSSURPSSSRRSPONEJPD5AJB;5oqV'5CF6.3=P7,@J@EQSVQDDRUURROPPRRSTUSRRQRSSQROSQQQQSSO>?LMC=8 "…d>=!*8FE>98.569IG:KQRROPQPKKKKKED=7 Rnh!X99>GAJQSSSSTQ8-,2/.4.6D5&'055$*+*2/" %2;G7@RSQQRR;3243017>9Igr84**%256DFQTSRTQB;5*44248100.-*!23)*%96$1<4>RSPQPQE9,%,03@9+ ?cPYŠˆ†j),7@:0Zqks‡„uik|Y&48C<>D6*59762/04764521 %8MPRRRTTSRL73624>H<4#3:D8!!FF>()Dw…x)'13031?N?53510/2536641$$(2BOPQPRPQUVI6;CKNRQJ6.:JE9(>5#'Kƒ{$$/8?COA50311042245/"(5?KORPPPSPTTTMDFOQSPMNA7ENG;/ ?22yŒƒe*69CL;++0*0752/0.28FLQPRSSRUTRTSTRORRF89IRKC978.&9&+u‡x{.($;(9@;$)"7#,27257=EKNQRQPRTSVXSUUSQRRR@17FM<8998+ -/6$orQ]:,1+,5- &&0/6:=AJOPQQQQSRQRSUVUUVSQRPNF7-AKKOGA:) /67$rrEO1-#&/12024@ dkBTA?*/2/105@HJLKLNSQMHCCHKRSOJB9=CK?60CPB6=93K8'Gzƒ…T8Q7$&382238@KKKMOPG8221014;IMOD98AI=31?OC62)9JRLPF?4JJMPH4Mu…„53FD&)58ADELLJNNMH:.)/-0349>?CLLB>DH>6,>NLC=55DOEJJ>5 7FIFHSh‚~‡‡bQ"7C/)+6>EI@75?NB3*(.106<<@?=63>KKGE9.,>LEGOC39L77DA5 :G\hteoy{†…|T[382G%%56B;2,-=I3-''-259:;;;73/9HDB;5+5IKFFLH85FH76<.  'hRmksŒ‰‰Œƒ_kK4>.0:$.285-.4AC31-(*1578:7435:B?893/6@ADC6:=4@4 Ow„16>?K,6qqD9=4A9))&149;;9841 "+;012.+132+((*&-10.652:!t†m€†"QR+^†uC9;8Li?  -166411& $96:><5)#+691-+&$,$)& L}‰_nŒB)4@)K{xJB894;kb<!1/*-"*'  )9?<6/"06<<4164+'*-& f†Yz‚i)C;%i††nO<@;HJS==&)   *4("-0;=;;256:8/+,2    $x„{UVqƒHW0H}ƒ‚|V?=;6;9635-+%   5}ƒ{ton‰,[T^}~‚dE?:78:4588/ .-'  !<9?85.FLLMOG@:4738+ =tw{ƒy|S*#5arzuuqP;=8339;89=623633QC   *=AB@8K;?B@DA=C@99:+ :t}„z{q_=?hXnprusW988686;9747788=Hk[  6@68<;;=<37#2p}„ƒqnlu|zpwxvmxl=67514166748998UuM  /?::A:K;205450+04"  ,gz}ylr{qw|{rortyvxI175464346857>Onm0%97/% .497?;AFB94660-%'bzvxwpsj[pykipngtuY*95-3554586:FeF]_.7JG3+%'&+-199;;>>A;;:;:7]uvyytst[I`narhfraO640355975;YTFLI4'IUA4,(. !2%28;5?7>;@A=9/Uqtpfemqg0D=Fdd]eSE65896;:CE;\GLND%5WT967D7!!&. 4.7@8<4>9;1  Nmnlo\^tmA5T@M]>GZ^HFHF>%PUB42;[TUUD( '*2:<82;8Ehig\LMjdM68BMOKPEF$..:CD=:=7FGECEACUF=4?\^ZSLLUP% !.1$ 5KND, 8_c_RDImXSCGIGLIG>B((&25103CH<;@VN>10/.041+"!+7?8I]ZbpnR3   )S^P>@Jc\Z[Q@AF?@=:$/43956=DicAA?:HCEH8:9:748779968:F9B76MQYkflZ;H^M8G[RTQ673123/.468>E@@?NB4/;RVb^dU<%F^WEW_\VE:=722287%0233479=68D;984**,32.289;<>MS?=?:7;>JLP_]O>'?XVJEEWOB122144/%-(+0123.4;./?>992+3;KFNMC71/:NWD39785CPTTVB6#   4PT@AOOG725/05-'B-,*,-7811?44?5.2/+07?6EPA6:77?957964>JNOL93  "EQIEGKD:5045*@:3*-*.02232?018//01.2:>AFK:04453335769HMI@5,;NIC?A:1212,2C7-2)-/+2.,6:(030/..08=AEEJ9/322122437BDH83%  .HF@=782-7="?C3&0'),(-/7@+#01,,*043,5@BE@400001313:-2:A"!7.-3)*,+.-7+"#0-')*02./2<<>=;400/0,.4==?9>=-%%-+ 5,-/-/78%%0-*+(31,.+5<::87//-.+-685+! 2:8;<5:3$  0+'?72-3:6-*./.,'-3/4753,13733-*(142,& ,869751,'+$$8;:2412/%3-%)/)*0-1/-24/,+1/'%)/-(# &25743.% )+.3)&$!#',,*++$*++.2-11-+//($&(*#",343.&  #++' &1/())%,+&%$ !#**,*++,-*'%&(# '00/.+!!)+('!$!!'))$#()&! %$$(&(&&*&#!$#! (**),*(#"%&#$#"#" !"! !"!#'$"!#%%%%&#"" "   $($%$&&(&&%&''((*(&"!! ""!!$%"! ! #%##$"!"#&(+*'#!! $"! !##  !                                        3;;247950).+02+  8;?93/;A=6&9;>>=,(AD&  66!2AG:4%.=GB72@KIJA9&EF(4*"16*;:)7JA3%,;JD=76BMFC?>DG,:@8#  /:.96,?<*?K8"#7J?31.4@N88@:CLGH<&! ,./7AG1%A;3FF+8FI4""'9L9#3%(JOI?&  790-M7>OD>2*/6:; r&10/?;#:KHIPN606&6LD.9@;?DMH27@JL7)2<>BHD6Eh %69626>*1:*&7H1(,@PN*',)*7.6=0%;LNQNNNKHHE7"IJB7'8777'1L8/1@PMILQF18F:$ jv( ,:C9&7LNR;*48J>(-=L:3EPOPE0+0,/FG56)4JPPGMOB)*@H7-+$†U+" 8BE4+:57JB:/>NAENN>1($7NPQF,93P…H 05MA.&0,=G=3ETUSRSQG8/7PPPONPPQPQRRSUSRQPAFQF7BJ4.;81 }p@'77 8DOM25B8/15>STTSSTQRB9ERRQRPPSRPTRPROUPQRC;HPOO=,8G@6!6‹m*$-;;1/34K2/BB6ALRSQJMSTSPLHQQSQRRQQSPMPQRMJIOQM:@RRE04BD87)_nu40,<@7M;&7QTSUTP@57NPOONPQOLDKKINI:1ANL:4>IPQHHRSG8?M@32& q]W E2!;JGFIRTH34OQJCEJ;28>BNOFFKK?/;6:F=5(8EM:.ANPPNPQSOLNQLF@6# (~`=NX4>KIACSTGBQJ0,4:3'645J?218>9-2(6:*#58C@-7MQNONQ>01;?9763/8u…$$C0'"18=@8MSKORJ62+/%/2(6@6"%231 ))*",1%4:+4NQPROQF84.3*&093,k{ /‰Œ‰i%/67MRPSSQJB8)56"451&%*&!%53#.>?,-("&>RQPRQQF@6&-995 W^lR…ƒŒŒŒŽY3vjW@B=B\qi5!7@GE>.,CD3,47262&+231-+/8DMMPRRSVQRJ8.,644AN@3-::0 !SNE;$2^pw3)::;>3!/I<03443()61/./,(3CQQQROQQWT>0-4?NNQOE42A;0:930n€'(65.65FJ5*42-'11340&*3@KNSRRQQOURS<29?NRN@AK9:F9394I‡ˆ^&-8@J?5.!:&.(#-9FMPRTSPQRUUPQGBGMTK51=PJ@;0- =29€t|,,%9(9<9#+(%'14;FPPOQRQSPORQSSQRRRQSF/.@A2551) <(4vHrCP-+#()%('"/.*05;GNSRPQTTUTRQTTVTRQOOSMJ=0=F@I?EGKRRROMIMNROQSPOUTPIKPMOUJ<6% /.8M=, >D07bKr30?+&"334;@ILIMLNKOROVRPJNMUWSQPOOR@56?NMD>B9/983DE7$?L>?:,8h‚p",,3$)2:=BGHMKMLNQQNA=;;764:BNPQNNG935WIUl|~ˆ…lC9?>&!-7;;CKA<=LKC910.,,0147005JC?<926:HA18@:6BD48@7'TWsyi€ƒ„ŠWK5<=8&%#159F;3*4GJ;61,/+//483*38H?:97.6AA54;ID47ID98/ iIkk{‰‰jgB:;8<01-3;<3%06ID<650)")'05;69DJ?;:,2:G@AGFGJ>39IL>( b|g>\——‚]dc=<=69<#.55039CHIKA84" 99?=<<8($16774;97><:1=;;.†xlL#'2AE1ƒ]C?=:;97 $-7;=:=?;50 ,4654))-*"$+,0.+30*+4',c†vsˆ%+&8‚GywJE>:><>:N )3375556.!  $%588/%/9=9.&/++,0.(~Š‚ƒ’J2KlW:~:;<<8<@?6:665<9;8?5/77,&V+:6A99D:BEEIBCD=;;4e~€}o|qrgmW[vylN8;9994<8775634+04?Oi 3::A1F<-6?A:68>62) d|~„zvnq~ztuwvKB>7695.8108975663Rm]   67C0571-22.78688;FOp<(9HA *12@7:CD@=3,% " Puz{zphmqxqzxpkm2E/,56/410955<@<_OL^,'dKL7 #&%)=8<1A8AD>=?:9.Aqwzywgplr|eqgnm5K4#218?1//32:JNOMH>(YcUKL(!23/>+:A89??::7   5psxsicunpa@gnk^9J@74@GEIIUDLXKIKK>@fYVAHT+.*"35>7?<:;6 1^qts_DnmcHAM^QWPD?()0F=K^ROPI=MLFFIPC?MTaUB.,!%#30692.5!VmogKEhiX57LYOOKDE ;QQI`_T@B5IDLMGPLIJXVYMBcgb.PQbXRAAH  1BF:GQHCC=4437:955:=>;EB25F\^`fkc@& 1]_Y`fbZVG9VSL@<171)47837D>?@EB>BAEDDB6656:48HH?598;86>T^de]<. $U[^T]XTMKNSI=53 +6&43:;83C2'=@968>6:@FJ6?8323OR:9;772?TXZ[O:. J\NJFXYUHBD>;9 @8'/*-/14B+!9?;?9///6GJMG=764AA89693=8B5 8,"0.+*-.645"#<992-1/3?>DC80.13335724EKK?3.AMKNIH9?9?B, -)/0-++)1<(%:44.43-7F?@A<0054304/1>EH=.+ :FHHGDA?;I@ )04.*((165$)821.-/3?>?;?:7113/314<=@90%   ,@@GD7+29;- 3,/1)%%.7.!/82,).2;799<==:3-.02258;:.!<;C>?53=9 .6,+.-./24('223,*2954/,3584255102663*$ 3<;<:<86*  18 (+-.290"!-205/442543,1464246*-12/'& ,9;;:733  022334,(//+%,1/01300333-0-(+-//'" '15987/."  '/1++,0,.$')%-&#!'-)--,)-,())*&/3640+%($!"$%40,+'&&&%&'*%()&$%(,&+.))'&(& &-2-,.+'&&%%",,$&&(&*'&&*#())*$%%&$($&('"%"!$%+-**,**))((%###%*)''%!"# ##&" %$#$%$$" ! "((((&%#'&""%&*)-,,)'! ! %& "" !  &&&&"#" "*-&# !"" !&"                                   "#! 165/ 59:7#<@>?96B= #6<>4'"6AIA51@HIB='3IF4 '(72'L:+"'6J;(-"FQKG7 (9:>1,D62F?)9JE/036/3K>9LG<9! 245# -9-3CJ83IGDG:':P@,49<<=CM:*,/:LMIMQLB>=<2*M@4+%<@LB1;I;($7. b_(!(:E;4G5$9E>/!;H73CORPOD5,*'@H0)#0DOL57IK95<7((‡E $572,,5BI6"6JPQM;!-738K>3=94LPH1;LM7%;H<#Pw1 $9F=/.7/;KC9,CNEJOM>5&&8NPL;*NG/)25LO98NO<22AF8' @ni#"=7>:6?MQD5.LWOMOE6+;LMOOOJKKC3EEG;;50;JH9+;@NI?IQPOKDIJA8(qgj-d%,;A>4;RK96QJ56;@3099AKH3.5%$0AQRQRSSQE;1 $).XLn"Z‰‰Œ‘;*5FQQQRUNM>//5'//'&0/&*."&?D5@E7+APQQPM:AH@8115+  1U‰t‹€i\d…‚D 5?JPVSHLSI4.45)),',-&,/++AF>HItq{SCJE[yk.:GMPJD=GK8"55310$-32(*:LMQPRTSRPQRD<,+66;MK;076"M^TG:2;[ufC3:AADE?8H?.044-%-/&(*7MNIHLOPQRRH;5,5AMI@I:2<8  8D@4+Rjj/,5=:2',$ -AUn8'2& %$48DLGGMOMLJMQRPMPQPORRQQQQPOC77HQRNPLF;/6/8F=. 0ASP_[e€€c4>A4&3=LMPMKPPTQPOLFEEFLQQSL?34.=OSM9983/@HFC1 =LN`Vdy‰ŽM9<@@+"37>;78KNNMNNRLEB=9/.3:9@MM:415*;IQE1/3&3FBE@3 G[]k{†Œ:;?:8;(4531?HDINMOJ@::6%"2510;I?3157(7HK>2+781F9397_Nusx„ŠX^:;866,&-15FJ@5+.(2=?48:BDC61;F>4  B†^[1c|qICZ>::876:( '083128KH@IA50 6;ACA=+&!/76/38<;7:)0:7*{Yq4#2qK7<;:754F! )%58?CCA:42 038;6()*%&-+)+-.0.)*1( K†…ƒ4E8_Vdm:99==864BW% 3676896& '3"!,,$.8:7/-2),),.* q†|’P(9e.€z8859:9:7FKC#6(,0%> %)+ 393*,3:75*%)-)|ˆŒt‹o"T\+‚E864;:89EDU/B>7"   !!1740,3<>=7;2*&%Dzƒ†xyt(qGCŽ…P26+;9998GHV3&1(*27F#  $ "1>CA?@@=61-0%+ Nƒ„uSk6\7Il:5$88;65GPF<;& -#7/7  %&<4>/$77878557834( Pz€„xuel -y}sC5118<3<=4877;B:8'2.<  .=;0A=5@DCGFC=;@9P|x|ryzpr$VuuF*.+37?4?655653538!'_-   2;;('%.7>:6+  Ds€z|u|q~\E_yj" 219G87556:75;=DYQ6o=%.681===860)#($'6l{zztrkzzpZ\X], 15:MB723666?>;=BE',zVNO+#+63:4>8=>78:4/*by}~zi_{tok]JO6 *6@H;<8:1;G7)?JE>eaYRX>&5 (65=7;::98 QrvynkRscif]FF8 "4C94NRUn]42JIICHCJDHH. )/;:;;664.FrwxlJIomdH]A73' *T1*8JB8;3=GBBHL@U[SN?&%!(,# VR5JFBGHGJILNZY\^I=1  %""&0=;30314:B6.@Y[bqpiC, Oig^U_^YSKQR:55 +;@IYNKHD8@@CGDC>EB:J[RIHE>;A@M:7769@W__ghdI1 Dc_^Y^[KQ3IZ876AJ6/9382=82(5BD?GCB86?CB?A:37QDG8897?LYbbbZA3  9]VHHRUSP54L631 E:%&$L8;;2$0!->A@C?;-29NKL>977GH>9:::EJWZZM=2  /RRLRTUZWN3O36. !?%-0<5767+%3;>><<2056ELF9:58;78896DSRRRA5( DQVUSSUQJ-G34& "&49.52/,(*78><:0-02AEJ30167684;8DRSQJ93=NRUPRNPPDD41' -"#-2242)(+7;>;42006CFI5/4256766@JLND2-.KKKMKIKNKH10$ ") !/10.'(0::<832/1<@BC@12342:5;EHH;.' EKJIJD/5CC2, "3$ ,00*#'49865,,/934<@E<230654A?A7-#:FFFH?3DJ:,& )1!#+,&$'&-2440,,886/:C;4<544/8?;5-# +A?@@97?E8) .- ##-,/022/06;:-(295+083.5873+$ $;;>>=?;<3%  %-0,730275024/-134:52)/5/.(%489:950,)&  )--.-110113//2182322.((01-#"+37975,05)# '+,+*((-/.,./.')(//,++'(+,,& //0121().*&$!"!""0/-/-+%),0())'(%'&+)#'+'&%*('! (-//20++%#$#* $%*-,&$$/1"#" %!%'%')&""$&$"&*+-,+-**+-'#%&,,13.-)%"%#!!##  "$#$%" #()&&$''$'%%')-.-($$#! %"""" "! "!  &"!$  !"#                                 )*32$!$256#" %21#17>=;)'=CC<(0CEA2 !'7;.+8GE8.#:KC01CNK?9% 07+->;&6EG6"!/2,0F@ -*;ILKME0 $9D8,#  ,3,9DBDMI4/#!8IJ9'9LNFIKD8%HHA>('33F@+-2&#M 9<1*,'099'$%'9LJ;0=MG>==>,+K>0*8@CE.+63" Qh %*3F9 1/'+!=<$3EKC@LN@401,!7L1#!9LN7 6>9(uF3;5,B3"8C:(+A>+(9LPQOH;! $#6KE)7:2APL4(9G<)48@y- " /-;IB3 0:LQPF1!;B@GO@1@GBPOL2(9H=*<=2 gd'69(/64>K>-/FNIOPO=4);NNK8#90*,7909NRQQRMB5)';PMLC:C(8>%&.0FQQRQPO@4*4EONMOMNQRQRSSTOG:6OJ:'6LNB4)6-#z~- &2&,E-*B<>DKQLEJNORL:.2HNOOQQQSRPLPUNHG;3LP<+>J71$4;5  H‚g% #.I=21*)4;F93@IP>?RSN>;CFD<1 YkRY,+-5FK5-BU=$/:8(586BMJBFII;.4;8+ !%7;*?PQKLSRC4139;8-Wns!/MS38IN6+B@9&+1.&81$1ETTSRUTC551%,*HRul•”–f2?NF<:PPD?9/ 497./8<:6!8A59F?+9GQOQRRJAHJA7%04($VŠkOZCHu•p*9C<:CNJPRG8"-,,*-464--@F9@MB9IQKIORPD7464/4C?6 ;jzaYLJHXw239JPG4031:BAQSG>835?M:-;=58)??9,&(4H];$(!+.$:>1$+!(148BKELQB.5D95?KQM645=JK@.5BG@8! >:-!'=bM(3360"2##-+%**.8CEJMA04>G<5DOLOQSP>4:ENN7'8;34. ;6*!";WS..$*.%!"*1/0-".37?HGCHH7452563FQSSRRSRONQPRF5633<6 6=,')BJ<2<1'! 337??;3/5CHMNFLNIAGHA:B;1-:>>(  (1410.7FI0:@95%"26@GAGGDDHA?CLMOPPMOSVOOSSTTSTTUVRB95243&0:?,  5A7AELfO%7<<=2 48=:5;A=B>9>BKOOQRTQSUSTTRRRJEGPQOHFB?8+(*69:61:RM=550+?=?3 GPgy…‘l:<:8967++,/270) I[nkˆ†yA5=<88984!4:GD>=LL?BKG7/)91>:988799!&3?B82/@G27G?5",7?EG7538:8.;A525897))77) s],!!!5D>?/::567@ 1581/4B<2Q'5(688;50   (21*&#+-+,--*)()+ Lˆ†ƒr&H)>‚G89%(697EHI9;2+1%  !0/)'0363--)%%g‡ŠrmGFƒS;8!469=HY ;H?>%!  4/4;:=><:95+)pˆˆq}:'D‡i:85678E?I'!% B6?+  *6==:::70(,*( (s†‡md88!.tzA288766@JL5# /*4/; *.;1+134247966+ .l€ƒ\l,P{V5 26961F@65869:4&?96  43?;:0ACADB;==<#.p~‚~zrkR %>+>6 !736?>4.<;=?=92.&g}€~|uvzD8BT3 1?96??55487:< #AFDCMWhnb#  2*26792;7.% 5itwwnFUqhS!686'%0UR;8QwSCEGIJKKEO^<!/920%&XsuuY;QpZ[(4664#0H981;XD?FEHMKHKLDC5! GlonJ;ZkU1.4275'3#.6++=W:R\@DFHEKKKH:K^W4;gnf[Q^\]J>2322'"6'HYQbdJ'8>DKKH>:AX^_^TD<4PF>;35@YichneJ* .[he_M_Z^[M/032-.+5XO^XG'(.(8>:KB@DBC@426SH6578F@>;9?KTV\gaWC3 B[]ZWZ[YZV5243-"$/*:8-! -31?=@D?C6/3=JFA878;8:;>IUXW[ZJ>-  8S[\\ZXZZO3141,$02*  .7:;>BB??2/0FB13658:68*0/+-%#:)4<7;959:5/=AAE@421484:DGC9. "BKJLKD=D'/0++ &2*&953367845;22:<@@97935?B<6+?@>=<9&)'" (.0213361/23262341))-13/' 38;=<81/0('$  $++,,112-)&&*01-//(%'+/-& )458840-)('&&"!&/.--,-23)#$"&'+-))#%++(% +023451+)&#"&&%$',,*))'&,-(($!%(''&$%*&!  +01//12+$$+.-020-*(*++$ & #"$$#&$%%! %),,,*)'))')'+'+.0-(&&#"%!$' $#"#$%$#!%('&'&(&$&#$$(,*$""! !$$%&!#%$"$%&#!    #&$                              3974'1::%@>9;1 *-59;84$0@@#0DFDD> 1*70/8D=6#2<<>6D@"9GOQA6# 46(2<.8FG6&4;DHHDL;AMQF5#07&79-8G;?:'*=LD3!:JMHLNE9FL@<#%:9?>35@DGHD;*4BH@4.>NC8<@B.2O?-&8@EG9"- 8*"+,081%'%.AI<35FO@)-728K3$9KL<$,/lV-85!4/$>;!6J@7?NF8!(>F(5::QM: '67*3€3  ()B5#9A8&6G80?NKPK:+89>HPH+8DFMSP<"*:?04  ah(%9;?M:"':K>7DN;/ 2?KPL;'+CJMPMF/A7 7LPMRQI9,/COPK@)+'(9;$+$.FQQLJSB3"6MOG?A?EOPQTRUTJ722KS@-3FJA7  9Ži! &!+C+,CBCAERG;8?NOA5+7MNGCHINPRPPPTPMH6,IM8+S<6FF3+5GKC7;KMKOJ?GF438/(6;E;8A@M87MN;DNC587$}l\ ,dS'&*;N>(0FT9$4@8-:>CLBAIMLL;/=B5 &#+95-FRSD:LL6:8:A:7+v„2140/)#;G@.*@R?&)2.$538HLJHPJD5-34%')46/*7KSTQTQQ;121,2%"^g"`X'6@D;%4OJ<:5( &4ADAFLLG6& 2@<0BE6.@NLA@GSTLIHD9%*6( VvQ4HO‹h$#9942AOEEMB92689=DG@0+;K=6HJ8>PO95>?EQ?25530=:64\ƒFMIQMJ)( ,3*BH>.!$..+ #%$(3FMOKEAEN<4GTNEF@5%2$+09CIOO>110/<<3IQOC5025G@.3?4+ >bJPQLJZ9""#%0(8!#),2304;ONAGAEW937&#,(2&-#.23=GE=@GA>. ",-2420025AHL>12494+4384/CSRRSURQLJEDHN:/'$0( 3?;=?OW.>4;?# 35>ACBA;GKIO>0=733BPSTRSSUWVUOJHNF5'43 )9AHJR9454589/6??666?MB538@/763)86583-007BNNQRQRRRRUTURRRRSUC77764%!39)  3KtboR$287;>@%+73288-+06GKKOONRTTSRRTUTURRPNJQSNKHD8$1=;2  SIipkJ3:><9874!%#17=C?>DKORQPPI@7;KQOPNPSNLL<7?OQMC>5'<<4 3NipŠl5!@=@:997<6;GKMPONF?KM>5/29HONHINTLIF85?LQG7:3!7/  ,p^ecc78A<5>6577; %3>EDEKQK83EE1#08CHPMJHFMKI>08DKGA94++1! xki);9<9,396@'29CG<:@C34FA3/%.28EG9?0:D;5  )8A438>8<36:8:4-'+--1‰†iv^3N:?< 56ABM.$/)3:D>-791"5<<*./030)..-**+.+$ `ˆ‹ˆ„X'TV;;3 859BI!!::47;<&$ 65#)0..0+---+((&,t…„Šz%* @p9:- :749;P>OE$(/' .#$!+..+.,)+)*=Šz„7C+;z>=(02797Z/?N[;,+19<>>;<;;5**O„ЇyˆAI&xM< /2159GN'/) 1?4;)  '+2+752.+.--, W†ˆŠ~NJ-1Nj: *87:@TD-"&'3239   ,*''+008:42.Pƒ‚†…od6:\C&086=2MG:46:%5A:6 +(<29,;?=B?=>=.N{{„‚{jV.>;M7C9826<26,*06.7C6<4  1+>4>20:97540//Fy|~€{~46<:+ /?<8=C85015=%&.)Q< (+89;8)(3;9=:7 ?rw‚|cc/996!! "0;EFKA7AddY0537404;9/!!A@) FJNKJVG7>A@, +VrqhPMeK()373114<<(%-(3@E&?I3BGKNIGF45DGRB?MG9143!"1AA?CLG0Hllm_KdbH-%/31-/632-#.>7$';'+BBKKFB967C``VE;PXO>85:EXfahpiE2  :cgiaa^ca>"/3//-07/.,-(6<3:@@EFG@626?S8;;6E@=:5;MZ_]jh[E6+Tgdd^_WdL!630///83/#$"A<=@?@B>E@4.7QP=7;:7:98=M\^Zd`M:0J`^\`a__R%720002523*C>F=27:>47::688=:HV]^ZUA9$ ?XV]]^]]N$32.0-(40$19& /=;@A@@;D@<56D4347487<;@RUSTE71 1L]YWYXWL,2/,/*'1101! 2;:??>9@=A=08=613604=:9NSYM<0?TUTTVRD1-/0-,*&!'" /87;9>==7<68GHE3/22681FJIB5/3LOOROEC9)-.,,)&  /9;::<:<=<5B>DFFE>84/;CF33(%DNKOJH;=+.++(+*   0:6;9;589?@8:9@=?;1-7?A8-& ?GEFED74+/,)*-1   4545895686232:@<4-*0;;4-# 0@CD@A;-!-(**+,  )21/5546-#(*146:2,*,-73+"  &>>=?;76*+&*'*% #.+-0005)!)0/.)&*+2.( 49;:984/)(''')&!$+,/0-.5, %%+)((*',.*# (287757,%)("'%)"'"*-1-/,-20$")#!'%''(''-(" *012442&%$"$'%*//324($0.(%''!"%##'($%*(! (/0001.+&$')+.,-0310,)(&%'&'+$%###''$%&  "(--*++*)**)'%(+/.,+%&#$''('%%#$''($&"  !"!#& "%#%#"%&&&,&$"        "!#!                      %,-'" 29:4#&"%?;>@;<7&  .2798'%9:==<@=%CKJE=& 28(/5-;?<5"8BLKGHC:$ENK=+$,20(28:8;67EA:.0@MC==C>.)JG5+/;9>7%  )8<>:=8%:I=9,7GM>-4:5=N>#:JJ@1 &0//((!6I<-&PL6+! !y7-3/#1>4!:F82EM@2.5=7CH+#;DNQM>4.6)Ws!+:1(:C;11>H75EMKSJ4)?EJMNC,/ERNHLH5/=83 ‚V$6:?56IPBALK8( 3DQQN>)/HKG@A@+4OQ;1>J; '=A9,BŒ3( 0798'6DONORP>7%9ORQH?)?I3112*BQD08BQ?16E9-ey%& ".$(8LPJCNR9/-:OLFH>25M;B<6>NG4*>OQF56H85"2€] ' ,:'9<27&.FPQ<;O=--=PG7785BRPUURRQ?5)3NO=+3DE=6  Xƒ;( /;)5IFK<;NI?22NN;1.;MJ79=COQRRSRRMO@23KH5/?4!4LNINRPQOO99NH696(6L@-9JA::7# F€n3>#*9?9$)>TPJQ?*1:EPA2+34JMMSQF4>E25EJ;)(+:M87BNDCH<1+ ph`CW-);@6/DP:4E@(,D6. Zsy2MO8$&9=:6MP:#9B3/;FM>2/8LNQE?K:.-0.8,7MPT?47K5159=7# lmr'HZJ-2;<'6FM<$)40'6,-+7=28I>-7CPI=6IQNNTQ>1>H?20BSN8320,PQRURSSNIRTPHFK?1 $@tNH! #5<9:9<*%789624>E6.1963?F7@PLK:4IQQRSURPG56:99;>= 6fL0*5=528;8 "582)'&54+",112IOOPSOOMJTUSTTTTUT@1.510,% Z`_1 77:67:8:&"460%&-6A@GMPOORTQROUTKNTPQQPUSD8:85$ :Vfc,2A;27499824?>FRTQA69DNPQ?3@EKOKJ8+ a\gGC<7!4&4:71 #5<@CAEJN:2ANE2,46KM:45=GNNE73:89FEA7(iln ">93#1::9#56687FC=:' Z{dC?=;4 55:83067>ABKD72@B4!78:8BACDKH?9@07:@@A=92.#:‡yo8))H5=683=?D14964>?59B:5'35 634>E4%$0)7?=/790 8@8673/82'-+),+.*' 0…Œ‰ˆH'S6T;<1(3239<78:G<<(@559  1 '(%%-+),*)+t‡‡bc'O#;b? .K>86J6$3!=<80  ,,14<<<652! -q„ˆ†xa10?9K&5A93MWOE?2=#EG:6 $',23$7:?=9/-8GD6G,  &&34;*8=.)-++,$cv„ƒxqB*8967(/728794==O>7;'B80S<  &&*496%5<;;;7$Yx}€}€nK%<77660;58<689=9QHI0&/@@9  ($'+907$,.0$ Kx|}€cBQ(7189::5254/47+)" 8DD@)# &*7306:3 ;kvxzxJCk 8158952313=6  @BDJIAIA1D7$! ' .^wyzg:FsD%4453200.063  JLHDHKOFNOt`4# HqstMAQng3513-23/0?5QC7FGLPJNS/155/50-2,4@= +;B>BB9# :kqpoX]b;#3332-01/0 (K61JBJIKL=479I[^XIYeYE843AQXYdfdB*)Tjklgi_K,21/30/21)$OE:DGDDIHNE497CT?87HI:766FX_ifm`G2 Fgejafg]N-1/010113 FMZ\^_YK8' (Md`daa_V41/0,//-3 ?E?CA;BD@A@D=6A5339:77=?OZ_`[L81>W]^\[[U'4/1-/%'./ !#:C=BB:?@;A>D::;335774<:@UXWN?1% 6O[WY\XO*020.,,%0 $.;>9>;>FC76676861MQP@6- #ETTUUN<0///.,+) ,  .997971999?DBC7IC;8831GHM2.$ ;LMSQKA6-/-*/&)+!  *09799:-79:70:<@@D=910:HF8+ -GJNIG?4+/++.)"-$  +/176894-68+",:8@/#*=MF8##DN?)8C;81)30?J99BJ>BA9/!%,./,/;=,(?J=9EF7",AEEBID.)?QRJLJ@3*`g!2;;>=?HC08INMP?0D64=2  _w&&,"#0@MC:DRH7 "6FONLG=#EA(/-'2GRFRC3/?OPC2 7B9& Ct@.( 8==9!(DQB08O;(%4HM@0024HODNSSPQ9.,;PK6'5B?9* ru/.0!,%9=@G73IO>.2LK8!4EQE13?HPRQRSSRNK;*:OB-4A540#A…b*5$#/1';C?LMKK<3%1HL9$(:PI7>QPRQPBAP?5;8)>K=/8J?@<9"cƒM08&'0,(;MPLMR@-$5=M<0,38NK@KOE8GI42JF7&))@K57BM=:=:/  $aj>RL,&.&(>M?35G>!':HJ4"8ENQOMNM8/=@0/>H<-=9:F259I;1486brf0KS8$/")?J=1$;A.*:IG2%7@LQRQPD4$65!"487+?KMQC72>C6136 )qsJDLQ@"*$&@34,%93.BF7%9GOK<4=NOJLMG<5 Xd ")1:) 2;>>?;4!&5>03AF:6348 2_o!()/,"+,,1,#$(&"")-4@NQPJJHNRO:6DOD44=@4)7@5# ?kA:;,*:76/#&/)!-0/ ,69527DKMRK5155::=<1$(-45543:GMLKON;6FB,297184/GL@D:,=GH9!%9\Q?2(>B::;;?4!(-.3<9?HJ>764::33?@22>F857CRL9:7-&2>D8"'KaG&.@67;;;;0248<:DFJKH9'(..+$(47.#7LONORSTPOOH9,0<=1 =dK&'8.679:;9(38AFKJE78@913<7*6523*/>QRRMPRQ@=BKOB59>3  +VH!'9.)45/2C>4AHE>43GQROJGKQE847>DD?<* "R?,9/)637;9!)0/-(*3."'-,*1FOMRSPC:?QSSSQPKQTG8,/114-  M\-$6:4.'9>9-/3-'*2:ABCJMNQRRPONSPHEKTRPQSTE4,/1%  hZ)?=74894-6;@>@INIDNOPPMLOPRQF855@ONC;<>IIA@;5# P^ZC;<6 0799)/5;AB?GG90=MK<33APK=5235DRD517107GH<3!  Av_C5&<97 ,78;9(/0555675,;K;439GF8432338H@-.3..5=<7.  +€sp';:67 %45>>()08;<;83.=E7)9A@A=657;868B4*2359853r†ks."L8:7 )18==+89:B<1:@96))6;>?@E>76?9'/240..(AˆŠr9 ];9, &88@,"%4;;*891 /CHGE?13'+<::"   )*,&! &()"  FŠ„€l8295IaO)-388>JG@I?#-.D<=!  %'%!26:867, F……ea "8766+.5368998FID?@69ED9.   #%)##6;::;8( Bx…ƒ‚yu5!6.487355666586(GT %&'//3,0*(0ft}~€|C<(93037886533549>52=&KP@+ &*0(3)$Yty~}q>X.48004487223767+!&.&.HFK@  '# Hjpy{\=WB)94/1171-54686-#( IEHIIM;4 $$  8gqztGA_\#230-0212/54:4.!3T<6IKOH=#,48*,/. 'XnqqbPof+3341/113,/.:61,+EH1('',3:6+,9PN?8-CgpqmllT#25442-.43$&1682026DGBFGDIKC(&-459FN@;JB?69*--01+# /\jjmlfP>$72130/,1*$237@BHOKCHHECFKJ=:589@=888:78>KR`cggfTA' KegghcZV"73/.-./+*'/02>HNGBAFFDAFJNBHD>IL98;:7::DS]dfg[G6%9^`ae_\Q..211+)-+&,,212EKDBBDEBBFEEAGBJ>889=8;;?Uca_\J<.  (N^`bca\:#20./&).*((/538F?C@@D=AA@=BH>97699:;<9HZXNLA2"@WZ[\\]@"1/-.*)&*+&&-21>=>=A;?AC=1 ,FLLNJ=+(.+,*,++,--,),5345768?( !*-31,/13:<.!=GIJG71',,)+-**-01-)*223544;7%)&"*0/-./23:.1@CEC6--*,)(,.**++*'*15533480+.*'+,,*,,/5/# '9A@A?:8(+())+*()(%$-1222264/.-++,))+-/11'-9<=<;61('&'&)*&$'-11432370.++*+***++-/*  .799;83/)&$%#&(,-35751.121.++)+))*,,+( ,355451/+)*.-0-/113332,('*,)()*)+*)(! &,121000//-+'#"'-0-**,**(+')(*)+)($   !"#$$#!$$%&$)''%           !               '    *9;6&  >BA8!1-#9??20GLB/"6;& !:=+06#$,*;D>)7GD: 6FHD/DD/"+7<91 +778>;%4CE9;L=+#CG@JJH>%0FSI/#CF4=DHBAGP@, 7DOOPJ>'5K2/3)$0CJ7+0,2@B1' Xn$& 5EE53>PA+ 8DQNE@?/&K>$4:9?OP:,;92=B2*5 )„N#*.%  &)=I<*2DG0$8FRG<:7')EB0:JKPRB52CNKC4.:80 J„6((% 3=9+EH9%:L:&5>OJ=#2AOJ7=FMRK4"1EID2+9<91el$++ -*7@8(>O<)7PC3$7MRB1(7ARIAMO94KD2*%0F>,.;J8763 "ur5(0>>>?ENB1/@E1!9@OO@?MQ>4AE22DE71=3@G903D?8./VtZ 0?:008CB3&8J>+*:KPQMPQC;*99(&99-7IENSJ;-6GA71!1~j=  %>@=+$6;-&9CF8+572/2CD55$). :G?*/:HOH@6?QF:7=C;0AVd*.83. '0462'*5;;;0/=@./@?&>M>+:'Pt*9?9568,&1'$+.,-3=NNOOELOTTG7:FHA=(6F?8472YM 6>:<56=7.!),468/08<;;8>7:<;<9!-5:@E<8GKLNOND58M@,7845:5.GG9>6",9@;I7$=<4;;9:98'  %47:<@JM@3348;8/7C=+6F@336AQK=;:5/(5<9 69:=62=::@8++67;=9BHJ?4 *-'*"088$,FEA7015/ &o9$488&=69- "..0/5=CEGJKORONG@GOSPIIRQA>AKNA968-# \^8%<7:*;:;5 .5=DENOA?NMLOQPOOPRQG:36=QOLLNPPF?=6 )qc2!889*3?<8* +7 *0389739EI9424EC:<88.)9KM><:974;65`‰hz8 #85.55 #:;92 #/44-+:F>4%8AF9667,0-9DK<;81+(235†ˆnx<B=.(16$786A+ 6:;3*9A:865=84656<65>D:6/.)+2$ hŒ‰ri- 3Y:@MH9.?!)9:73 .80%:3, '9:@@8&5;7/,---0 )„„s1CdslhdafRD2;36/ !2+!#7;3.*,+++,.-..AŠ‹t…[%R6  &"%//$$'[…‰‰ylV+25/776568888649>56.6FC/3 ( )3#* P~…}~R,&93/75745786712:?9:B9"9 +"*&  Au{‚‚b33;.154562455646@6@A$CP* ))+ 5iy}~€]?0%:104.24.34325<8>*#KKE<  %(Yu||LEZ:2132,2/82.8@H5B)4MBCI:  )*! Jrz€rAAg#643383200,0OO>EL7+>F:ILIE0  !"*,9hturYMaH;224323+)5:HGIEHXG?/CJLF@ '82#,L;7(XtuqqmmR-0//-.21'/42GFEOFGIEHGHLD !558A9CC;68/ 23=@;/%Fhpnmqn>$20.-+02401.8AIIIKIJJEHJH" 169;8:<:8;9OUjdnk`G5 5_kmpg]D')!./112354318ADFIEHOGFGGI6"HHG9867;X`\=:0"AX``ZZK010,,/23,.21/87:9;A@>9AG-.FNQH@9847IYUA3  -L[Y\T?5.21/030,+/005=:A==?7<@?")0@GB8686>QK:)  CXWXWG:%1.,+00-,2-.2:8:;=:8<=1+)),.+*)+**).5;9433771.-,-.,.687-6>B@A6-*&)*)((*('-20084381*.,--**,232.  )8><:=61'''((&%'.579:64721/-,)+)).21.%(5;99?81-(%)./61378:8852+'*-*+,-./-& %+28753467340,(-02222/,/----),-,,( $'+/,0/-#!(#$((''))+**)*#        !#""""                 &+ 480!'/??6&2( +:*9<;46DC81H@+ 9=7+" &"8<9#K;7K;0DJC5!8LM989:32c[ '====:=:80@~< /=?<59I>$1=LFMJA<>I5#)-,8L'8@BIPK:/:<56?69†I#0)# 1@A8%:KB*1>NP>2'.58K?,:AFMQB43GGHF:/02d},"*,##0$3FD7(=H4&:EP?5 ,;K<7L@++8JO<(*COQRSRRO>6>14K8%8C?7/ iyS,$36<:@HKA48I9"5DL<%:PL>DN@?@F;%1@C.6=PE97GM@0=C55G;-7;4DL;0/=>2' ;yiD:* /0*6<;@:$:I;&+;MOA=ISL:)84');5&;KDMSL;+6:99+ 3~nOBD?3" ).%$1:4%9C=5-6CONOLF;6 )7)"&F>$2>IF9=7=OC::883`_R.IA6;=9 $"#.*698*.=J;(8@4/DL8->PPC2-"+7IQH<:3PYD>?:965:- ,##&)7>8#"=H59KSKAHPA3&/+))3C>66/6`]0A=><75;<5"-//++*/20/)!7FQKNJBLRRS>/5@B<7(8C?7* NlD?<<:888=?& ! !69?:7A@<:>GMGMP@07;=JI95INC;/,<7,-!*R>9A:27:<::4: &585>FHLJNNRI83>N=-65/:;/.EC56*%()1  >L>;6+2;;<1;"45713EG5477:;3/:D:':G8348>NOD:9;;2(,"J?::$:<49!!35748BF8,"00&%%261/>LILORQVRLNOI?/!21=>7! 0969+5479=977.189.64-'$.:GPE= 7:62! :;:31378:&)/);F48E785/=RD55418I968228:' ,F586;2 5?71  #.,'*,%-,:MKLPJ<2+;QQPOB75962A:52+  fT# ,;:FNL65AMRQSLOJ7418NG=:6(  -rP( .==K@*56<8 48?IML<E7 -:?* /8;BJ:3:C6COKJNRUSQH96/9PTNLJDB920J„]v+56+6cB($37=# *69:61<944%‡‰qˆ,<53MfYF1(8>;$*&6?J<.306I=8>:33':FPK?884..iŽ‚mpHTat‹‡„_?7;28- (&3:@9-47:=542'9?A=5941/ 1‡‹€€v6w‘–—”•–vbK@39 **:5*",,(*.-+:<64+*+0 OˆqŠQ TŒ•”‘ŠŠ–~YJ845 "$ $/3-,*,(.*hŽ}~6=+[y‰eEA9EXvhAD2@.0" '.(%),5'oŒy@0!3B<1487476Y?<@/#5   #((*-.; #sŒ€}g6D576456669Y;"-0=>A%  '#&':'&p‰…y}6*)5=856363:>:>6+*A;A !$#*/%k‰Š…uc853432698;965635E75%8M49  $&(1  `‚‚„zv;./5:2.7965136539?B0+B =  $)1 R~~€x@>.195/,66224258?661'PQK '$  ?rz‚z@K5);831/573..8J[?Lb6LII&!  */ .ev{ki_]KHJC:<*  *' #UxyznDT^;60//203:>@FIA9;JC6:JJGD9 (, %89Dsvyztf_/)81-//1062 +8B8567:8%1dsstrehZ%41-210.246EIMGGMHJ>IIFN< %?8:9;8:8:CKolurqT<941,406466=JEJIHHHBIIEFF AB6:48<>=K]afoiK7!  9hiofhV6 #-0/*146008CIMGIEDFKGGFI'9H7579=BAL^gghTG4 )Nhjkd^T).-01'-1,24>CFACG?EEDDDE/<.;E96:9;<9FacVXJ:-:^ggcb[-0 /01&-4058FHBAEA>ECDEG93K=79===95H`_W<9/  .Qidc\S<21)0.,'5456>89BEA=B)9POTKD2,/+)--.-)&)378;9;866=;2/41/203?H@) +CLMMB/*..+)-0,+*(196:76778:901.-/22:=<-8EIKE4)-.-**/+*))/;669:9479301-,/15;91  (8/.--13:84#3?D@@90**((*)()/289:;687,*-0.,00252' 3=@:?<4,&#'(-5:98:<;>:20/,--/434-) !.7:9<:77756:542799868752101421+*!',27844660)(" %%&'*+/-///.,+($     !"#%))%%"               *' *,'5:91*=7.7,  #0)9<38@84A;C/&:B;,  '#498";A7 ?I;&=C9#5CK@4()#Y ! );57>:1>C9%8KD)./ '>I76533,'# Bn8 %$!5?<7@@=F?;,2JJ8$45CI8*"(,/(&fa&%,9C=#7BFK?80+0EK;!6@JQMB8-=?863':xP' 0:17E@(9CLD7#-@FIP= -46EOA35C9<=6# Zz@&(# 0'%# 39>>0%:H6!5>NB41JL;=PKHJ9'+2GG:.0>5& $jzaB0 (*).49<*4@>-"7FK;),@RB6:I99C1$96/FKC7)791 *rmYG:, !'*.66"8A7"/CLKB<7/WjdWRD>:69NH5.@ON;<;8774."*$&584!1B@2COPE<@PB9#-.,2=<89868:3 $ -2662(!'9LOLOGBPSSR;'1=?803?=5,.ZZ:JT>=73269929) #7>=AD=67@JILRQ<0;>EN@36GD;5#,82# BhB0N=;=/'-7=68.#$1=FJEJMNO?5=GN=)671<;,,D?44022JD1=;:/.9773 $$9D@4588:6)7>A4*;>3258AOLFCDA?74E:<=9,/777 %'9?A4"&.)!((/6((6HMJLQRJGLMMKD@866CM($364 (0-*14DJBKPG9..@PIJL=2255.9:7++YQ%#978M[8 148, $57KN==I719>DNIAGPRM;4>QNHJD6450# 7‚|x>/B?Eyq]RI<0574)6:C=06<38LICHOQPPOF7'9NGA>7674'q‡ny>3TXm‹„…}aSC>=>+*777064;EEECCB@>9:?4*>H<=:8652 RŠyk€>$e€‘‰wmfTE=7%$, 3=B?266>KIFE86:15DD=;650(&~ŽnZ~1\‡‘Œ“†u‚…w^XC<73=>9&089CEAA:*1!8>=662'  T…‹h' Q€ƒgzz}Š„hS9<2 1)76(  3>;8+$-8602,)(jЇj‹K:gmZP`M}ƒŠyTE<<"   ",1+.," )z~‚B%-*.94646739`pQE?A%&! #4+**4yŒ‹€ƒW)%5<;9;647BqMH2-  $)*-.;{„~‚p,+=:<5687<5/70114364438;?>;4/<6I/!  ! +h}†‚‚b=C=/92,4357737BNGC3'3FB1%  )!Wx‚‚e>NB'4613576::J`jQK3 8JRC7(   Hs}‚~`@cM4%685237;M]hqSGQTMEKE<4( $"  6i}{eJkQ3'/64384@AX[QQMHOK?DGC?B@ &5  ']w{zuksY13"23241;SUIHKTLMTKHLID@> 189$19<% Fpuvwtje451$53033;GGGJROTWMKMIJIE 4:9=98*7*%2132:EDHJTYgXWNJMML< =;968:HFGVLR[cUIKMNC  C:866<@7;[hdcO?*;ckjmeJ8&'1-&2457@FBDFKJQSRHHDHB+;38=<;<9R`YU@2$ +Thkk`_[2-11.+88;DOFDDINEVHIFAGA(4587:;:9=L^]Q<3' >cggcbN/%12100AA;>EHEFAG@>ACAE@)3;;9;99;EDA?=>:?>@C?CA-1/04878;HSI9( B\_bVH4/ 3020-.1=<>><=>@BC;654438>GME43P[\XB4/)&/0.,+/:>;<<>?@===>A@955426>CI@. &EVVUE9.-%+,,++,/9=;<=8:<===?=843237@C>+ 8LQQM:-.,&,+-,,/3=<:<:7:;:8:<81227=A:,  (?NNOF1-+*/-,,.13:=;;778848?72234:=8. 4FJMG9.,-,.-,.178==>A;967932464996- #:DGFA6,,-**+.02=>>??>87<<:3286:2,!*;CC?=7-+,*--49=>??@@<<53706764+# +9?>??<7235:<;88<:;=;::761562-$&.4:<<78;;850-+,-.000110.1/+$#+.*,*$ #&&$(&             $ /3+/%/4&;>:1;@;7' %0+"77$8DFA&)==/3BLK<8#'8EI<;3-:80,al=%  ,:9 :??:.%@IILO?5/'2@MC248..3$  7y\5 *:<'5?C=0+?D==EJA><24J8"7.2=GB:+*8B95 i‚N5%   ;<3/K>0+7GNA6>KGF>" 7::E8=9.,-  U}pS894%  $'406AF9(8GPJ:+8<9657FMMH27@81% `nq^>887+ ''. 6A?51CNB;3+-+$6AH>FK95>A76 C`idc?8;982*  *'.?@97% 6hke`YC9<:66895'&%+6=B@;(&9,7ENG82BNJ<48:AD;65 HkihuXG>75779584,) )01+':A6?MRQE:;ML<*.25996(  ;b[fwlH<7-./6787$ /465-*27CONQQHHSRPSA42:=7378- %\omruVH>/+'/479/ +98=DA9>JNOPKO75@GOL?*6D<5*,.+ Cjjo~aU@1-&-673 "8<@?FKNK:;=13;7027B@;9& 7XR|sS>:J;!(4<, -9:.)(&('&11#4?NIKLQG649DC:7) J@k}YEKdG/" 073 '55(#5767864$/;IE@;:<>@EFB<83#E:d`NVcE:2"/47* *+/5FKKLM>4-KA6BO=2+:NGFKE9+0540771 4nUs‚ldwwrbMO?:;,'6:EIOM>2(6J=,/:JQLBMC:637?<7.izkv‡|tx€€rk^cVI@7(6=IFBE31459KC66AO?4:JNKHF>7)%  I…xuŠƒzxsuxlbjfYN>.5:A75924A948 *;=<,8<@HFB<37:&.;91*[yzŒeA&MibruXkywƒoLDA. 058.%0;==;+(& '+" r‡‡t‚kG"".=DD:Nq\ioM=<3    /z‹ƒr8,%1766525WxTE?2    4{‰…~~R0-',<<:9;3-0%    (!6yŠ…€m@4/&%-29?=?;(#7;;CC.4    4s‹ƒ‚`=8XN,.446765=3+9Eipuuys]LHF?>)" $4> 3_{}zysgghM=756CbjrrllgbUZS;4.25@  ,-/4=H #SxzxxuqkfbJ9:ILbroi^eosltKJJ>=AP  %>:94@Zm%@nyxwpkt^PRB>AO`hg^TapK=h^NKIHSW  .@69>FZms% ,Zuuum[LHJ^_bVJ44!5[nppeE;;=3# #Mkpic_S7-0/0:G[_]YF@CBBGCCFDGF<0,2116CRVYPC2#>`ki`XPI667>JOSWYZVCBDKF?Yb`\PEA2.2:>DLOMLHHJL@?:87:;?<@DA;BA/>TWUM;45,.+2<@FLLKIFDHB8567;;<@@A<--ITTP@2.0,-18BFLLNNKGDB;10/9=9@@;. ;MQNG5//0//5@JILKLLFE<623569>:6+(ALLKB81222:?CHHGGIHD@947389:7* -@HKF?9869=BCDDDCCBBB=9:9685,   .=EDD@@@>>?AA?>=9899768661+!  '2:=AA@>>=>:4/+*,-,-./0+&"  #*.220.*"! !#!           '#/0.1641# )&$)'4:91/788.&> !%$**,0" =@;,5?=9 1x\!!)333.9CHC>;54?=88ZyJ1#"("/44/!@>?EHH<6%5AF>-44! (yg?/" )(-663'<9765CG89'3IA'69) IxL<0  '-*689.*;EFA?D;2941I@)6:85 a‚Q86   &.*7981)=EJJCK:254&pO9<,  $,*998).@HH;2D84DC7."+3A<6: =z„Q3;7(   (&&'799#6BEA73?<=A6&(704<4/3:@HI@;7:: E_b• ‰zzo[H8(268$ !25 ('%#,/1+(8MJHKPO<797:9:*[T™¤™‘‹†ymWE7370 " 17579=:6$6BB9:9::76@FB;9!WLˆ ž‘’‡|g^D5?:& 476@JMEDM;)2D?/122/6A0'77?ALK:29K7&6AL@DKI<(58834/  YwRv“œœ˜–Ž‹†~zdGE;08;DFL@5&9I:)5;ERC:L?4899;<'z|h„•—š•”“•‹„‚qeNA* *79AFA8-,29KA537I8.?JCHC<>4 [‰ly“˜˜’‘–Œ‚wvhH778;=9/790+DJPA.6<6%"" hŠ~f‹””Œ“ŠŠ‡‡~rfjmaE>% ,8>=>I=7167/,6.  ?xƒv}Ž‘€zphtkaffloM??" 08:2:AJC<837>:)+/  lŽoo’ƒ_.8Ho‚„om_]lhL=D3 (/* &8<<9:0--   '~ƒ~y‘—s7(5::>^gKIknO87%   3}‡‹„†ŠZ2"'4:79:BDFD60  =wŠŠ…|†fK6).4) "*2#   <{‡‹ƒzRFl>4%/:6;4' (JalRDA?:4 7x„‹„ŠwLfcL3G1 4 !]ƒ‚ƒ‚€€s€|hb]ity|{s{vuyfB; /& Qy…ƒ„}pyzqvogr{yz{}yvebD= #" 2E?f|€„~adkgeeku{vxvvtri^J:$ 0# %27X 6Z~{‚}^aabLP`umntttsowvV62+--8N  1=:Gak)Ow~~wjmrgScuqlkpptnorpTABC?;D` -;4>Idoo"@o|x}png`GVdoiohkqpijpecMOVGOVf ::?CXimmO .[ywvdo_QQeigilnjlgbe^T[LJQBC@U*  $9;AJ\kedM@GlsuejTQ\^Y\f_ekdc^R]PDA4=@BBJH* ,256N_d[SB4)  6^rsrhYJY[VXXgWXad[VQCGC?8>:?@RG;0203FZ\UA2" "KkooeQ>:.4;LZ]__`]WWRRXD48;@??OH8@=@WWG3 ;]mihXPQKXSSZ[YZ[ZU\XIC?66<<8;FH@5CSJ5!(LcfldRLJNTORTYY[XYUN<8864:<>AJK:8@F0 =ZdacUGG?JUNSVWXSUWM6751022?DJQD:=+ *M_`^ZOKA>OWRVSTRSVM9577331;DEBA8' ;U\ZWNKAA880)  :HLNMKHJMKLJIA@@@?=>@?=52) $9DLIHIFHGHH@>;73524351,( /:AECCDCB?>4/*'%$&)(%" ",27::851*!  !"!     "#&.-) -1/"!/50#$&g %49:;82'73(* NzW+ "!%.6:<=:,38:6#"ejN>/ #(!(,,-28>4 4<; !! 5pcF:4"'-* 18;B<;<0.)4>:(63) Cx^@<7) *./ 23>BCH<.9=B=22860Qx\<:<3)'-+(63;96A8/<=9-+45:4." &bz[>9<<60,/'(/'285782;69;5(9=>?;1!% 9mu\D988;::=2'  ,2!2864047:-":DHF>7& )! JwvaH:8876>::2& !"0))271)($ 3A;;?@:2(' SzxpX?269;:::3($#(%+570$/:<;;)8H<668:6()' )bu‚‚lI307;99;9&!"-2.%*)>D?=C;4AKB4.641+  8hs€Œ€^F6.3387<- #(59>IPLEIG:7JK<%))$Hfbz‹yaD9/.29:6! /389;2%  BcbaHL9DEEKLJ>72.0* Q`d€”–š••Œ”|TAA<( 2578?J;(:C5+115.+5886  ]ih‰–š“““‹dFC9(59;=@917H68JJAFHE;*-42%nko~Š’•‘”’”‹zVM?*36:>93'x~o’“ŒŒŽ‰†ŠŽˆ~}nYA>% -419==:3/6<:5% `†Žrv€ˆ‹ˆfRHQ^demx{u`@?, !&06::8)++& +r‰|‚‚‘Žr9#!!&,;BIQbkW?9  3qŠŠ…‰„f5! "$'   8pŠŠ~‰~h0#-)(-KZMYU@:-  6l‡ˆ‰†Œ€}cPW]XachXax€xc][eJ?:" .h†Š‡Š†{x_gsz~}v~z|~mKcB84<8$[ƒ…Љqmvrmw|w{x€~{zuIH446Ru„„†yxrt{|z|zy|ƒ€rrO8 3>> &Bp‚ƒ„„srxyt|yuvrzzz{wiS3 0=@1F7azƒ~ƒ„rxsttssrsuw{xkf\6 ,,<< #5M^*Xw{t||xosuwwqtvrstpreaL: 1<;N>(7;Tks Gp|xr~wvorrnsslmrhmri_GAHU?%(3:F^bZK>,$ >bnjrvmd]bciihda_ci^`^K@FELIILNF=5=>TWL:)  +RkjspdadW^e]`_\^\^__XQMA<=<;AHLQHPRO?+A]hnldb[\`bad][YVU\VTK=98=>ABBCLKLD2 3NhioiaZ`^`_^XUPMQS@67768:8<@?A>=:+!A[cgi`YWa`^]UOJEIL8@I<<:899>>73-&4S]acbZZ]^\[SI?>CG6>KJFB::=7-(%!#BX]`aZY]]ZSL@98:@75FHFE?;5+" 0JUZZZXZZNPE<4,-97#.:DC:)!9MVVTTTRRLD51*)-3/ #'>KOQMPNQJ=4)%!#''#!!!  *>ILLNJKF<-#   $6CEKIDB8( )2:<<70#   !       "S)#(($) 4fbB(1$# *' ?jRG7')3615%!(/)KldB766 ,6:;4#%34/"%/  %Rq\E999;0 +/4:/#)0*!'4621ZlbJ799:<<% %""!$.%&&&3985.9_vlO:679:;<9 " %8;;94( GhxnUA66567<>9)   #" 7=4464+  )Vq}wfT?60056<71  "&' )*#+ 8>:).3."3ax|xwoWG9648;81!  "0:;5&8:5=?='"#  C^}†€‚~raPA89<;3% +;>B?A17A:9A>/  !Sizƒ‚ˆˆ„yhQC;:;6, '-5<@=8A=6?A?B>(.'  $[vx€ˆ‹{xdUE?993" -47<>84A=<9?B>065/  )asuxib^TUef\M898% /8<=;.6?5/32,%!1:6-  $`mk‚‹ˆ}{xiYZn]?=>- "-/0-&1'5611779:7* __Lkˆ‡ˆ‚|{wypMGD6  '-22'38:@A@<884 Z[`zˆˆŠƒvgOF;$"158;=:7.;8+27787/#&[on|}‡†ŠŒ’Ž‹Œ‰|`J='"+18=9:>;-;?81545-"$ inr…€„ŽŒŽ†l`C,'.16933=:*8GHDDC;8%*yoq‡ŽŒŒŽ‘}gG2&/34- 8A=*/9DMG836)' A†pu†ŒŠƒŠŽ’‘€iX="03/7?F:0-9FB4.83, YˆrtˆŒŠŒƒ‡„…Œ‡i^I0). *8AI=34@@5)65% .qŒvsЉ‹ˆ„ˆŒ……‹Š‹j^G:) )1.,6AG<3:<1!  L€ruƒŒˆ‡ˆ‡‡ˆŠ‰ˆ‰ˆzeW@7"(572(*9=A<76  '`‰‰wwˆˆ„„„Љ„†‡…ˆ‹ƒdmK90#.5/)&2;;2  6k†‡€~ƒˆ€‚{y‚}|‚‚ceS71 ..&"F{‡‡ƒ…†‚|gNBIUlw{znaPPB-  M|„ƒ‡†‚€mXKE>9BIJ[beTPF=0  M|…ƒŒ‡†€~mlhhb]ahqxtujccf]J:' Jwˆ‰ˆ……‚}~zsz„…~~XWxZEK@=  Cr‡‹‰‡†ƒ„|{~~„~SH^VE>JBH+ #WPD$ .Iap" Fi}„‚|{€~zvolgjmouysX7+>IQ;'  +CLhic9by~ƒ~~zxytkb\]bmlojN< :@CE;(!>NW^_QC *Qo||}xvy{xqg[UUX_jme@@.;DGNJ8/-/;FTb^VC2  Bdqwzxxwuwo`PJJOW]`_D;(548;8GLDKHCMT^TB/ 1Ujtuvuvusm[I><@JU]cP9%,*&+5>GQUVOXVJ3  A^lusrprmlWA204=IS\_H5431**4FOLFKC:# 4Qemqnpom_R;,'(-:GRWSE;SP?<9=>>5,0)6RahjhgfcL0$0GLC<:A9% %AVafffc^G-!8>EC6FF==12LZ`cba\C( %5?EJINPL6&;0&-* &[|~u}‚}jZA>;==3 $&'&".2# 8p‡€u{€xm[EA:;8%  $05255)'0(  &K{…unow}ykNQG@9& (1,/=:/$,4- SbŠ…‚{v{{wpv{_JBA;(  $12!*82% !(*feˆƒyw{|pn~ufKF>-&# ".5-,010*  UF}‹~ƒ‰†‚qpˆ‰uWGA2 !'*&!-7:855,  cssŒ‚„‡ŒŠ€r{‡iPE5 '45432$9/$/450"  {ˆ‡ˆ}„ŽŒŠxu‹’{cC8 3:5-8;+<;740..  '€‹‚z‚‹‰††‰†x‘ˆjG; ,4*&8;.9>?:898# 5Œˆ‰ˆƒ…‡„ˆ„‰wXB& #$*7<35:=;78,  H…{‹‹ƒ~…†ˆ……‡ŠbG2 $,8<945;978""]’„ŽŽƒŒ†…ƒ†„„rJ=& !#'7;<83 !&)(498/% L€’‹ˆˆˆ†ƒƒ†‰„‚ˆƒ„„v`7: '/.-," ZŒŠŠˆ‹ˆˆ……‰Š„~}‡ow`85 $b“މ‡†€‚††…ƒƒˆ|†{f]OE*   )eˆ‰ˆŒ‡‚‚…ƒ†„…‚„‡€…si]KD-  )b‚ŠˆŠŠ†~~‚‚~€‰ŠqiWKmucI<6  ']€ŠŠˆ‰ˆ‚ƒ†}ƒ„€|~{wDy|^RRYN(  !W€„ˆ‡††}‚}~ƒ|w~„{kjJMN\\\F(  *KOv†‡ƒ†…‚{vjlovvz|ƒwd@;)N^\SL- *Mi Bl„„‚||}zj_OP\kuxwwdIA ;ZPGV>/3Rju*5d~…ˆ€}|u_G94>RhrrmaA+  6GIGI@;/>\gk\  'Qs€„ƒ‚}mT;,"%7L^liY@  9F9>>DGB57Pd`_K8?cx~{yygN-! 5Lb^I@ (@IMKZdSI]iaX@&-Oft{|zxdD& 9QYCA 1MP]h[adYD-  ?Whyt{uc? #>N?@ 6IVkcWM5 .GZktws_5 *AJ9  4RZ<7*  7Marsn]6 6F9,#$! GH- +E[imkV0 :MJ=7MQF,"6ELRU[H -AD;$  '>NVU< .30  .7.$#         >  !TmR   .Tlhe   .Wemef-    0aoblkdB   2]tycfpcJ   9]ry~vflWD* >blsuyƒgWG=:    IfkmmkygJDDD.    +Sooebny~ofXLDB8     =aspwjcp‚vvfODD?.     0Tly|{mdo}}ykSNG@5    &Ko|‚}xgjz}|~}eRQB8   =ex‡‚ƒ„oguv{‚vcSG9  ! Krw‹…yr}z|‡…o[I;& !!%$  \ŠŒˆ‚||‡zrƒ‹|_H>* %!.&   "m‘‘Š‹‰}|{|ˆ…lLA) !1%572-%!  /|’ŽŒ‹ƒ€Žƒ{~ƒ{WE/ ,6'46541,  @ŽŒ‰Š‡†Œ‰z€}ZI9!  28+'4540( RƒŽŽ‰ƒ€ˆ„ƒw}|nP@- 086&*23/!`މ…‚†…†‚„‰†„€z}{UF9" )473)0/#hŽŒ…ƒ‰…‚…‰†„‚|zxeD@3 #,30.(  -s‘‡„‚„}†‰‰„‚„…stvQ>:#').*  :wŒŽ…„Šƒ~z…ˆˆ{ƒ}u€iB>,   C|Œ‹‰Š‰†vz{‚ˆxj^K@0   Kz‹Š…ˆ‹†ƒ~|~‡‰‰|}keYRJ=. DyŒŠŠ‡†‚|y||‚…€bmŠzBbRPC:$ (Cs†‰‰‰„„yronkvttwagzhZ€PYNH=2   'GCl„‹‰‡si\URV`dps|~t|v{lXPELL>& 'Je&8hƒ‡ƒˆnRD:99DXcrw{zr[VTVQNCMB5##3Ihr/ 0a}‰„…„gC.&215@Llm&&Nw……ˆe6 7SerlX?1 0AE;AHPND;#*4?6%'L> .836AEJC>;I\V' #.- '7DLQLBGPM( #$#2=MGFFSW@  +?TXWVX+  ,BU[X5  4>4#       &$-3  *6H:  /H[L   +A\e`(   ,ARjk[8    )C\bm_O>   +>]qbhWGD&   (:\v~jSSJB.     ! %;Zs€mUKB:,    (*% ':Zu{‚~^LC<0#    -;9+ '8Sp~€oME>2$   &API4!#9UgwsSIA4("   4S`V:#$7Qjy~‚wYG?7/'!  EcjZ;''6Nmy{‚{[ND:2*!   %Tor_@*%4Nnyƒw[VF>8,#  /`yu^=)!#3Ngxƒ‰nl_GD<0' >h~uY=-""0Iar‚Šk~jODA8)   Hry]9-% $2JZjx…kjHCB8+   Mo€sW;+%#!(1CVgt~koTTB<+ (!Ou…wZA0)%$,1>M]j†lmJRD:/   .8#Sv…vZ<.*&&'19IUcwuhMZMF9'  &@\ %Sty[;+&(&'*18MYmwym\caXN@( +8_m !MpyW2(! #"(3BRfw}lƒ`aLMTUI3.$.>M@48BNbmh BctpJ!    ,9NeovsndC#-EIULJR]beZ:[olJ  -DWhqqgjX.!J?0 (@Vke]I>2$$CY_D(CTAE+E@/'"8PRSE5' 1EN> 7FF6  7;3* 'HON;"  3;4&JR9"($ DdJ%!+(;L6BY. )D% &JG    (P.  ->;4 DX  =PTPH41HfC%6@FVYHHNN:&2GOJKQYO /@>I[`D  +9ZdM 0D7 ..* +53.+%7652--. ,SH89930.0/ 1QkQ;;93.20.* .Ssta*!97753.//* %Lbsv\6 76363//+-) %Nkov^QE::844431+,+' )HlondSMA>=:540+*)%!  &Jl~dcVD@??;95-&#  !Hi|fj]G@>;=90(!#%+  Bcvsn_K?49<:0" "$$%2  <1%"(.Fn   /Ngz~kXC;>?<2'$,Lv  $D`v€whG77>;4) '^{-  1Pm|zq\@57:0! 5[q0 #  &>dyvxaE@A8+ &Fdzn #  5OrjuraJA@5$$ 0?^lwl %  +B^ywniWIHI=/*+EOgtja $  9UmtuSZeEGWUPT__dc]G#  *Heh`DNeTIRn^ejTAHC0! :Ugo=%.>AIghb_='&'   *AKaeC1DSmdP*  !89KX7  6Daa:    #88+@?B`T'  "2- ,  1UI  '7 P1  $4 F7 &0Q 0S    @= )3?B1'>k8&)5JWKDK[I !-FMINO 9UUISkYKD  % #11  )BA.0./ (Caq9--0./0 )F[tsJ,,2114% ,C^pzn]-/43/391 %C^qyq`P1"/.21248P A\t~vgQC4766335=Pf6Rk~sgP?9888769@Wo,.HgswfOD3888538Lf€o-CYu{hS;4599518Sui 9UkxiP9158842>Zz…j 1KgynN<56454:Njˆ„d CbzqVF<===9>Yp€ya, ;\uzjXJIFJGFWlulS2 $Jo€ZA7?^PTROSXM7#@`YE14Y]cXC312% 5]VB9 Jjg_+  'RTMR5&6Z]U  0WLAQ=5_`J 93FTVkM.   !(=TN4'+   =L+ 67N= 8: 4L <7G5%<0+X0?"+Q.92   B`L@ 8PGTYT7  ;FADUS (5DVRG Wc\OM#   !0  #0CL !3BSdH  2@Tgie.   +>Nbhb^N1#  &?N`f][`aDGU7 #9L`g][^bgcUI09L_fb^\[cf\H,  7K_d\RQWX[O>)  2EHNLOLHB@8+  0KffYKPRH<$ /NM>?LVVM>3 -@I?>YPP@:6 -CT; "MQHA@A3 5:CN>@JGI"" @G+9LJK-''+U?(9KEE? ?Zd6%;QIFM !IW9*=PDKU )JR/AVGMN5KIIXJZCHXUWOX* )^aNRZ6SZSW= 1@KSXS +HAJVX+ /7@\XCS[NJH       "$$,,$"($  &#  1<83,  BOLD[W)K;ag4,5FjT&&aY 9 /HT[_-6=?R #include #include main(argc, argv) int argc; char **argv; { char *src_file; /* input file name */ char *dst_file; /* output file name */ double xscale, yscale, zscale; /* scale factors */ int filter; /* filter type code */ unsigned char *src_volume; /* buffer for input data */ unsigned char *dst_volume; /* buffer for output data */ unsigned src_xlen, src_ylen, src_zlen; /* size of input data */ unsigned dst_xlen, dst_ylen, dst_zlen; /* size of output data */ unsigned dst_size; /* size in bytes of output */ int code; double atof(); unsigned char *read_den(); /* parse arguments */ if (argc < 6 || argc > 7) { fprintf(stderr, "Usage: scalevolume input.den output.den "); fprintf(stderr, "xscale yscale zscale [-b -t -c -m -g]\n"); exit(1); } src_file = argv[1]; dst_file = argv[2]; xscale = atof(argv[3]); yscale = atof(argv[4]); zscale = atof(argv[5]); filter = VP_LINEAR_FILTER; if (argc == 7) { if (!strcmp(argv[6], "-b")) { filter = VP_BOX_FILTER; } else if (!strcmp(argv[6], "-t")) { filter = VP_LINEAR_FILTER; } else if (!strcmp(argv[6], "-c")) { filter = VP_BSPLINE_FILTER; } else if (!strcmp(argv[6], "-m")) { filter = VP_MITCHELL_FILTER; } else if (!strcmp(argv[6], "-g")) { filter = VP_GAUSSIAN_FILTER; } else { fprintf(stderr, "invalid filter option %s\n", argv[6]); exit(1); } } /* load input volume */ src_volume = read_den(src_file, &src_xlen, &src_ylen, &src_zlen); if (src_volume == NULL) exit(1); /* allocate space for the output volume */ dst_xlen = src_xlen * xscale; dst_ylen = src_ylen * yscale; dst_zlen = src_zlen * zscale; dst_size = dst_xlen * dst_ylen * dst_zlen; dst_volume = (unsigned char *)malloc(dst_size); if (dst_volume == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } /* scale the volume */ if ((code = vpResample3D(src_volume, src_xlen, src_ylen, src_zlen, dst_volume, dst_xlen, dst_ylen, dst_zlen, VP_UCHAR, filter)) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(code)); exit(1); } /* store the output volume */ if (!write_den(dst_file, dst_volume, dst_xlen, dst_ylen, dst_zlen)) exit(1); exit(0); } volpack-1.0b3/examples/classifyvolume.c0000644000265600020320000001306105701333240015204 00000000000000/* * classifyvolume.c * * Create a classified volume from the brainsmall data set. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/31 19:53:03 $ * $Revision: 1.5 $ */ #include "volume.h" main(argc, argv) int argc; char **argv; { vpContext *vpc; /* rendering context */ int volume_fd; /* file descriptor for volume (input) */ int octree_fd; /* file descriptor for octree (input) */ int density_fd; /* file descriptor for raw volume data (input) */ int output_fd; /* file descriptor for classified volume (output) */ int use_rawdata; /* if true, use raw data instead of volume */ int use_octree; /* if true, use octree with the volume */ unsigned char *density; /* buffer for density data */ unsigned density_size;/* size of density data */ float density_ramp[DENSITY_MAX+1]; /* opacity as a function of density */ float gradient_ramp[GRADIENT_MAX+1];/* opacity as a function of gradient magnitude */ void *malloc(); /* check command-line arguments */ use_octree = 0; use_rawdata = 0; if (argc > 1) { if (!strcmp(argv[1], "-octree")) use_octree = 1; else if (!strcmp(argv[1], "-rawdata")) use_rawdata = 1; else { fprintf(stderr, "Usage: %s [-octree | -rawdata]\n", argv[0]); exit(1); } } /* create a context */ vpc = vpCreateContext(); /* load input data: either raw data, or an unclassified volume with no octree, or an unclassified volume with an octree */ if (use_rawdata) { /* describe the layout of the volume */ vpSetVolumeSize(vpc, BRAIN_XLEN, BRAIN_YLEN, BRAIN_ZLEN); vpSetVoxelSize(vpc, BYTES_PER_VOXEL, VOXEL_FIELDS, SHADE_FIELDS, CLSFY_FIELDS); vpSetVoxelField(vpc, NORMAL_FIELD, NORMAL_SIZE, NORMAL_OFFSET, NORMAL_MAX); vpSetVoxelField(vpc, DENSITY_FIELD, DENSITY_SIZE, DENSITY_OFFSET, DENSITY_MAX); vpSetVoxelField(vpc, GRADIENT_FIELD, GRADIENT_SIZE, GRADIENT_OFFSET, GRADIENT_MAX); /* allocate space for the raw data */ density_size = BRAIN_XLEN * BRAIN_YLEN * BRAIN_ZLEN; density = malloc(density_size); if (density == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } /* load the raw data */ if ((density_fd = open(BRAIN_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", BRAIN_FILE); exit(1); } if (lseek(density_fd, BRAIN_HEADER, 0) < 0) { perror("seek"); fprintf(stderr, "could not read data from %s\n", BRAIN_FILE); exit(1); } if (read(density_fd, density, density_size) != density_size) { perror("read"); fprintf(stderr, "could not read data from %s\n", BRAIN_FILE); exit(1); } close(density_fd); } else { /* load the unclassified volume data */ if ((volume_fd = open(VOLUME_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", VOLUME_FILE); exit(1); } if (vpLoadRawVolume(vpc, volume_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the volume from file %s\n", VOLUME_FILE); exit(1); } close(volume_fd); } /* set the classification function */ vpRamp(density_ramp, sizeof(float), DENSITY_RAMP_POINTS, DensityRampX, DensityRampY); vpSetClassifierTable(vpc, DENSITY_PARAM, DENSITY_FIELD, density_ramp, sizeof(density_ramp)); vpRamp(gradient_ramp, sizeof(float), GRADIENT_RAMP_POINTS, GradientRampX, GradientRampY); vpSetClassifierTable(vpc, GRADIENT_PARAM, GRADIENT_FIELD, gradient_ramp, sizeof(gradient_ramp)); vpSetd(vpc, VP_MIN_VOXEL_OPACITY, 0.05); /* load the octree */ if (use_octree) { /* load the octree */ if ((octree_fd = open(OCTREE_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", OCTREE_FILE); exit(1); } if (vpLoadMinMaxOctree(vpc, octree_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the octree from file %s\n", OCTREE_FILE); exit(1); } close(octree_fd); } /* classify */ if (use_rawdata) { if (vpClassifyScalars(vpc, density, density_size, DENSITY_FIELD, GRADIENT_FIELD, NORMAL_FIELD) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } } else { if (vpClassifyVolume(vpc) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } } /* store the classified volume */ if ((output_fd = creat(CLVOLUME_FILE, 0644)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", CLVOLUME_FILE); exit(1); } if (vpStoreClassifiedVolume(vpc, output_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } close(output_fd); return(0); } volpack-1.0b3/examples/rendervolume.c0000644000265600020320000001537105701371002014652 00000000000000/* * rendervolume.c * * Render the brainsmall data set. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/31 19:53:03 $ * $Revision: 1.5 $ */ #include "volume.h" main(argc, argv) int argc; char **argv; { vpContext *vpc; /* rendering context */ int volume_fd; /* file descriptor for volume (input) */ int octree_fd; /* file descriptor for octree (input) */ int clvolume_fd; /* file descriptor for classified volume (input) */ int use_octree; /* if true, use octree with the unclassified volume */ int use_clvolume; /* if true, use the classified volume */ float density_ramp[DENSITY_MAX+1]; /* opacity as a function of density */ float gradient_ramp[GRADIENT_MAX+1];/* opacity as a function of gradient magnitude */ int numframes; /* number of frames to render */ float shade_table[NORMAL_MAX+1]; /* shading lookup table */ unsigned char image[IMAGE_WIDTH][IMAGE_HEIGHT]; /* output image */ char filename[512]; /* output file name */ int n; /* check command-line arguments */ use_octree = 0; use_clvolume = 0; numframes = 1; while (--argc > 0) { argv++; if (!strcmp(*argv, "-octree")) use_octree = 1; else if (!strcmp(*argv, "-classified")) use_clvolume = 1; else if (atoi(*argv) > 0) numframes = atoi(*argv); else { fprintf(stderr, "Usage: %s [-octree | -classified] [numframes]\n", argv[0]); exit(1); } } /* create a context */ vpc = vpCreateContext(); /* load input data: either a classified volume, or an unclassified volume with no octree, or an unclassified volume with an octree */ if (use_clvolume) { /* load the classified volume data */ if ((clvolume_fd = open(CLVOLUME_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", CLVOLUME_FILE); exit(1); } if (vpLoadClassifiedVolume(vpc, clvolume_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the volume from file %s\n", CLVOLUME_FILE); exit(1); } close(clvolume_fd); } else { /* load the unclassified volume data */ if ((volume_fd = open(VOLUME_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", VOLUME_FILE); exit(1); } if (vpLoadRawVolume(vpc, volume_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the volume from file %s\n", VOLUME_FILE); exit(1); } close(volume_fd); /* set the classification function */ vpRamp(density_ramp, sizeof(float), DENSITY_RAMP_POINTS, DensityRampX, DensityRampY); vpSetClassifierTable(vpc, DENSITY_PARAM, DENSITY_FIELD, density_ramp, sizeof(density_ramp)); vpRamp(gradient_ramp, sizeof(float), GRADIENT_RAMP_POINTS, GradientRampX, GradientRampY); vpSetClassifierTable(vpc, GRADIENT_PARAM, GRADIENT_FIELD, gradient_ramp, sizeof(gradient_ramp)); vpSetd(vpc, VP_MIN_VOXEL_OPACITY, 0.05); if (use_octree) { /* load the octree */ if ((octree_fd = open(OCTREE_FILE, 0)) < 0) { perror("open"); fprintf(stderr, "could not open %s\n", OCTREE_FILE); exit(1); } if (vpLoadMinMaxOctree(vpc, octree_fd) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); fprintf(stderr, "could not load the octree from file %s\n", OCTREE_FILE); exit(1); } close(octree_fd); } } /* set the shading parameters */ vpSetLookupShader(vpc, 1, 1, NORMAL_FIELD, shade_table, sizeof(shade_table), 0, NULL, 0); vpSetMaterial(vpc, VP_MATERIAL0, VP_AMBIENT, VP_BOTH_SIDES, 0.18, 0.18, 0.18); vpSetMaterial(vpc, VP_MATERIAL0, VP_DIFFUSE, VP_BOTH_SIDES, 0.35, 0.35, 0.35); vpSetMaterial(vpc, VP_MATERIAL0, VP_SPECULAR, VP_BOTH_SIDES, 0.39, 0.39, 0.39); vpSetMaterial(vpc, VP_MATERIAL0, VP_SHINYNESS, VP_BOTH_SIDES,10.0,0.0,0.0); vpSetLight(vpc, VP_LIGHT0, VP_DIRECTION, 0.3, 0.3, 1.0); vpSetLight(vpc, VP_LIGHT0, VP_COLOR, 1.0, 1.0, 1.0); vpEnable(vpc, VP_LIGHT0, 1); vpSetDepthCueing(vpc, 1.4, 1.5); vpEnable(vpc, VP_DEPTH_CUE, 1); /* set the initial viewing parameters */ vpSeti(vpc, VP_CONCAT_MODE, VP_CONCAT_LEFT); vpRotate(vpc, VP_Y_AXIS, 130.0); vpRotate(vpc, VP_X_AXIS, -15.0); vpCurrentMatrix(vpc, VP_PROJECT); vpIdentityMatrix(vpc); vpWindow(vpc, VP_PARALLEL, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5); vpCurrentMatrix(vpc, VP_MODEL); /* set the image buffer */ vpSetImage(vpc, (unsigned char *)image, IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_WIDTH, VP_LUMINANCE); /* render and store the images */ vpSetd(vpc, VP_MAX_RAY_OPACITY, 0.95); for (n = 0; n < numframes; n++) { /* compute shading lookup table */ if (vpShadeTable(vpc) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } /* render */ if (use_clvolume) { if (vpRenderClassifiedVolume(vpc) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } } else { if (vpRenderRawVolume(vpc) != VP_OK) { fprintf(stderr, "VolPack error: %s\n", vpGetErrorString(vpGetError(vpc))); exit(1); } } /* store image */ if (numframes == 1) strcpy(filename, "brainsmall.ppm"); else sprintf(filename, "brainsmall_%d.ppm", n + 1000); StorePGM(image, IMAGE_WIDTH, IMAGE_HEIGHT, filename); /* rotate by 5 degrees for next image */ vpRotate(vpc, VP_Y_AXIS, 5.0); } return(0); } StorePGM(image, width, height, filename) char *image; int width, height; char *filename; { FILE *image_fp; /* file descriptor for image (output) */ #define PGM_MAGIC1 'P' #define RPGM_MAGIC2 '5' if ((image_fp = fopen(filename, "w")) == NULL) { fprintf(stderr, "cannot open output file %s\n", filename); exit(1); } fprintf(image_fp, "%c%c\n%d %d\n%d\n", PGM_MAGIC1, RPGM_MAGIC2, width, height, 255); fwrite(image, 1, width*height, image_fp); fclose(image_fp); } volpack-1.0b3/examples/Makefile.am0000644000265600020320000000144310727044625014042 00000000000000## Process this file with automake to produce Makefile.in # Makefile.am for volpack/examples # Andreas Tille and Daniel Leidert # GPL EXTRA_DIST = brainsmall.den check.ppm README test.csh CLEANFILES = $(EXAMPLEOUTPUT) AM_CPPFLAGS = -I$(top_srcdir) LDADD = $(top_builddir)/libvolpack.la @LIBS@ noinst_PROGRAMS = classifyvolume makeoctree makevolume rendervolume scalevolume classifyvolume_SOURCES = classifyvolume.c volume.h makeoctree_SOURCES = makeoctree.c volume.h makevolume_SOURCES = makevolume.c volume.h rendervolume_SOURCES = rendervolume.c volume.h scalevolume_SOURCES = scalevolume.c denfile.c # In case there are some remainings from the example tests: EXAMPLEOUTPUT = brainsmall.cv brainsmall.oct brainsmall*.ppm brainsmall.rv volpack-1.0b3/examples/test.csh0000755000265600020320000000113205617465700013465 00000000000000#!/bin/csh -f echo "*** makevolume ***" time makevolume echo "*** rendervolume ***" time rendervolume mv brainsmall.ppm brainsmall1.ppm echo "*** makeoctree ***" time makeoctree echo "*** rendervolume -octree ***" time rendervolume -octree mv brainsmall.ppm brainsmall2.ppm echo "*** classifyvolume ***" time classifyvolume echo "*** rendervolume -classified ***" time rendervolume -classified mv brainsmall.ppm brainsmall3.ppm echo "*** classifyvolume -octree ***" time classifyvolume -octree echo "*** rendervolume -classified ***" time rendervolume -classified mv brainsmall.ppm brainsmall4.ppm volpack-1.0b3/examples/volume.h0000644000265600020320000000565605701333245013473 00000000000000/* * volume.h * * Global definitions for VolPack example programs. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/31 19:53:03 $ * $Revision: 1.5 $ */ #include #include #define BRAIN_FILE "brainsmall.den" /* input file */ #define BRAIN_HEADER 62 /* bytes of header in file */ #define BRAIN_XLEN 128 /* dimensions of volume */ #define BRAIN_YLEN 128 #define BRAIN_ZLEN 84 typedef struct { /* contents of a voxel */ short normal; /* encoded surface normal vector */ unsigned char density; /* original density */ unsigned char gradient; /* original gradient */ } RawVoxel; RawVoxel *dummy_voxel; #define BYTES_PER_VOXEL sizeof(RawVoxel) /* voxel size in bytes */ #define VOXEL_FIELDS 3 /* number of fields in voxel */ #define SHADE_FIELDS 2 /* number of fields used for shading (normal and density); must be the 1st fields of RawVoxel */ #define CLSFY_FIELDS 2 /* number of fields used for classifying (density and gradient); can be any fields in the RawVoxel */ #define NORMAL_FIELD 0 #define NORMAL_OFFSET vpFieldOffset(dummy_voxel, normal) #define NORMAL_SIZE sizeof(short) #define NORMAL_MAX VP_NORM_MAX #define DENSITY_FIELD 1 #define DENSITY_OFFSET vpFieldOffset(dummy_voxel, density) #define DENSITY_SIZE sizeof(unsigned char) #define DENSITY_MAX 255 #define GRADIENT_FIELD 2 #define GRADIENT_OFFSET vpFieldOffset(dummy_voxel, gradient) #define GRADIENT_SIZE sizeof(unsigned char) #define GRADIENT_MAX VP_GRAD_MAX #define DENSITY_PARAM 0 /* classification parameters */ #define OCTREE_DENSITY_THRESH 4 #define GRADIENT_PARAM 1 #define OCTREE_GRADIENT_THRESH 4 #define OCTREE_BASE_NODE_SIZE 4 #define DENSITY_RAMP_POINTS 3 /* classification ramps */ int DensityRampX[] = { 0, 24, 255}; float DensityRampY[] = {0.0, 1.0, 1.0}; #define GRADIENT_RAMP_POINTS 4 int GradientRampX[] = { 0, 5, 20, 221}; float GradientRampY[] = {0.0, 0.0, 1.0, 1.0}; #define IMAGE_WIDTH 256 /* image size */ #define IMAGE_HEIGHT 256 #define VOLUME_FILE "brainsmall.rv" /* volume data file */ #define OCTREE_FILE "brainsmall.oct" /* octree file */ #define CLVOLUME_FILE "brainsmall.cv" /* classified volume file */ volpack-1.0b3/install-sh0000755000265600020320000003160010515602102012153 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment 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}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # 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 $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: volpack-1.0b3/COPYING0000644000265600020320000000151710727044625011225 00000000000000 VolPack version 1.0beta3 ------------------------ Copyright VolPack is covered by the following copyright notice: Copyright (c) 1994 The Board of Trustees of The Leland Stanford Junior University. All rights reserved. Permission to use, copy, modify and distribute this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice and this permission notice appear in all copies of this software and that you do not sell the software. Commercial licensing is available by contacting the author. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. volpack-1.0b3/vp_global.h0000644000265600020320000007554205701116552012314 00000000000000/* * vp_global.h * * Non-exported global declarations for VolPack. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ /******************************************************************* * Include files. * *******************************************************************/ #include "config.h" #include "volpack.h" #include #include #include extern double rint ANSI_ARGS((double x)); /* missing from Ultrix math.h */ #ifdef ANSI_C #include #else #include #endif #if STDC_HEADERS || HAVE_STRING_H #include /* An ANSI string.h and pre-ANSI memory.h might conflict. */ #if !STDC_HEADERS && HAVE_MEMORY_H #include #endif /* not STDC_HEADERS and HAVE_MEMORY_H */ #define index strchr #define rindex strrchr #define bcopy(s, d, n) memcpy ((d), (s), (n)) #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #define bzero(s, n) memset ((s), 0, (n)) #else /* not STDC_HEADERS and not HAVE_STRING_H */ #include /* memory.h and strings.h conflict on some systems. */ #endif /* not STDC_HEADERS and not HAVE_STRING_H */ #ifdef HAVE_LORES_TIMER /* use the low-resolution interval timer system call to collect timings */ # define USE_TIMER # include # define DECLARE_TIME(t) struct timeval t # define GET_TIME(vpc, t) gettimeofday(&t) # define STORE_TIME(vpc, code, t0, t1) \ vpc->timer_ticks[code] += ((t1).tv_usec < (t0).tv_usec) ? \ (((t1).tv_sec - (t0).tv_sec)*1000000 - ((t0).tv_usec - (t1).tv_usec)):\ (((t1).tv_sec - (t0).tv_sec)*1000000 + ((t1).tv_usec - (t0).tv_usec)); #endif #ifdef HAVE_HIRES_TIMER /* use the high-resolution memory-mapped timer to collect timings (available only on certain SGI architectures) */ # define USE_TIMER # include # include # include # include # define DECLARE_TIME(t) unsigned t # define GET_TIME(vpc, t) t = *vpc->timer_addr # define STORE_TIME(vpc, code, t0, t1) \ vpc->timer_ticks[code] += ((t1) < (t0)) ? \ ((0xFFFFFFFF - (t0)) + (t1)) : ((t1) - (t0)); # define DECLARE_HIRES_TIME(t) DECLARE_TIME(t) # define GET_HIRES_TIME(vpc, t) GET_TIME(vpc, t) # define STORE_HIRES_TIME(vpc, code, t0, t1) STORE_TIME(vpc, code, t0, t1) # define COPY_HIRES_TIME(t0, t1) t0 = t1 #else # define DECLARE_HIRES_TIME(t) # define GET_HIRES_TIME(vpc, t) # define STORE_HIRES_TIME(vpc, code, t0, t1) # define COPY_HIRES_TIME(t0, t1) #endif #ifndef USE_TIMER # define DECLARE_TIME(t) # define GET_TIME(vpc, t) # define STORE_TIME(vpc, code, t0, t1) #endif /******************************************************************* * Constants. * *******************************************************************/ /* rendering algorithms */ #define USE_RLEVOLUME 10 /* use classified, run-length encoded volume */ #define USE_RAWVOLUME 11 /* use raw volume (with octree if present) */ /* shading modes */ #define CALLBACK_SHADER 20 #define LOOKUP_SHADER 21 /* surfaces */ #define EXT_SURFACE 0 #define INT_SURFACE 1 /* material property indexes */ #define MATL_AMB_R 0 /* ambient red coefficient */ #define MATL_DIFF_R 1 /* diffuse red coefficient */ #define MATL_SPEC_R 2 /* specular red coefficient */ #define MATL_AMB_G 3 /* ambient green coefficient */ #define MATL_DIFF_G 4 /* diffuse green coefficient */ #define MATL_SPEC_G 5 /* specular green coefficient */ #define MATL_AMB_B 6 /* ambient blue coefficient */ #define MATL_DIFF_B 7 /* diffuse blue coefficient */ #define MATL_SPEC_B 8 /* specular blue coefficient */ #define MATL_SHINY 9 /* specular exponent */ #define NUM_MATL_PROPS 10 /* default material properties */ #define DEFAULT_AMBIENT (0.1*255.0) #define DEFAULT_DIFFUSE (0.4*255.0) #define DEFAULT_SPECULAR (0.5*255.0) #define DEFAULT_SHINYNESS 10.0 /* default depth cueing parameters */ #define DEFAULT_DC_QUANTIZATION (1./255.) /* quantization */ /* size of lookup table for filter kernel used in the 2D warp */ #define WARP_WEIGHT_INDEX_BITS 6 #define WARP_WEIGHT_ENTRIES (1 << WARP_WEIGHT_INDEX_BITS) /* constants for MinMaxOctree and fast classification */ #define VP_MAX_OCTREE_LEVELS 16 /* maximum number of levels in octree; each side of volume can be at most (2^VP_MAX_OCTREE_LEVELS)* base_node_size */ #define MM_K_BIT 4 /* bits in child_octant field of */ #define MM_J_BIT 2 /* MMOctreeLevel */ #define MM_I_BIT 1 #define MM_EMPTY 0 /* node is transparent */ #define MM_FULL 1 /* node is non-transparent */ #define MM_PARTFULL 2 /* node is neither transparent nor opaque and is not a leaf */ #define INDEX_RUN_IS_ZERO 0x7000 /* bit to indicate a run in an index volume is a zero run */ /******************************************************************* * Macros. * *******************************************************************/ #define NULL 0 #define MAX(a,b) (((a)<(b)) ? (b) : (a)) #define MIN(a,b) (((a)>(b)) ? (b) : (a)) /* Alloc: allocate memory */ #define Alloc(context, ptr, type, size, use) \ { \ (ptr) = (type)malloc((unsigned)(size)); \ if ((ptr) == NULL) \ VPBug("out of memory"); \ if ((context)->log_alloc_func != NULL) \ (context)->log_alloc_func((ptr),(size),(use), \ __LINE__,__FILE__,(context)->client_data); \ } /* Dealloc: free memory */ #define Dealloc(context, ptr) \ { \ if ((context)->log_free_func != NULL) \ (context)->log_free_func(ptr, (context)->client_data); \ free((void *)ptr); \ } /* Debug: print debugging information */ #ifdef DEBUG #define Debug(x) VPDebug x #else #define Debug(x) #endif /* assertions */ #ifdef ASSERTIONS #define ASSERT(expr) \ if (!(expr)) \ VPBug("assertion failed on line %d of file %s", \ __LINE__, __FILE__) #else #define ASSERT(expr) #endif /* ReportStatus: call a callback to give a progress report */ #define ReportStatus(context, frac) \ if ((context)->status_func != NULL) \ (context)->status_func(frac, (context)->client_data) /* macros for accessing the fields of a voxel */ #define ByteField(voxel, offset) (*((unsigned char *)(voxel) + (offset))) #define ShortField(voxel, offset) (*((unsigned short *)((char *)(voxel)+\ (offset)))) #define IntField(voxel, offset) (*((unsigned *)((char *)(voxel)+(offset)))) #define VoxelField(voxel, offset, size) \ (((size) == 1) ? ByteField(voxel, offset) : \ ((size) == 2) ? ShortField(voxel, offset) : \ IntField(voxel, offset)) /******************************************************************* * Type definitions. * *******************************************************************/ /* ScanOffset: offsets to beginning of a run-length encoded voxel scanline */ typedef struct { /* ScanOffset */ int first_len; /* byte offset to first run length */ int first_data; /* byte offset to first voxel data */ } ScanOffset; #ifdef INDEX_VOLUME /* VoxelLocation: pointer to the run containing a voxel and the position of the voxel in the run */ typedef struct { /* VoxelLocation */ unsigned char run_count; /* number of voxels in run starting from this voxel (run_count = run_len for first voxel in run, run_count = 1 for last voxel in run) */ unsigned char len_offset; /* offset in bytes from first run length for scanline to run length for voxel */ short data_offset; /* offset in bytes from first voxel data for scanline to data for voxel, or -1 if voxel has no data (zero run) */ } VoxelLocation; #endif /* INDEX_VOLUME */ /* RLEVoxels: a run-length encoding of a classified volume for one of the three principal viewing axes */ typedef struct { /* RLEVoxels */ int ilen, jlen, klen; /* size of each dimension */ int run_count; /* number of runs */ unsigned char *run_lengths; /* length of each run */ int data_count; /* number of entries in data */ void *data; /* data */ int scan_offsets_per_slice; /* number of entries in scan_offsets for each slice of voxel data */ ScanOffset *scan_offsets; /* array of offsets to scanlines */ int mmapped; /* true if pointers point to memory-mapped data */ #ifdef INDEX_VOLUME VoxelLocation *voxel_index; /* index for experimental ERT code */ #endif } RLEVoxels; /* RunData: statistics about the runs in a scanline of voxels */ typedef struct { /* RunData */ short run_length; /* length of current run */ short next_index; /* index of next voxel in current scanline */ union { struct { /* data for pass 1 (ClassifyRawScanline) */ short run_count; /* number of runs in scanline */ short non_zero_count; /* number of nontransparent voxels in scanline */ } p1; struct { /* data for pass 2 (RepackClassifiedVolume)*/ unsigned data_offset; /* byte offset for storage for voxel */ unsigned length_offset; /* byte offset for storage for runlength */ } p2; } p; } RunData; /* GBuffer: growable buffer (a singly-linked list of buffers) */ #define GBUFFER_SIZE 1024 /* number of bytes per list element (to optimize memory performance, size should be small enough so that at least two buffers fit in the cache) */ typedef struct _gbuffer { /* GBuffer */ int bytes_left; /* size of unallocated space */ char *data_ptr; /* pointer to next available byte */ struct _gbuffer *next; /* next buffer in list */ char data[GBUFFER_SIZE]; /* data */ } GBuffer; /* ConstructionBuffer: buffer for storing data while constructing a classified volume */ typedef struct { /* ConstructionBuffer */ RunData *rundata_y; /* statistics for y-axis runs (2D array) index: x*zlen + z */ RunData *rundata_z; /* statistics for z-axis runs (2D array) index: y*xlen + x */ GBuffer *data_buf_head; /* first buffer for storing voxels */ GBuffer *data_buf_tail; /* last buffer in list */ GBuffer *lengths_buf_head; /* first buffer for storing run lengths */ GBuffer *lengths_buf_tail; /* last buffer in list */ int non_zero_count; /* number of nonzero voxels in data bufs */ int x_run_count; /* number of z-axis runs seen so far */ unsigned char octree_runs[VP_MAX_VOLUME_DIM]; /* estimated run lengths from octree */ int octree_scans_left; /* number of scanlines until octree_runs must be recomputed */ int next_z; /* z coordinate of next scanline */ int next_y; /* y coordinate of next scanline */ } ConstructionBuffer; /* MinMaxOctree: min-max octree representation of the volume for fast classification */ typedef struct { /* MinMaxOctree */ int levels; /* number of levels in octree level 0 = root = lowest detail level levels-1 = base = finest detail */ int root_node_size; /* voxels/side for root level */ int base_node_size; /* voxels/side for base level */ int range_bytes_per_node; /* bytes/node for min/max data */ int base_bytes_per_node; /* bytes/node for base level (min/max data + status) */ int nonbase_bytes_per_node; /* bytes/node for non-base level (min/max data + status + ptr to child) */ int node_offset[VP_MAX_FIELDS]; /* offset to min/max data for each parameter in a node; min comes first */ int status_offset; /* offset to status field */ int child_offset; /* offset to child field */ void *root; /* storage for the octree, and a pointer to the root node */ int octree_bytes; /* bytes of storage for the octree */ /* * Layout of an octree node: * * Nodes at level 0 (root) through levels-2 are nonbase_bytes_per_node * bytes long. This space is divided into a number of fields as follows: * * minimum value for parameter 0 of the classification function * maximum value for parameter 0 * minimum value for parameter 1 * maximum value for parameter 1 * . * . * . * minimum value for parameter num_clsfy_params-1 * maximum value for parameter num_clsfy_params-1 * status field * child field * * The min/max fields are the same size as the corresponding * classification parameters (one or two bytes; four bytes not allowed). * Node_offset[] gives offsets to the min field for each parameter. * * The status field is a one byte field which is filled in during * classification of the volume (VPClassifyOctree). The possible * values are MM_EMPTY (node is transparent), MM_FULL (node has * no transparent children), or MM_PARTFULL. Status_offset * gives the offset to this field from the beginning of the node. * * The child field is a one word field which gives the number of * bytes from the root of the octree to the first child node of * this node. The remaining 7 children follow right after the * first child. Child_offset gives the offset to this field * from the beginning of the node. * * There may be additional bytes of padding in between fields * to satisfy alignment restrictions. This could make the code * non-portable on machines with bizarre requirements. * * Nodes at level levels-1 are base_bytes_per_node long and contain * the same fields except there is no child field. * * NOTE: As you can probably tell, I'm simulating a C structure here. * Unfortunately I can't use a real structure because I don't know the * number of fields in advance: it depends on the number and * size of the classification parameters. */ } MinMaxOctree; /* MMOctreeLevel: data associated with one level of the min-max octree during * a depth first traversal; this data is used to compute which octree * nodes intersect the current scanline of interest */ typedef struct { /* MMOctreeLevel */ int level_size; /* voxels/side for a node at this level */ int child_octant; /* octant number of first child to visit when a scanline intersects a node at this level */ int child_offset1; /* offset (in bytes) of first child to visit relative to child 0 */ int child_offset2; /* offset (in bytes) of second child to visit relative to child 0 */ void *child2; /* points to 2nd child if first is begin visit; NULL otherwise */ } MMOctreeLevel; /* GrayIntPixel: grayscale intermediate image pixel */ typedef struct { /* GrayIntPixel */ float clrflt; /* color */ float opcflt; /* opacity */ short lnk; /* early-ray termination link */ unsigned char zratio; /* integer part of opacity correction exponent (perspective only) */ unsigned char zfrac; /* fractional part of opacity correction exponent (perspective only) */ } GrayIntPixel; /* RGBIntPixel: RGB intermediate image pixel */ typedef struct { /* RGBIntPixel */ float rclrflt; /* color (red channel) */ float gclrflt; /* color (green channel) */ float bclrflt; /* color (blue channel) */ float opcflt; /* opacity */ short lnk; /* early-ray termination link */ unsigned char zratio; /* integer part of opacity correction exponent (perspective only) */ unsigned char zfrac; /* fractional part of opacity correction exponent (perspective only) */ } RGBIntPixel; /* Trapezoid: a trapezoidal region of the output image (used to record * intersection of the intermediate and final images) */ typedef struct { /* all coordinates are in the coordinate system of the final image */ int miny; /* first scanline of the final image which overlaps the trapezoid */ int maxy; /* last scanline of the final image which overlaps the trapezoid */ double x_top_lft; /* left edge of the trapezoid at y = miny */ double x_top_rgt; /* right edge of the trapezoid at y = miny */ double x_incr_lft; /* increment to add to x_top_lft to get the left edge of the trapezoid at the next y */ double x_incr_rgt; /* increment to add to x_top_rgt to get the right edge of the trapezoid at the next y */ } Trapezoid; /* vpContext: rendering context */ struct _vp_context { /* vpContext */ /* *** USER-SPECIFIED PARAMETERS *** */ /* raw volume data layout */ int xlen, ylen, zlen; /* voxels in each dimension */ short raw_bytes_per_voxel; /* size of raw voxel in bytes */ short num_voxel_fields; /* number of fields in the voxel */ short num_shade_fields; /* # of voxel fields for shading */ short field_size[VP_MAX_FIELDS]; /* size of each field in bytes */ short field_offset[VP_MAX_FIELDS]; /* byte offset for each field */ int field_max[VP_MAX_FIELDS]; /* maximum value of each field */ void *raw_voxels; /* voxel data */ int raw_voxels_size; /* size of raw_voxels in bytes */ int xstride, ystride, zstride; /* byte stride for each dimension */ /* classification specification */ double min_opacity; /* low opacity threshold (0.0-1.0) */ int num_clsfy_params; /* # of params for classification */ int param_field[VP_MAX_FIELDS]; /* voxel field # for each param */ float *clsfy_table[VP_MAX_FIELDS]; /* lookup table for each parameter */ int clsfy_table_size[VP_MAX_FIELDS]; /* size of each table in bytes */ /* shading specification */ int color_channels; /* number of color channels */ int shading_mode; /* type of shader to use */ float *shade_color_table; /* lookup table for LOOKUP_SHADER */ int shade_color_table_size; /* size of shade table in bytes */ float *shade_weight_table; /* lookup table for LOOKUP_SHADER */ int shade_weight_table_size; /* size of weight table in bytes */ short num_materials; /* # of material types in tables */ short color_field; /* voxel field # for color index */ short weight_field; /* field # for weight index */ /* material properties for each material and surface side */ double matl_props[VP_MAX_MATERIAL][2][NUM_MATL_PROPS]; /* 0.0-255.0 */ /* lighting properties */ short light_enable[VP_MAX_LIGHTS]; /* enable each light */ vpVector4 light_vector[VP_MAX_LIGHTS]; /* normalized light direction vectors (in eye coordinates) */ vpVector3 light_color[VP_MAX_LIGHTS]; /* light colors (0.0-1.0) */ int light_both_sides; /* use two-sided lighting */ int reverse_surface_sides; /* reverse interior and exterior */ /* depth cueing parameters */ short dc_enable; /* true to enable depth cueing */ double dc_front_factor; /* front depth cueing factor */ double dc_density; /* fog density for depth cueing */ int dc_table_len_hint; /* hint for dc_table_len */ double dc_quantization; /* minimum resolvable depth */ /* view specification */ vpMatrix4 transforms[3]; /* transformation matrices (VP_MODEL, VP_VIEW and VP_PROJECT) */ short current_matrix; /* current matrix */ int concat_left; /* if true, concatenate matrices on left instead of on right */ int axis_override; /* if not equal to VP_NO_AXIS then this is an axis number (e.g. VP_X_AXIS) that overrides the computed value of best_view_axis */ /* result image */ void *image; /* memory for image */ int image_width; /* image dimensions */ int image_height; short image_bytes_per_scan; /* size of scanline (with padding) */ int pixel_type; /* format for pixels (e.g. VP_RGB) */ /* rendering parameters */ double max_opacity; /* high opacity threshold */ short int_image_width_hint; /* hint for size of int. image */ short int_image_height_hint; short clamp_shade_table; /* clamp shade table entries */ /* min-max octree parameters */ int param_maxrange[VP_MAX_FIELDS]; /* max. range of values allowed in an mm_octree node w/o subdividing it */ /* preclassified volume parameters */ short rle_bytes_per_voxel; /* bytes per voxel in RLEVoxels */ int skip_rle_x; /* if true, don't compute rle_x */ int skip_rle_y; /* if true, don't compute rle_y */ int skip_rle_z; /* if true, don't compute rle_z */ /* parameters for rendering shadows */ short enable_shadows; /* if true, enable shadows */ short shadow_light_num; /* light source id (VP_LIGHT#) for the light producing the shadows */ short shadow_width_hint; /* hint for width of shadow buffer */ short shadow_height_hint; /* hint for height of shadow buffer */ float *shadow_color_table; /* lookup table for LOOKUP_SHADER */ int shadow_color_table_size; /* size of shade table in bytes */ int shadow_bias; /* shadow bias distance */ /* *** USER-SPECIFIED PARAMETERS THAT ARE NOT STORED IN CONTEXT FILE *** */ /* dummy variable marking the boundary between state variables stored in volpack context files and those that are not; the value of this variable is never used or set */ int end_of_parameters; /* callback functions */ void (*shade_func)(); /* shade a voxel */ int (*write_func) ANSI_ARGS((int, void *, unsigned)); /* write to file */ int (*read_func) ANSI_ARGS((int, void *, unsigned)); /* read from file */ void *(*mmap_func) ANSI_ARGS((int, unsigned, void *));/* memory map file */ void (*log_alloc_func) ANSI_ARGS((void *,int,char *,int,char *,void *)); /* log memory allocation */ void (*log_free_func) ANSI_ARGS((void *, void *)); /* log memory deallocation */ void (*status_func) ANSI_ARGS((double, void *)); /* give progress report */ /* client data */ void *client_data; /* hook for client data structure */ /* resampling filter for vpResample */ int filter_num_taps; /* number of filter taps */ int filter_num_phases; /* number of filter phases */ float *filter_weights; /* table of filter weights (weights[num_phases][num_taps]) */ /* *** INTERNAL DATA STRUCTURES *** */ /* data structures for fast classification */ MinMaxOctree *mm_octree; /* min-max octree version of volume */ unsigned *sum_table; /* summed area table */ int sum_table_size; /* size of summed area table (bytes) */ /* classified, run-length encoded volume data */ RLEVoxels *rle_x; /* RLE data for X viewing axis */ RLEVoxels *rle_y; /* RLE data for Y viewing axis */ RLEVoxels *rle_z; /* RLE data for Z viewing axis */ ConstructionBuffer *cbuf; /* buffer for constructing volume */ /* factored viewing parameters */ short factored_view_ready; /* true if factored view is current */ short affine_view; /* true for affine transformation */ short best_view_axis; /* principal viewing axis */ short reverse_slice_order; /* compositing direction */ short intermediate_width; /* size of intermediate image */ short intermediate_height; double shear_i; /* shear coefficients */ double shear_j; double trans_i; /* translation coefficients */ double trans_j; vpMatrix3 warp_2d; /* final 2D transformation */ double depth_000; /* depth of first voxel in volume */ double depth_di; /* change in depth per unit i */ double depth_dj; /* change in depth per unit j */ double depth_dk; /* change in depth per unit k */ /* work buffers for rendering */ short max_intermediate_width; /* size of intermediate image buffer */ short max_intermediate_height; short max_scan_length; /* size of scanline buffers */ short intermediate_color_channels; /* color channels in int. image */ short pad_int_to_maxwidth; /* pad intermediate image scanlines */ union { /* intermediate image (2D array) */ GrayIntPixel *gray_intim; RGBIntPixel *rgb_intim; } int_image; /* parameters and data structures for shadows */ double shadow_shear_i; /* shear coeffs for light vector */ double shadow_shear_j; double shadow_trans_i; /* trans. coeffs for light vector */ double shadow_trans_j; short shadow_width; /* size of image in shadow buffer */ short shadow_height; short max_shadow_width; /* size of shadow buffer */ short max_shadow_height; short pad_shadow_to_maxwidth; /* pad shadow buffer scanlines */ GrayIntPixel *shadow_buffer; /* 2D shadow buffer */ /* depth cueing */ float *dc_table; /* depth cueing lookup table */ int dc_table_len; /* number of entries in dc_table */ /* opacity correction */ float affine_opac_correct[VP_OPACITY_MAX+1]; /* maps opacity (0-255) to opacity corrected for view (0.0-1.0) */ float shadow_opac_correct[VP_OPACITY_MAX+1]; /* opacity correction for shadow buffer calculation */ /* debugging info */ vpResult error_code; /* result code from first invalid command since last call to vpGetError() */ #ifdef DEBUG short debug_enable[VPDEBUG_COUNT]; /* flags to enable messages */ int trace_u, trace_v; /* intermediate image pixel to trace */ int trace_shadow_k; /* slice of interest for tracing shadow opacity values */ #endif #ifdef USE_TIMER unsigned timer_ticks[VPTIMER_COUNT];/* timer values in ticks */ double timer_usec_per_tick; /* microseconds per tick */ #ifdef HAVE_HIRES_TIMER volatile unsigned *timer_addr; /* address of the timer */ unsigned dummy_timer; /* dummy location */ #endif #endif }; /******************************************************************* * Function prototypes. * *******************************************************************/ /* vp_context.c */ /* vp_check.c */ extern vpResult VPCheckVoxelFields ANSI_ARGS((vpContext *vpc)); extern vpResult VPCheckRawVolume ANSI_ARGS((vpContext *vpc)); extern vpResult VPCheckClassifiedVolume ANSI_ARGS(( vpContext *vpc, int axis)); extern vpResult VPCheckClassifier ANSI_ARGS((vpContext *vpc)); extern vpResult VPCheckShader ANSI_ARGS((vpContext *vpc)); extern vpResult VPCheckImage ANSI_ARGS((vpContext *vpc)); extern vpResult VPCheckShadows ANSI_ARGS((vpContext *vpc)); extern vpResult VPSetError ANSI_ARGS((vpContext *vpc, vpResult code)); /* vp_extract.c */ extern vpResult VPClassifyBlock ANSI_ARGS((vpContext *vpc, int correct, int x0, int y0, int z0, int x1, int y1, int z1, float *opc, int dst_xstride, int dst_ystride, int dst_zstride)); extern float VPClassifyVoxel ANSI_ARGS((vpContext *vpc, void *voxel)); extern vpResult VPShadeBlock ANSI_ARGS((vpContext *vpc, int x0, int y0, int z0, int x1, int y1, int z1, float *shd, int dst_xstride, int dst_ystride, int dst_zstride)); extern void VPQuantize ANSI_ARGS((float *src, int xlen, int ylen, int zlen, double scale, int maxvalue, unsigned char *dst, int dst_xstride, int dst_ystride, int dst_zstride)); /* vp_linalg.c */ extern void VPLoadTranslation ANSI_ARGS((vpMatrix4 m, double tx, double ty, double tz)); extern void VPLoadRotation ANSI_ARGS((vpMatrix4 m, int axis, double degrees)); extern void VPLoadScale ANSI_ARGS((vpMatrix4 m, double sx, double sy, double sz)); /* vp_view.c */ extern vpResult VPFactorView ANSI_ARGS((vpContext *vpc)); extern void VPComputeViewTransform ANSI_ARGS((vpContext *vpc, vpMatrix4 vm)); extern void VPResizeRenderBuffers ANSI_ARGS((vpContext *vpc, int max_width, int max_height, int max_scan)); extern void VPResizeDepthCueTable ANSI_ARGS((vpContext *vpc, int entries, int copy)); extern void VPComputeDepthCueTable ANSI_ARGS((vpContext *vpc, int first, int last)); extern float VPSliceDepthCueRatio ANSI_ARGS((vpContext *vpc)); extern void VPDepthCueIntImage ANSI_ARGS((vpContext *vpc, int slicenum)); extern void VPResizeShadowBuffer ANSI_ARGS((vpContext *vpc, int max_width, int max_height)); /* vp_util.c */ extern void VPBug ANSI_ARGS((char *fmt, ...)); #ifdef DEBUG extern void VPDebug ANSI_ARGS((vpContext *vpc, int debug_code, char *fmt, ...)); #endif /* DEBUG */ /* vp_rle.c */ extern RLEVoxels * VPCreateRLEVoxels ANSI_ARGS((vpContext *vpc, int ilen, int jlen, int klen, int data_count, int run_count, int rle_bytes_per_voxel)); extern void VPDestroyRLEVoxels ANSI_ARGS((vpContext *vpc, RLEVoxels *rle_voxels)); #ifdef INDEX_VOLUME extern vpResult VPComputeRLEScanOffsets ANSI_ARGS(( vpContext *vpc)); #endif #ifdef DEBUG extern void VPCheckScanOffsets ANSI_ARGS(( RLEVoxels *rle_voxels, int rle_bytes_per_voxel)); extern void VPValidateClassifiedVolume ANSI_ARGS(( vpContext *vpc)); extern void VPDumpView ANSI_ARGS((vpContext *vpc)); extern void VPDumpClassifier ANSI_ARGS((vpContext *vpc)); #endif /* vp_renderA.c */ extern void VPRenderAffine ANSI_ARGS((vpContext *vpc, int algorithm, void (*composite_func)())); /* vp_octree.c */ extern void VPComputeSummedAreaTable ANSI_ARGS(( vpContext *vpc)); extern void VPClassifyOctree ANSI_ARGS((vpContext *vpc)); extern void VPInitOctreeLevelStack ANSI_ARGS((vpContext *vpc, MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS], int axis, int k)); extern int VPComputeScanRuns ANSI_ARGS((vpContext *vpc, MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS], unsigned char *run_lengths, int axis, int j, int icount)); extern int VPCheckRuns ANSI_ARGS((vpContext *vpc, unsigned char *run_lengths, int axis, int k, int j)); extern void VPTestMinMaxOctree ANSI_ARGS((vpContext *vpc)); /* vp_warp.c */ extern void VPComputeWarpTables ANSI_ARGS((void)); extern void VPAffineImageOverlap ANSI_ARGS((int in_width, int in_height, int out_width, int out_height, vpMatrix3 warp_matrix, double filter_width, Trapezoid full_overlap[9], Trapezoid part_overlap[9])); volpack-1.0b3/vp_octree.c0000644000265600020320000014413105701116541012315 00000000000000/* * vp_octree.c * * Routines to create and destroy MinMaxOctree objects for fast classification. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.23 $ */ #include "vp_global.h" /* * OctantOrder: octant traversal order, depending on best_view_axis */ static int OctantOrder[3][8] = { { 0, 2, 4, 6, 1, 3, 5, 7 }, /* VP_X_AXIS */ { 0, 4, 1, 5, 2, 6, 3, 7 }, /* VP_Y_AXIS */ { 0, 1, 2, 3, 4, 5, 6, 7 } /* VP_Z_AXIS */ }; static void CreatePyramid ANSI_ARGS((vpContext *vpc, void *mm_pyramid[VP_MAX_OCTREE_LEVELS])); static void DescendPyramid ANSI_ARGS((vpContext *vpc, void *mm_pyramid[VP_MAX_OCTREE_LEVELS], int level, int x, int y, int z, int nodes_per_side, void *parent_node, int *octree_offset)); static void Compute1DSummedAreaTable ANSI_ARGS((vpContext *vpc)); static void Compute2DSummedAreaTable ANSI_ARGS((vpContext *vpc)); static void ClassifyOctree1 ANSI_ARGS((vpContext *vpc)); static void ClassifyOctree2 ANSI_ARGS((vpContext *vpc)); static void ComputeOctreeMask ANSI_ARGS((vpContext *vpc, int level, int xn, int yn, int zn, int node_size, void *parent_node, unsigned char *array, int max_level)); /* * vpCreateMinMaxOctree * * Create a MinMaxOctree representation of the volume for fast classification. */ vpResult vpCreateMinMaxOctree(vpc, root_node_size, base_node_size) vpContext *vpc; int root_node_size; /* ignored for now */ int base_node_size; /* controls level of detail of smallest nodes */ { int max_dim, retcode, p, f; int field_size; int bytes_per_node; int level_size, levels; void *mm_pyramid[VP_MAX_OCTREE_LEVELS]; int octree_offset; /* check for errors */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); if (vpc->num_clsfy_params <= 0 || vpc->num_clsfy_params > vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); for (p = 0; p < vpc->num_clsfy_params; p++) { f = vpc->param_field[p]; if (f < 0 || f >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); if (p > 0 && f <= vpc->param_field[p-1]) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); } max_dim = vpc->xlen; if (vpc->ylen > max_dim) max_dim = vpc->ylen; if (vpc->zlen > max_dim) max_dim = vpc->zlen; switch (base_node_size) { /* must be a power of 2 */ case 1: case 2: case 4: case 8: case 16: case 32: case 64: case 128: case 256: case 512: break; default: return(VPSetError(vpc, VPERROR_BAD_VALUE)); } for (p = 0; p < vpc->num_clsfy_params; p++) { if (vpc->field_size[vpc->param_field[p]] == 4) return(VPSetError(vpc, VPERROR_BAD_CLASSIFIER)); } /* allocate mm_octree structure */ Alloc(vpc, vpc->mm_octree, MinMaxOctree *, sizeof(MinMaxOctree), "MinMaxOctree"); bzero(vpc->mm_octree, sizeof(MinMaxOctree)); vpc->mm_octree->base_node_size = base_node_size; /* compute field sizes */ bytes_per_node = 0; for (p = 0; p < vpc->num_clsfy_params; p++) { vpc->mm_octree->node_offset[p] = bytes_per_node; bytes_per_node += 2 * vpc->field_size[vpc->param_field[p]]; } vpc->mm_octree->range_bytes_per_node = bytes_per_node; vpc->mm_octree->status_offset = bytes_per_node; bytes_per_node++; /* add byte for status field */ bytes_per_node = (bytes_per_node + 1) & ~1; /* align to short boundary */ vpc->mm_octree->base_bytes_per_node = bytes_per_node; bytes_per_node = (bytes_per_node + 3) & ~3; /* align to word boundary */ vpc->mm_octree->child_offset = bytes_per_node; bytes_per_node += sizeof(unsigned); /* add word for child field */ vpc->mm_octree->nonbase_bytes_per_node = bytes_per_node; /* compute number of levels */ levels = 1; level_size = base_node_size; while (level_size < max_dim) { level_size *= 2; levels++; } if (levels >= VP_MAX_OCTREE_LEVELS) { vpDestroyMinMaxOctree(vpc); return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); } vpc->mm_octree->levels = levels; vpc->mm_octree->root_node_size = level_size; /* build a min-max pyramid representation of the volume */ CreatePyramid(vpc, mm_pyramid); /* determine how much space is needed for the octree nodes */ octree_offset = vpc->mm_octree->nonbase_bytes_per_node; /* root node */ DescendPyramid(vpc, mm_pyramid, 0, 0, 0, 0, 1, NULL, &octree_offset); /* create the min-max octree nodes */ Alloc(vpc, vpc->mm_octree->root, void *, octree_offset, "mm_octree"); vpc->mm_octree->octree_bytes = octree_offset; octree_offset = vpc->mm_octree->nonbase_bytes_per_node; Debug((vpc, VPDEBUG_OCTREE, "Octree:\n")); DescendPyramid(vpc, mm_pyramid, 0, 0, 0, 0, 1, vpc->mm_octree->root, &octree_offset); /* clean up and return */ Dealloc(vpc, mm_pyramid[0]); return(VP_OK); } /* * vpDestroyMinMaxOctree * * Destroy the MinMaxOctree representation of the volume. */ vpResult vpDestroyMinMaxOctree(vpc) vpContext *vpc; { if (vpc->mm_octree != NULL) { if (vpc->mm_octree->root != NULL) { Dealloc(vpc, vpc->mm_octree->root); vpc->mm_octree->root = NULL; } Dealloc(vpc, vpc->mm_octree); vpc->mm_octree = NULL; } return(VP_OK); } /* * CreatePyramid * * Create a min-max pyramid representation of the volume. */ static void CreatePyramid(vpc, mm_pyramid) vpContext *vpc; void *mm_pyramid[VP_MAX_OCTREE_LEVELS]; { int pyr_size; /* size of pyramid in bytes */ int level, pyr_levels; /* current, total pyramid levels */ int level_offset; /* byte offset to beginning of level */ int nodes_per_side; /* nodes per side at current level */ int node_size; /* voxels per side in node */ char *pyr_node; /* current node of pyramid */ char *pyr_src; /* pyramid node being read */ char *pyr_dst; /* pyramid node being written */ char *voxel; /* voxel being read */ int x, y, z; /* coordinates of current pyramid node */ int nx, ny, nz; /* coordinates of voxel within node */ int xlen, ylen, zlen; /* size of volume */ int voxel_xstride; /* volume strides */ int voxel_ystride; int voxel_zstride; int param_size[VP_MAX_FIELDS]; /* size of each parameter */ int param_offset[VP_MAX_FIELDS];/* voxel offset of each parameter */ int node_offset[VP_MAX_FIELDS]; /* offset of parameter in octree node */ int max_value[VP_MAX_FIELDS]; /* max. value of each parameter in node */ int min_value[VP_MAX_FIELDS]; /* min. value of each parameter in node */ int num_params; /* number of params for classifier */ int p; /* parameter number */ int value; /* parameter value */ int pyr_bytes_per_node; /* size of node in bytes */ int pyr_offsets[8]; /* offsets from pyr_src to each of its neighbors (0,+X,+Y,+XY,+Z,+XZ,+YZ,+XYZ) */ int elem; /* index into pyr_offsets */ /* allocate space for pyramid */ ASSERT(vpc->mm_octree != NULL); ASSERT(vpc->mm_octree->levels > 0); ASSERT(vpc->xlen > 0); ASSERT(vpc->raw_voxels != NULL); ASSERT(vpc->num_clsfy_params > 0); pyr_levels = vpc->mm_octree->levels; pyr_size = vpc->mm_octree->base_bytes_per_node; pyr_bytes_per_node = vpc->mm_octree->range_bytes_per_node; for (level = pyr_levels; level > 0; level--) pyr_size = pyr_size*8 + pyr_bytes_per_node; Alloc(vpc, mm_pyramid[0], void *, pyr_size, "mm_pyramid"); level_offset = pyr_bytes_per_node; nodes_per_side = 1; for (level = 1; level < vpc->mm_octree->levels; level++) { mm_pyramid[level] = (char *)mm_pyramid[level-1] + level_offset; level_offset *= 8; nodes_per_side *= 2; } /* build the base level of the pyramid */ xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; voxel_xstride = vpc->xstride; voxel_ystride = vpc->ystride; voxel_zstride = vpc->zstride; voxel = vpc->raw_voxels; num_params = vpc->num_clsfy_params; for (p = 0; p < num_params; p++) { param_size[p] = vpc->field_size[vpc->param_field[p]]; param_offset[p] = vpc->field_offset[vpc->param_field[p]]; node_offset[p] = vpc->mm_octree->node_offset[p]; } node_size = vpc->mm_octree->base_node_size; pyr_dst = mm_pyramid[pyr_levels-1]; Debug((vpc, VPDEBUG_PYRAMID, "Pyramid Level %d:\n", pyr_levels-1)); for (z = 0; z < nodes_per_side; z++) { ReportStatus(vpc, (double)z / (double)nodes_per_side); for (y = 0; y < nodes_per_side; y++) { for (x = 0; x < nodes_per_side; x++) { /* clear the min/max values for the current node */ for (p = 0; p < num_params; p++) { max_value[p] = -1; min_value[p] = 65536; } /* loop over voxels in the node */ if (z * node_size >= zlen || y * node_size >= ylen || x * node_size >= xlen) { for (p = 0; p < num_params; p++) { max_value[p] = 0; min_value[p] = 0; } voxel += node_size * voxel_zstride; } else for (nz = 0; nz < node_size; nz++) { if (z * node_size + nz >= zlen) { voxel += (node_size - nz) * voxel_zstride; break; } for (ny = 0; ny < node_size; ny++) { if (y * node_size + ny >= ylen) { voxel += (node_size - ny) * voxel_ystride; break; } for (nx = 0; nx < node_size; nx++) { if (x * node_size + nx >= xlen) { voxel += (node_size - nx) * voxel_xstride; break; } /* compare each field against current min/max */ for (p = 0; p < num_params; p++) { ASSERT(voxel == (char *)vpc->raw_voxels + (x*node_size+nx)*voxel_xstride + (y*node_size+ny)*voxel_ystride + (z*node_size+nz)*voxel_zstride); value = VoxelField(voxel, param_offset[p], param_size[p]); if (value > max_value[p]) max_value[p] = value; if (value < min_value[p]) min_value[p] = value; } voxel += voxel_xstride; } /* for nx */ voxel += voxel_ystride - node_size*voxel_xstride; } /* for ny */ voxel += voxel_zstride - node_size*voxel_ystride; } /* for nz */ /* store the min/max values for this node */ Debug((vpc, VPDEBUG_PYRAMID, " Node %d,%d,%d:\n", x, y, z)); for (p = 0; p < num_params; p++) { ASSERT(max_value[p] >= 0 && max_value[p] < 65536); ASSERT(min_value[p] >= 0 && min_value[p] < 65536); Debug((vpc, VPDEBUG_PYRAMID, " Param %d: min %d, max %d\n", p, min_value[p], max_value[p])); if (param_size[p] == 1) { ByteField(pyr_dst, node_offset[p]) = min_value[p]; ByteField(pyr_dst, node_offset[p]+1) = max_value[p]; } else { ASSERT(param_size[p] == 2); ShortField(pyr_dst, node_offset[p]) = min_value[p]; ShortField(pyr_dst, node_offset[p]+2) = max_value[p]; } } pyr_dst += pyr_bytes_per_node; voxel += node_size * (voxel_xstride - voxel_zstride); } /* for x */ voxel += node_size*(voxel_ystride - nodes_per_side*voxel_xstride); } /* for y */ voxel += node_size*(voxel_zstride - nodes_per_side*voxel_ystride); } /* for z */ ReportStatus(vpc, 1.0); /* build the rest of the pyramid */ for (level = pyr_levels-2; level >= 0; level--) { ReportStatus(vpc, 1. - (double)(level+1)/(double)(pyr_levels-1)); Debug((vpc, VPDEBUG_PYRAMID, "Pyramid Level %d:\n", level)); pyr_dst = mm_pyramid[level]; pyr_node = mm_pyramid[level+1]; pyr_offsets[0] = 0; pyr_offsets[1] = pyr_bytes_per_node; pyr_offsets[2] = nodes_per_side * pyr_bytes_per_node; pyr_offsets[3] = pyr_offsets[2] + pyr_bytes_per_node; pyr_offsets[4] = pyr_offsets[2] * nodes_per_side; pyr_offsets[5] = pyr_offsets[4] + pyr_bytes_per_node; pyr_offsets[6] = pyr_offsets[4] + pyr_offsets[2]; pyr_offsets[7] = pyr_offsets[6] + pyr_bytes_per_node; node_size *= 2; nodes_per_side /= 2; for (z = 0; z < nodes_per_side; z++) { for (y = 0; y < nodes_per_side; y++) { for (x = 0; x < nodes_per_side; x++) { /* clear the min/max values for the current node */ for (p = 0; p < num_params; p++) { max_value[p] = -1; min_value[p] = 65536; } /* loop over the eight children of this node */ for (elem = 0; elem < 8; elem++) { pyr_src = pyr_node + pyr_offsets[elem]; /* compare min/max values of children with current min/max values for the node */ for (p = 0; p < num_params; p++) { value = VoxelField(pyr_src, node_offset[p], param_size[p]); if (value < min_value[p]) min_value[p] = value; value = VoxelField(pyr_src, node_offset[p] + param_size[p], param_size[p]); if (value > max_value[p]) max_value[p] = value; } } /* store the min/max values for this node */ Debug((vpc, VPDEBUG_PYRAMID, " Node %d,%d,%d:\n",x,y,z)); for (p = 0; p < num_params; p++) { ASSERT(max_value[p] >= 0 && max_value[p] < 65536); ASSERT(min_value[p] >= 0 && min_value[p] < 65536); Debug((vpc, VPDEBUG_PYRAMID, " Param %d: min %d, max %d\n", p, min_value[p], max_value[p])); if (param_size[p] == 1) { ByteField(pyr_dst, node_offset[p]) = min_value[p]; ByteField(pyr_dst, node_offset[p]+1)=max_value[p]; } else { ASSERT(param_size[p] == 2); ShortField(pyr_dst, node_offset[p]) = min_value[p]; ShortField(pyr_dst, node_offset[p]+2)=max_value[p]; } } /* go on to the next node */ pyr_dst += pyr_bytes_per_node; pyr_node += 2*pyr_bytes_per_node; } /* for x */ pyr_node += (2*nodes_per_side)*pyr_bytes_per_node; } /* for y */ pyr_node += (2*nodes_per_side)*(2*nodes_per_side)* pyr_bytes_per_node; } /* for z */ } /* for level */ ReportStatus(vpc, 1.0); } /* * DescendPyramid * * Descend the pyramid recursively, either to count how many nodes will * be copied to the octree (if parent_node == NULL) or to actually copy them. */ static void DescendPyramid(vpc, mm_pyramid, level, x, y, z, nodes_per_side, parent_node, octree_offset) vpContext *vpc; /* context */ void *mm_pyramid[VP_MAX_OCTREE_LEVELS]; /* min-max pyramid */ int level; /* current level */ int x, y, z; /* current node coordinates (in coordinate system of the current level) */ int nodes_per_side; /* # nodes at current level per side of volume */ void *parent_node; /* parent octree node (or NULL) */ int *octree_offset; /* bytes from root of octree to next free location */ { char *pyr_ptr; char *child_node; int p; MinMaxOctree *mm_octree; int pyr_bytes_per_node; int base_bytes_per_node; int nonbase_bytes_per_node; int child_bytes_per_node; int field_size; int field_offset; int child_offset; int range; int subdivide; ASSERT(vpc->mm_octree != NULL); mm_octree = vpc->mm_octree; pyr_bytes_per_node = mm_octree->range_bytes_per_node; base_bytes_per_node = mm_octree->base_bytes_per_node; nonbase_bytes_per_node = mm_octree->nonbase_bytes_per_node; child_offset = mm_octree->child_offset; pyr_ptr = (char *)mm_pyramid[level] + ((z*nodes_per_side + y) * nodes_per_side + x) * pyr_bytes_per_node; /* copy min/max data from pyramid node to octree node */ if (parent_node != NULL) { Debug((vpc, VPDEBUG_OCTREE, " Node at level %d, coords %d,%d,%d, addr 0x%08x\n", level, x, y, z, parent_node)); for (p = 0; p < pyr_bytes_per_node; p++) ByteField(parent_node, p) = ByteField(pyr_ptr, p); } /* descend to next level */ if (level < mm_octree->levels-1) { /* check if we should subdivide node or not */ subdivide = 0; for (p = 0; p < vpc->num_clsfy_params; p++) { field_size = vpc->field_size[vpc->param_field[p]]; field_offset = mm_octree->node_offset[p]; if (field_size == 1) { range = ByteField(pyr_ptr, field_offset+1) - ByteField(pyr_ptr, field_offset); } else { ASSERT(field_size == 2); range = ShortField(pyr_ptr, field_offset+2) - ShortField(pyr_ptr, field_offset); } if (range > vpc->param_maxrange[p]) { subdivide = 1; break; } } if (subdivide) { /* store offset to child */ if (parent_node != NULL) { child_node = (char *)mm_octree->root + *octree_offset; IntField(parent_node, child_offset) = *octree_offset; Debug((vpc, VPDEBUG_OCTREE, " Storing children at offset = %d, addr = 0x%08x\n", *octree_offset, child_node)); } if (level == mm_octree->levels-2) child_bytes_per_node = base_bytes_per_node; else child_bytes_per_node = nonbase_bytes_per_node; *octree_offset += 8 * child_bytes_per_node; if (parent_node == NULL) { child_node = NULL; child_bytes_per_node = 0; } /* visit children */ DescendPyramid(vpc, mm_pyramid, level+1, x*2, y*2, z*2, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2+1, y*2, z*2, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2, y*2+1, z*2, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2+1, y*2+1, z*2, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2, y*2, z*2+1, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2+1, y*2, z*2+1, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2, y*2+1, z*2+1, nodes_per_side*2, child_node, octree_offset); child_node += child_bytes_per_node; DescendPyramid(vpc, mm_pyramid, level+1, x*2+1,y*2+1,z*2+1, nodes_per_side*2, child_node, octree_offset); } else { /* node has no children; store NULL pointer */ Debug((vpc, VPDEBUG_OCTREE, " Not subdividing.\n")); if (parent_node != NULL) { IntField(parent_node, child_offset) = 0; } } } } /* * VPComputeSummedAreaTable * * Build the summed-area table for fast-classification. */ void VPComputeSummedAreaTable(vpc) vpContext *vpc; { /* use a special-case version for lower dimensions (faster since C optimizer does a better job) */ switch (vpc->num_clsfy_params) { case 1: Compute1DSummedAreaTable(vpc); break; case 2: Compute2DSummedAreaTable(vpc); break; default: /* XXX add code for ND classifiers */ VPBug("VPComputeSummedAreaTable can only handle 1D or 2D classifiers"); break; } } /* * Compute1DSummedAreaTable * * Build a 1D summed area table. */ static void Compute1DSummedAreaTable(vpc) vpContext *vpc; { int p0max, p0value; unsigned table_size; float opacity, min_opacity, *p0table; unsigned sum; unsigned *entry; p0max = vpc->field_max[vpc->param_field[0]]; table_size = (p0max+1) * sizeof(unsigned); p0table = vpc->clsfy_table[0]; min_opacity = vpc->min_opacity; if (vpc->sum_table == NULL || table_size != vpc->sum_table_size) { if (vpc->sum_table != NULL) Dealloc(vpc, vpc->sum_table); Alloc(vpc, vpc->sum_table, unsigned *, table_size, "sum_table"); vpc->sum_table_size = table_size; } entry = vpc->sum_table; for (p0value = 0; p0value <= p0max; p0value++) { opacity = p0table[p0value]; if (opacity > min_opacity) sum = 1; else sum = 0; if (p0value > 0) sum += entry[-1]; entry[0] = sum; entry++; } } /* * Compute2DSummedAreaTable * * Build a 2D summed area table. */ static void Compute2DSummedAreaTable(vpc) vpContext *vpc; { int p0max, p0value, p1max, p1value; unsigned table_size; float opacity, min_opacity, *p0table, *p1table; unsigned sum; unsigned *entry; p0max = vpc->field_max[vpc->param_field[0]]; p1max = vpc->field_max[vpc->param_field[1]]; table_size = (p0max+1) * (p1max+1) * sizeof(unsigned); p0table = vpc->clsfy_table[0]; p1table = vpc->clsfy_table[1]; min_opacity = vpc->min_opacity; if (vpc->sum_table == NULL || table_size != vpc->sum_table_size) { if (vpc->sum_table != NULL) Dealloc(vpc, vpc->sum_table); Alloc(vpc, vpc->sum_table, unsigned *, table_size, "sum_table"); vpc->sum_table_size = table_size; } entry = vpc->sum_table; for (p0value = 0; p0value <= p0max; p0value++) { for (p1value = 0; p1value <= p1max; p1value++) { opacity = p0table[p0value] * p1table[p1value]; if (opacity > min_opacity) sum = 1; else sum = 0; if (p1value > 0) { sum += entry[-1]; if (p0value > 0) { sum += entry[-(p1max+1)]; sum -= entry[-(p1max+1)-1]; } } else if (p0value > 0) { sum += entry[-(p1max+1)]; } entry[0] = sum; entry++; } } } /* * VPClassifyOctree * * Descend an octree and classify each node as full, empty or partfull. */ void VPClassifyOctree(vpc) vpContext *vpc; { /* use a special-case version for lower dimensions (faster since C optimizer does a better job) */ switch (vpc->num_clsfy_params) { case 1: ClassifyOctree1(vpc); break; case 2: ClassifyOctree2(vpc); break; default: /* XXX add code for ND classifiers */ VPBug("VPClassifyOctree can only handle 2D classifiers"); break; } } /* * ClassifyOctree1 * * Descend an octree and classify each node as full, empty or partfull. * Specialized for a 1 parameter classification function (1D summed * area table). */ static void ClassifyOctree1(vpc) vpContext *vpc; { char *node_stack[VP_MAX_OCTREE_LEVELS]; /* stack of node addresses */ int count_stack[VP_MAX_OCTREE_LEVELS]; /* stack of node child counts; when count drops to zero, pop up a level */ int level; /* current octree level */ int max_level; /* highest octree level */ char *octree_root; /* root node of octree */ char *node; /* current octree node */ unsigned area; /* area computed from the summed-area table */ int status; /* classification status of current node */ unsigned *sum_table; /* summed area table */ int p0max, p0min; /* parameter 0 extrema */ int p0size; /* parameter size */ int child_offset; /* offset of child field in node */ int status_offset; /* offset of status field in node */ int base_bytes_per_node; /* size of base node in bytes */ int nonbase_bytes_per_node; /* size of nonbase node in bytes */ int child_count; /* children left at current level */ /* initialize */ ASSERT(vpc->sum_table != NULL); ASSERT(vpc->mm_octree != NULL); ASSERT(vpc->mm_octree->root != NULL); ASSERT(vpc->sum_table_size == sizeof(unsigned) * (vpc->field_max[vpc->param_field[0]]+1)); sum_table = vpc->sum_table; max_level = vpc->mm_octree->levels - 1; octree_root = vpc->mm_octree->root; p0size = vpc->field_size[vpc->param_field[0]]; status_offset = vpc->mm_octree->status_offset; child_offset = vpc->mm_octree->child_offset; base_bytes_per_node = vpc->mm_octree->base_bytes_per_node; nonbase_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; node = octree_root; level = 0; /* do a depth-first, preorder traversal of the octree */ Debug((vpc, VPDEBUG_CLSFYOCTREE, "Classifying octree:\n")); while (1) { /* find min/max values for both parameters in this node */ if (p0size == 1) { p0min = ByteField(node, 0)-1; p0max = ByteField(node, 1); } else { p0min = ShortField(node, 0)-1; p0max = ShortField(node, 2); } /* integrate the opacities in the node using the summed area table */ area = sum_table[p0max]; if (p0min >= 0) area -= sum_table[p0min]; /* decide if node is full, empty or partfull */ if (area == 0) { status = MM_EMPTY; } else if (level != max_level && IntField(node, child_offset) != 0 && area != (p0max - p0min)) { status = MM_PARTFULL; } else { status = MM_FULL; } ByteField(node, status_offset) = status; Debug((vpc, VPDEBUG_CLSFYOCTREE, " Level %d: node is %s (addr 0x%08x)\n", level, status == MM_EMPTY ? "empty" : (status == MM_FULL ? "full" : "partfull"), node)); /* move to next node in tree traversal */ if (status == MM_PARTFULL) { /* move down to first child in next level */ node = octree_root + IntField(node, child_offset); Debug((vpc, VPDEBUG_CLSFYOCTREE, " Descending. Children at offset %d, addr 0x%08x\n", IntField(node, child_offset), node)); node_stack[level] = node; count_stack[level] = 7; /* number of remaining children */ level++; ASSERT(level <= max_level); } else { do { /* move up to a node with unvisited children */ Debug((vpc, VPDEBUG_CLSFYOCTREE, " Ascending.\n")); level--; if (level < 0) break; child_count = count_stack[level]--; ASSERT(child_count >= 0 && child_count <= 7); } while (child_count == 0); if (level < 0) break; /* traversal of octree is done! */ /* descend to the next child of this node */ if (level == max_level-1) node = node_stack[level] + base_bytes_per_node; else node = node_stack[level] + nonbase_bytes_per_node; Debug((vpc, VPDEBUG_CLSFYOCTREE, " Descending to child at 0x%08x.\n", node)); node_stack[level] = node; level++; ASSERT(level <= max_level); } } /* while (1) */ } /* * ClassifyOctree2 * * Descend an octree and classify each node as full, empty or partfull. * Specialized for a 2 parameter classification function (2D summed * area table). */ static void ClassifyOctree2(vpc) vpContext *vpc; { char *node_stack[VP_MAX_OCTREE_LEVELS]; /* stack of node addresses */ int count_stack[VP_MAX_OCTREE_LEVELS]; /* stack of node child counts; when count drops to zero, pop up a level */ int level; /* current octree level */ int max_level; /* highest octree level */ char *octree_root; /* root node of octree */ char *node; /* current octree node */ unsigned area; /* area computed from the summed-area table */ int status; /* classification status of current node */ unsigned *sum_table; /* summed area table */ int sum_table_dim1; /* size of last dimension of sum_table */ int p0max, p0min; /* parameter 0 extrema */ int p1max, p1min; /* parameter 1 extrema */ int p0size, p1size; /* parameter sizes */ int child_offset; /* offset of child field in node */ int status_offset; /* offset of status field in node */ int base_bytes_per_node; /* size of base node in bytes */ int nonbase_bytes_per_node; /* size of nonbase node in bytes */ int child_count; /* children left at current level */ /* initialize */ ASSERT(vpc->sum_table != NULL); ASSERT(vpc->mm_octree != NULL); ASSERT(vpc->mm_octree->root != NULL); ASSERT(vpc->sum_table_size == sizeof(unsigned) * (vpc->field_max[vpc->param_field[0]]+1) * (vpc->field_max[vpc->param_field[1]]+1)); sum_table = vpc->sum_table; max_level = vpc->mm_octree->levels - 1; octree_root = vpc->mm_octree->root; p0size = vpc->field_size[vpc->param_field[0]]; p1size = vpc->field_size[vpc->param_field[1]]; sum_table_dim1 = vpc->field_max[vpc->param_field[1]] + 1; status_offset = vpc->mm_octree->status_offset; child_offset = vpc->mm_octree->child_offset; base_bytes_per_node = vpc->mm_octree->base_bytes_per_node; nonbase_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; node = octree_root; level = 0; /* do a depth-first, preorder traversal of the octree */ Debug((vpc, VPDEBUG_CLSFYOCTREE, "Classifying octree:\n")); while (1) { /* find min/max values for both parameters in this node */ if (p0size == 1) { p0min = ByteField(node, 0)-1; p0max = ByteField(node, 1); } else { p0min = ShortField(node, 0)-1; p0max = ShortField(node, 2); } if (p1size == 1) { p1min = ByteField(node, 2*p0size)-1; p1max = ByteField(node, 2*p0size+1); } else { p1min = ShortField(node, 2*p0size)-1; p1max = ShortField(node, 2*p0size+2); } /* integrate the opacities in the node using the summed area table */ area = sum_table[p0max * sum_table_dim1 + p1max]; if (p0min >= 0) { if (p1min >= 0) { area += sum_table[p0min * sum_table_dim1 + p1min]; area -= sum_table[p0max * sum_table_dim1 + p1min]; } area -= sum_table[p0min * sum_table_dim1 + p1max]; } else { if (p1min >= 0) area -= sum_table[p0max * sum_table_dim1 + p1min]; } /* decide if node is full, empty or partfull */ if (area == 0) { status = MM_EMPTY; } else if (level != max_level && IntField(node, child_offset) != 0 && area != (p1max - p1min)*(p0max - p0min)) { status = MM_PARTFULL; } else { status = MM_FULL; } ByteField(node, status_offset) = status; Debug((vpc, VPDEBUG_CLSFYOCTREE, " Level %d: node is %s (addr 0x%08x)\n", level, status == MM_EMPTY ? "empty" : (status == MM_FULL ? "full" : "partfull"), node)); /* move to next node in tree traversal */ if (status == MM_PARTFULL) { /* move down to first child in next level */ node = octree_root + IntField(node, child_offset); Debug((vpc, VPDEBUG_CLSFYOCTREE, " Descending. Children at offset %d, addr 0x%08x\n", IntField(node, child_offset), node)); node_stack[level] = node; count_stack[level] = 7; /* number of remaining children */ level++; ASSERT(level <= max_level); } else { do { /* move up to a node with unvisited children */ Debug((vpc, VPDEBUG_CLSFYOCTREE, " Ascending.\n")); level--; if (level < 0) break; child_count = count_stack[level]--; ASSERT(child_count >= 0 && child_count <= 7); } while (child_count == 0); if (level < 0) break; /* traversal of octree is done! */ /* descend to the next child of this node */ if (level == max_level-1) node = node_stack[level] + base_bytes_per_node; else node = node_stack[level] + nonbase_bytes_per_node; Debug((vpc, VPDEBUG_CLSFYOCTREE, " Descending to child at 0x%08x.\n", node)); node_stack[level] = node; level++; ASSERT(level <= max_level); } } /* while (1) */ } /* * VPInitOctreeLevelStack * * Initialize an MMOctreeLevel stack. */ void VPInitOctreeLevelStack(vpc, level_stack, axis, k) vpContext *vpc; MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; int axis; /* principle viewing axis */ int k; /* current slice number */ { int max_level, level, last_node_size; int child_octant, child_bytes_per_node; int *octant_order; ASSERT(vpc->mm_octree != NULL); max_level = vpc->mm_octree->levels-1; level_stack[max_level].level_size = vpc->mm_octree->base_node_size; level_stack[max_level].child_octant = -1; level_stack[max_level].child_offset1 = -1; level_stack[max_level].child_offset2 = -1; level_stack[max_level].child2 = NULL; last_node_size = vpc->mm_octree->base_node_size; octant_order = OctantOrder[axis]; Debug((vpc, VPDEBUG_OCTREETRAVERSE, "Octants for next scanline:\n")); for (level = max_level-1; level >= 0; level--) { level_stack[level].level_size = last_node_size * 2; child_octant = ((k / last_node_size) & 1) * MM_K_BIT; last_node_size *= 2; level_stack[level].child_octant = child_octant; if (level == max_level-1) child_bytes_per_node = vpc->mm_octree->base_bytes_per_node; else child_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; ASSERT(child_octant >= 0 && child_octant < 7); ASSERT(octant_order[child_octant] >= 0 && octant_order[child_octant] < 8); level_stack[level].child_offset1 = octant_order[child_octant] * child_bytes_per_node; level_stack[level].child_offset2 = octant_order[child_octant+1] * child_bytes_per_node; Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Level %d: %d, then %d\n", level,octant_order[child_octant],octant_order[child_octant+1])); } } /* * VPComputeScanRuns * * For a given voxel scanline, produce a sequence of run lengths * which give a conservative estimate of the non-transparent portions * of the scanline. The runs are computed by finding which nodes * of the classified min-max octree are intersected by the scanline. * * The return value is the number of scanlines for which this run data * is valid. */ int VPComputeScanRuns(vpc, level_stack, run_lengths, axis, j, icount) vpContext *vpc; MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; /* saved state */ unsigned char *run_lengths; /* storage for run lengths */ int axis; /* principle viewing axis */ int j; /* scanline number */ int icount; /* scanline length */ { int octree_maxlevel; int level; int max_level = vpc->mm_octree->levels-1; int child_octant, child_bytes_per_node; int base_bytes_per_node, nonbase_bytes_per_node; int i; char *octree_root, *node; int run_type; int run_length; int run_piece; int status_offset; int child_offset; int status; int *octant_order; Debug((vpc, VPDEBUG_OCTREERUNS, "Runs for scanline %d:\n", j)); Debug((vpc, VPDEBUG_OCTREETRAVERSE, "Traversal for scanline %d:\n", j)); ASSERT(vpc->mm_octree != NULL); ASSERT(vpc->mm_octree->root != NULL); base_bytes_per_node = vpc->mm_octree->base_bytes_per_node; nonbase_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; status_offset = vpc->mm_octree->status_offset; child_offset = vpc->mm_octree->child_offset; octree_maxlevel = -1; i = icount; octree_root = vpc->mm_octree->root; node = octree_root; level = 0; run_type = MM_EMPTY; run_length = 0; octant_order = OctantOrder[axis]; /* traverse the octree */ while (1) { /* descend tree to next node which is not partfull */ while (1) { status = ByteField(node, status_offset); Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Node at level %d: %s\n", level, status == MM_PARTFULL ? "partfull" : (status == MM_FULL ? "full" : "empty"))); ASSERT(status == MM_PARTFULL || status == MM_FULL || status == MM_EMPTY); if (status != MM_PARTFULL) break; ASSERT(IntField(node, child_offset) != 0); Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Children at base %d, offsets %d, %d; ", IntField(node, child_offset), level_stack[level].child_offset1, level_stack[level].child_offset2)); Debug((vpc, VPDEBUG_OCTREETRAVERSE, "status %d, %d\n", ByteField(octree_root + IntField(node, child_offset) + level_stack[level].child_offset1, status_offset), ByteField(octree_root + IntField(node, child_offset) + level_stack[level].child_offset2, status_offset))); node = octree_root + IntField(node, child_offset); level_stack[level].child2 = node+level_stack[level].child_offset2; node += level_stack[level].child_offset1; level++; Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Descending.\n")); ASSERT(level < vpc->mm_octree->levels); } if (level > octree_maxlevel) octree_maxlevel = level; /* add current node to the list of runs */ run_piece = MIN(level_stack[level].level_size, i); i -= run_piece; if (status == run_type) { run_length += run_piece; } else { Debug((vpc, VPDEBUG_OCTREETRAVERSE, " New run.\n")); while (run_length > 255) { Debug((vpc, VPDEBUG_OCTREERUNS, " 255 0")); *run_lengths++ = 255; *run_lengths++ = 0; run_length -= 255; } Debug((vpc, VPDEBUG_OCTREERUNS, " %d", run_length)); *run_lengths++ = run_length; run_type ^= 1; run_length = run_piece; } Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Added %d to run.\n", run_piece)); if (i == 0) break; /* traversal is done */ /* move back up the tree to the next node with unvisited children */ do { Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Ascending.\n")); level--; ASSERT(level >= 0); } while (level_stack[level].child2 == NULL); /* descend to next child */ Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Next child--descending.\n")); node = level_stack[level].child2; level_stack[level].child2 = NULL; level++; ASSERT(level < vpc->mm_octree->levels); } /* while (1) */ /* write out the last run */ while (run_length > 255) { Debug((vpc, VPDEBUG_OCTREERUNS, " 255 0")); *run_lengths++ = 255; *run_lengths++ = 0; run_length -= 255; } Debug((vpc, VPDEBUG_OCTREERUNS, " %d", run_length)); *run_lengths++ = run_length; if (run_type == MM_EMPTY) { Debug((vpc, VPDEBUG_OCTREERUNS, " 0")); *run_lengths++ = 0; } Debug((vpc, VPDEBUG_OCTREERUNS, "\n")); Debug((vpc, VPDEBUG_OCTREETRAVERSE, "Covered %d scanlines.\n", level_stack[octree_maxlevel].level_size)); /* update state for next scanline: adjust child_octant and then use it to compute child_offset1 and child_offset2 */ j += level_stack[octree_maxlevel].level_size; max_level = vpc->mm_octree->levels-1; Debug((vpc, VPDEBUG_OCTREETRAVERSE, "Octants for next scanline:\n")); for (level = max_level-1; level >= 0; level--) { child_octant = level_stack[level].child_octant; if (level >= octree_maxlevel) child_octant &= MM_K_BIT; else if ((j & (level_stack[level].level_size/2)) == 0) child_octant &= ~MM_J_BIT; else child_octant |= MM_J_BIT; level_stack[level].child_octant = child_octant; if (level == max_level-1) child_bytes_per_node = base_bytes_per_node; else child_bytes_per_node = nonbase_bytes_per_node; level_stack[level].child_offset1 = octant_order[child_octant] * child_bytes_per_node; level_stack[level].child_offset2 = octant_order[child_octant+1] * child_bytes_per_node; Debug((vpc, VPDEBUG_OCTREETRAVERSE, " Level %d: %d, then %d\n", level,octant_order[child_octant],octant_order[child_octant+1])); } /* return the number of scanlines for which the run lengths are valid (which is the size of the smallest octree node the scanline hit) */ return(level_stack[octree_maxlevel].level_size); } /* * vpOctreeMask * * Fill a 3D array with a mask computed from an octree. * Each array element is set to one of three values depending upon * the value of the corresponding voxel in the octree: * 0 voxel is definitely transparent * 255 voxel may be non-transparent * 128 voxel may be non-transparent, and more detailed information * is available at deeper levels of the octree which were not * visited */ vpResult vpOctreeMask(vpc, array, array_size, max_level) vpContext *vpc; /* context */ unsigned char *array; /* array for result */ int array_size; /* size of array in bytes */ int max_level; { int c; unsigned char *aptr; int retcode; /* error checks */ if (vpc->mm_octree == NULL) return(VPSetError(vpc, VPERROR_BAD_SIZE)); if ((retcode = VPCheckClassifier(vpc)) == NULL) return(retcode); if (array_size != vpc->xlen*vpc->ylen*vpc->zlen) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* classify the octree */ VPComputeSummedAreaTable(vpc); VPClassifyOctree(vpc); ComputeOctreeMask(vpc, 0, 0, 0, 0, vpc->mm_octree->root_node_size, vpc->mm_octree->root, array, max_level); return(VP_OK); } /* * ComputeOctreeMask * * Recursive helper function for vpOctreeMask. */ static void ComputeOctreeMask(vpc, level, xn, yn, zn, node_size, parent_node, array, max_level) vpContext *vpc; /* context */ int level; /* current level */ int xn, yn, zn; /* current node coordinates (in coordinate system of the current level) */ int node_size; /* voxel per side of node at this level */ void *parent_node; /* parent octree node */ unsigned char *array; /* array for storing result */ int max_level; /* deepest level of the tree to visit */ { char *child_node, *octree_root; int child_bytes_per_node; int child_offset; int status_offset; int status, value; int x, y, z, x0, y0, z0, x1, y1, z1; int array_ystride, array_zstride; /* initialize */ status_offset = vpc->mm_octree->status_offset; child_offset = vpc->mm_octree->child_offset; if (level == vpc->mm_octree->levels-2) child_bytes_per_node = vpc->mm_octree->base_bytes_per_node; else child_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; octree_root = vpc->mm_octree->root; /* base case */ status = ByteField(parent_node, status_offset); if (level == max_level || status != MM_PARTFULL) { if (status == MM_EMPTY) value = 0; else if (status == MM_FULL) value = 255; else if (status == MM_PARTFULL) value = 128; else VPBug("bad status value in ComputeOctreeMask, nodeaddr = 0x%08x", parent_node); x0 = xn * node_size; y0 = yn * node_size; z0 = zn * node_size; x1 = MIN(x0 + node_size, vpc->xlen) - 1; y1 = MIN(y0 + node_size, vpc->ylen) - 1; z1 = MIN(z0 + node_size, vpc->zlen) - 1; array_ystride = vpc->xlen; array_zstride = vpc->xlen * vpc->ylen; for (z = z0; z <= z1; z++) { for (y = y0; y <= y1; y++) { for (x = x0; x <= x1; x++) { array[z*array_zstride + y*array_ystride + x] = value; } } } return; } ASSERT(IntField(parent_node, child_offset) != 0); /* visit children */ child_node = octree_root + IntField(parent_node, child_offset); ComputeOctreeMask(vpc, level+1, xn*2, yn*2, zn*2, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2+1, yn*2, zn*2, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2, yn*2+1, zn*2, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2+1, yn*2+1, zn*2, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2, yn*2, zn*2+1, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2+1, yn*2, zn*2+1, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2, yn*2+1, zn*2+1, node_size/2, child_node, array, max_level); child_node += child_bytes_per_node; ComputeOctreeMask(vpc, level+1, xn*2+1,yn*2+1,zn*2+1, node_size/2, child_node, array, max_level); } #ifdef DEBUG /* * VPCheckRuns * * Check a scanline of run lengths for validity by comparing it to * the raw volume data. Return value is the number of voxels in * nonzero runs which are actually zero (due to conservative * approximations.) If an error is detected then VPBug is called. */ int VPCheckRuns(vpc, run_lengths, axis, k, j) vpContext *vpc; unsigned char *run_lengths;/* run lengths */ int axis; /* principle viewing axis */ int k; /* slice number */ int j; /* scanline number */ { char *voxel; int i; int icount; int count; int is_non_zero; int num_runs; float opacity; int badpredictions; int istride; switch (axis) { case VP_X_AXIS: voxel = (char *)vpc->raw_voxels + k*vpc->xstride + j*vpc->zstride; istride = vpc->ystride; icount = vpc->ylen; break; case VP_Y_AXIS: voxel = (char *)vpc->raw_voxels + k*vpc->ystride + j*vpc->xstride; istride = vpc->zstride; icount = vpc->zlen; break; case VP_Z_AXIS: voxel = (char *)vpc->raw_voxels + k*vpc->zstride + j*vpc->ystride; istride = vpc->xstride; icount = vpc->xlen; break; default: VPBug("bad axis in VPCheckRuns"); } count = 0; is_non_zero = 1; num_runs = 0; badpredictions = 0; for (i = 0; i < icount; i++) { while (count == 0) { count = *run_lengths++; is_non_zero = !is_non_zero; if (++num_runs > icount) VPBug("runaway scanline detected by VPCheckRuns"); } opacity = VPClassifyVoxel(vpc, voxel); if (opacity > vpc->min_opacity && fabs(opacity - vpc->min_opacity) > 0.001) { if (!is_non_zero) { printf("\n"); printf("VPCheckRuns: error on voxel (i,j,k)=(%d,%d,%d), ", i, j, k); printf("viewaxis %d\n", axis); printf("Actual opacity: %17.15f\n", opacity); printf("Threshold: %17.15f\n", vpc->min_opacity); VPDumpView(vpc); VPDumpClassifier(vpc); VPBug("nonzero voxel in zero run detected by VPCheckRuns"); } } else { if (is_non_zero) badpredictions++; } voxel += istride; count--; } if (count != 0) VPBug("run that overshoots end of scanline detected by VPCheckRuns"); if (!is_non_zero) { if (*run_lengths != 0) VPBug("missing 0 run at end of scanline detected by VPCheckRuns"); } return(badpredictions); } /* * VPTestMinMaxOctree * * Test out the MinMaxOctree routines. */ void VPTestMinMaxOctree(vpc) vpContext *vpc; { int x, y, z; MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; unsigned char run_lengths[VP_MAX_VOLUME_DIM]; int badpredictions; int scans_left; float accuracy; ASSERT(vpc->mm_octree != NULL); VPComputeSummedAreaTable(vpc); VPClassifyOctree(vpc); badpredictions = 0; printf("Checking +Z axis runs...\n"); for (z = 0; z < vpc->zlen; z++) { ReportStatus(vpc, (double)z / (double)vpc->zlen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", z)); VPInitOctreeLevelStack(vpc, level_stack, VP_Z_AXIS, z); scans_left = 0; for (y = 0; y < vpc->ylen; y++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_Z_AXIS, y, vpc->xlen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_Z_AXIS, z, y); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); badpredictions = 0; printf("Checking +Y axis runs...\n"); for (y = 0; y < vpc->ylen; y++) { ReportStatus(vpc, (double)y / (double)vpc->ylen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", y)); VPInitOctreeLevelStack(vpc, level_stack, VP_Y_AXIS, y); scans_left = 0; for (x = 0; x < vpc->xlen; x++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_Y_AXIS, x, vpc->zlen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_Y_AXIS, y, x); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); badpredictions = 0; printf("Checking +X axis runs...\n"); for (x = 0; x < vpc->xlen; x++) { ReportStatus(vpc, (double)x / (double)vpc->xlen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", x)); VPInitOctreeLevelStack(vpc, level_stack, VP_X_AXIS, x); scans_left = 0; for (z = 0; z < vpc->zlen; z++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_X_AXIS, z, vpc->ylen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_X_AXIS, x, z); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); badpredictions = 0; printf("Checking -Z axis runs...\n"); for (z = vpc->zlen-1; z >= 0; z--) { ReportStatus(vpc, (double)(vpc->zlen-1-z) / (double)vpc->zlen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", z)); VPInitOctreeLevelStack(vpc, level_stack, VP_Z_AXIS, z); scans_left = 0; for (y = 0; y < vpc->ylen; y++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_Z_AXIS, y, vpc->xlen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_Z_AXIS, z, y); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); badpredictions = 0; printf("Checking -Y axis runs...\n"); for (y = vpc->ylen-1; y >= 0; y--) { ReportStatus(vpc, (double)(vpc->ylen-1-y) / (double)vpc->ylen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", y)); VPInitOctreeLevelStack(vpc, level_stack, VP_Y_AXIS, y); scans_left = 0; for (x = 0; x < vpc->xlen; x++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_Y_AXIS, x, vpc->zlen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_Y_AXIS, y, x); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); badpredictions = 0; printf("Checking -X axis runs...\n"); for (x = vpc->xlen-1; x >= 0; x--) { ReportStatus(vpc, (double)(vpc->xlen-1-x) / (double)vpc->xlen); Debug((vpc, VPDEBUG_OCTREERUNS, "*** Slice %d ***\n", x)); VPInitOctreeLevelStack(vpc, level_stack, VP_X_AXIS, x); scans_left = 0; for (z = 0; z < vpc->zlen; z++) { if (scans_left == 0) { scans_left = VPComputeScanRuns(vpc, level_stack, run_lengths, VP_X_AXIS, z, vpc->ylen); } scans_left--; badpredictions += VPCheckRuns(vpc, run_lengths, VP_X_AXIS, x, z); } } ReportStatus(vpc, 1.0); accuracy = 1. - ((double)badpredictions / (double)(vpc->xlen*vpc->ylen*vpc->zlen)); printf("VPTestMinMaxOctree: PASSED.\n"); printf("Prediction accuracy: %.1f%% (%d bad predictions)\n", accuracy*100., badpredictions); } #else int VPCheckRuns(vpc, run_lengths, axis, k, j) vpContext *vpc; unsigned char *run_lengths;/* run lengths */ int axis; /* principle viewing axis */ int k; /* slice number */ int j; /* scanline number */ { } void VPTestMinMaxOctree(vpc) vpContext *vpc; { } #endif /* DEBUG */ volpack-1.0b3/aclocal.m40000644000265600020320000077705110727044630012043 00000000000000# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 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. m4_if(m4_PACKAGE_VERSION, [2.61],, [m4_fatal([this file was generated for autoconf 2.61. You have another version of autoconf. If you want to use that, you should regenerate the build system entirely.], [63])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 Debian 1.5.22-4 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 ;; 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* | k*bsd*-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' 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 # 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)); 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 /usr/lib $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' ;; netbsdelf*-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='NetBSD ld.elf_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* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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* | 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* | k*bsd*-gnu) 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* | netbsdelf*-gnu) 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) # 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=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # 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=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # 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=$lt_sys_lib_search_path_spec # 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* | k*bsd*-gnu) 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* | 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* | k*bsd*-gnu) 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* | netbsdelf*-gnu) ;; 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* | k*bsd*-gnu) 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' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _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* | k*bsd*-gnu) 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 _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) 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* | 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* | netbsdelf*-gnu) 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 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_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005, 2006 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # 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, 2006 # 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_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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl 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, 2006 # 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 9 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /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, 2006 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.60])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])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-"\$(SHELL) $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])]) # 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, 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 5 # 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 AC_REQUIRE_AUX_FILE([missing])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, 2006 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 for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # 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 volpack-1.0b3/vp_renderC.c0000644000265600020320000001272605701116543012424 00000000000000/* * vp_renderC.c * * Function to render classified volumes. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ #include "vp_global.h" #define COMP_AC1PB_FUNC VPCompAC1PB extern void VPCompAC1PB(); #define COMP_AC3PB_FUNC VPCompAC3PB extern void VPCompAC3PB(); #ifdef COMP_AC11B #define COMP_AC11B_FUNC VPCompAC11B extern void VPCompAC11B(); #else #define COMP_AC11B_FUNC VPCompAC1NB #endif #ifdef COMP_AC31B #define COMP_AC31B_FUNC VPCompAC31B extern void VPCompAC31B(); #else #define COMP_AC31B_FUNC VPCompAC3NB #endif #ifdef COMP_AC12B #define COMP_AC12B_FUNC VPCompAC12B extern void VPCompAC12B(); #else #define COMP_AC12B_FUNC VPCompAC1NB #endif #ifdef COMP_AC32B #define COMP_AC32B_FUNC VPCompAC32B extern void VPCompAC32B(); #else #define COMP_AC32B_FUNC VPCompAC3NB #endif #define COMP_AC1NB_FUNC VPCompAC1NB extern void VPCompAC1NB(); #define COMP_AC3NB_FUNC VPCompAC3NB extern void VPCompAC3NB(); #define COMP_AC1PS_FUNC VPCompAC1PB #define COMP_AC3PS_FUNC VPCompAC3PB #ifdef COMP_AC11S #define COMP_AC11S_FUNC VPCompAC11S extern void VPCompAC11S(); #else #define COMP_AC11S_FUNC VPCompAC1NS #endif #ifdef COMP_AC31S #define COMP_AC31S_FUNC VPCompAC31S extern void VPCompAC31S(); #else #define COMP_AC31S_FUNC VPCompAC3NS #endif #ifdef COMP_AC12S #define COMP_AC12S_FUNC VPCompAC12S extern void VPCompAC12S(); #else #define COMP_AC12S_FUNC VPCompAC1NS #endif #ifdef COMP_AC32S #define COMP_AC32S_FUNC VPCompAC32S extern void VPCompAC32S(); #else #define COMP_AC32S_FUNC VPCompAC3NS #endif #define COMP_AC1NS_FUNC VPCompAC1NS extern void VPCompAC1NS(); #define COMP_AC3NS_FUNC VPCompAC3NS extern void VPCompAC3NS(); #ifdef INDEX_VOLUME extern void VPCompAI11B(); #endif #define SHADOWS_OFF 0 #define SHADOWS_ON 1 #define SHADOW_OPTS 2 #define MATERIAL_CALLBACK 0 #define MATERIAL_ONE 1 #define MATERIAL_TWO 2 #define MATERIAL_MORE 3 #define MATERIAL_OPTS 4 #define COLOR_GRAY 0 #define COLOR_RGB 1 #define COLOR_OPTS 2 static void (*AffineProcTable[SHADOW_OPTS][MATERIAL_OPTS][COLOR_OPTS])() = { { { COMP_AC1PB_FUNC, COMP_AC3PB_FUNC }, { COMP_AC11B_FUNC, COMP_AC31B_FUNC }, { COMP_AC12B_FUNC, COMP_AC32B_FUNC }, { COMP_AC1NB_FUNC, COMP_AC3NB_FUNC } }, { { COMP_AC1PS_FUNC, COMP_AC3PS_FUNC }, { COMP_AC11S_FUNC, COMP_AC31S_FUNC }, { COMP_AC12S_FUNC, COMP_AC32S_FUNC }, { COMP_AC1NS_FUNC, COMP_AC3NS_FUNC } } }; /* * vpRenderClassifiedVolume * * Render a classified, run-length encoded volume using the shear-warp * algorithm. */ vpResult vpRenderClassifiedVolume(vpc) vpContext *vpc; { int retcode; void (*composite_func)(); int shadow_option, material_option, color_option; #ifdef INDEX_VOLUME int have_index; #endif /* check for errors and initialize */ if ((retcode = VPCheckShader(vpc)) != VP_OK) return(retcode); if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckClassifiedVolume(vpc, vpc->best_view_axis)) != VP_OK) return(retcode); if ((retcode = VPCheckImage(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckShadows(vpc)) != VP_OK) return(retcode); #ifdef INDEX_VOLUME switch (vpc->best_view_axis) { case VP_X_AXIS: if (vpc->rle_x->voxel_index != NULL) have_index = 1; else have_index = 0; break; case VP_Y_AXIS: if (vpc->rle_y->voxel_index != NULL) have_index = 1; else have_index = 0; break; case VP_Z_AXIS: if (vpc->rle_z->voxel_index != NULL) have_index = 1; else have_index = 0; break; default: VPBug("invalid viewing axis in vpRenderClassifiedVolume"); } #endif /* INDEX_VOLUME */ Debug((vpc, VPDEBUG_RENDER, "Algorithm: affine RLEvolume\n")); /* determine which options are enabled */ if (vpc->enable_shadows) shadow_option = SHADOWS_ON; else shadow_option = SHADOWS_OFF; if (vpc->shading_mode == CALLBACK_SHADER) material_option = MATERIAL_CALLBACK; else if (vpc->num_materials == 1) material_option = MATERIAL_ONE; else if (vpc->num_materials == 2) material_option = MATERIAL_TWO; else material_option = MATERIAL_MORE; if (vpc->color_channels == 1) color_option = COLOR_GRAY; else color_option = COLOR_RGB; /* render */ if (vpc->affine_view) { /* choose a compositing function */ composite_func = AffineProcTable[shadow_option][material_option] [color_option]; #ifdef INDEX_VOLUME if (have_index && shadow_option == SHADOWS_OFF && material_option == MATERIAL_ONE && color_option == COLOR_GRAY) { composite_func = VPCompAI11B; } #endif VPRenderAffine(vpc, USE_RLEVOLUME, composite_func); } else { /* XXX perspective rendering not available yet */ return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } volpack-1.0b3/vp_compA.m40000644000265600020320000016323505701116554012203 00000000000000/* * vp_compA.m4 * * Compositing routine for affine viewing transformations. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.7 $ */ #include "vp_global.h" dnl Description: dnl This is an m4 source file which defines a C procedure to resample dnl and composite one slice of a volume. The macro definitions allow dnl the procedure to be specialized for a particular volume data dnl structure (run-length encoded classified volume, or unclassified dnl volume with or without a min-max octree), a particular number of dnl color channels (1 or 3), and a particular number of material types. dnl The definitions are a bit messy, but they keep the body of the dnl procedure pretty clean. Inlined procedures would be better but dnl many compilers do not support them. dnl dnl To produce a C source file, run this file through m4 with the dnl following m4 macros defined: dnl dnl FuncName name of the C function to produce dnl VolumeType "rlevolume" or "rawvolume" dnl ColorChannels number of color channels (1 or 3) dnl NumMaterials number of materials (a small integer or "n" dnl for a routine which handles any number) dnl dnl OR, define "SourceFile" to be a file name of the form dnl vp_compA????.c dnl where the four wildcard characters (call them W, X, Y and Z) dnl can have the following values: dnl W: volume type ("C" for classified volumes, "R" for raw volumes) dnl X: number of color channels ("1" for grayscale, "3" for RGB) dnl Y: number of materials ("1", "2", "N" for any number, "P" for dnl callback procedure to replace the material shading model) dnl Z: special options ("S" for rendering shadows, "G" for dnl generating shadow buffer, "N" for nearest-neighbor filter, dnl "I" to use index volume, "B" for normal case (bilinear dnl filter, no shadows, no index volume) dnl ifdef(`SourceFile', ` define(FuncNameStr, `substr(SourceFile, 7, 5)') define(VolumeTypeChar, `substr(SourceFile, 8, 1)') define(ColorChannels, `substr(SourceFile, 9, 1)') define(NumMaterials, `substr(SourceFile, 10, 1)') define(SpecialChar, `substr(SourceFile, 11, 1)') define(FuncName, `VPComp'FuncNameStr()) ifelse(VolumeTypeChar, `C', `define(VolumeType, `rlevolume')', VolumeTypeChar, `R', `define(VolumeType, `rawvolume')') ifelse(SpecialChar, `S', ` #define USE_SHADOW_BUFFER define(ShadowBuffer)') ifelse(SpecialChar, `G', ` #define COMPUTE_SHADOW_BUFFER') ifelse(SpecialChar, `I', ` define(`IndexVolume')') ') dnl Turn off unrolling of the run loop for the non-specialized routines. ifelse(NumMaterials, `N', `#undef UNROLL_RUN_LOOP', NumMaterials, `P', `#undef UNROLL_RUN_LOOP') dnl dnl LoadTopLeft() dnl dnl Load, classify and shade the voxel above and left of the current pixel. dnl define(LoadTopLeft, ` ClassifyVox(top_opc, topRLEdata - voxel_istride); ShadeVox(top, topRLEdata - voxel_istride)') dnl dnl LoadTopRight() dnl dnl Load, classify and shade the voxel above and right of the current pixel. dnl define(LoadTopRight, ` ClassifyVox(top_opc, topRLEdata); ShadeVox(top, topRLEdata)') dnl dnl LoadBotLeft() dnl dnl Load, classify and shade the voxel below and left of the current pixel. dnl define(LoadBotLeft, ` ClassifyVox(bot_opc, botRLEdata - voxel_istride); ShadeVox(bot, botRLEdata - voxel_istride)') dnl dnl LoadBotRight() dnl dnl Load, classify and shade the voxel below and right of the current pixel. dnl define(LoadBotRight, ` ClassifyVox(bot_opc, botRLEdata); ShadeVox(bot, botRLEdata)') dnl dnl ShadeVox(scan, voxel) dnl dnl Shade the voxel pointed to by "voxel" and store the result in the dnl color variables for scanline scan (either "top" or "bot"). dnl define(ShadeVox, ` ifelse(ColorChannels, 0, `', ` ComputeShadeIndex($2); ComputeWeightIndex($2); CallShader($1, $2); shade_factor = $1_opc * slice_depth_cueing; AttenuateColor($1); AttenuateShadowColor($1)')') dnl dnl ComputeShadeIndex(voxel) dnl dnl Compute the offset into the shade and shadow tables for the specified dnl voxel. dnl define(ComputeShadeIndex, ifelse(NumMaterials, `P', `', `shade_index=MaterialCount()*ColorChannels()*ShortField($1,norm_offset)')) dnl dnl ComputeWeightIndex(voxel) dnl dnl Compute the offset into the material weight table for the specified dnl voxel. dnl define(ComputeWeightIndex, ifelse(NumMaterials, `P', `', NumMaterials, `1', `', `weight_index = MaterialCount() * ByteField($1, wgt_offset)')) dnl dnl MaterialCount() dnl dnl Return the number of materials, as a constant if possible. dnl define(MaterialCount, `ifelse(NumMaterials, `N', `num_materials', NumMaterials)') dnl dnl CallShader(scan, voxel) dnl dnl Invoke the appropriate shader code to compute the color of the dnl voxel pointed to by "voxel". Store the result in the dnl color variables for scanline scan (either "top" or "bot"). dnl ifelse(NumMaterials, `P', `ifelse(ColorChannels, 1, `define(CallShader, `shade_func($2, &($1_clr), client_data)')', `define(CallShader, `shade_func($2, &($1_rclr), &($1_gclr), &($1_bclr), client_data)')')', NumMaterials, `1', `define(CallShader, `ShadeMaterial($1, 0, =)')', NumMaterials, `2', `define(CallShader, ` ShadeMaterial($1, 0, =); ShadeMaterial($1, 1, +=)')', `define(CallShader, ` ShadeMaterial($1, 0, =); for (m = 1; m < num_materials; m++) { ShadeMaterial($1, m, +=); }')') dnl Preprocessor definitions that cause local variables specific to the dnl shader to be allocated. ifelse(NumMaterials, 1, , NumMaterials, `P', ` #define CALLBACK', ` #define MULTIPLE_MATERIALS') dnl dnl ShadeMaterial(scan, material, op) dnl dnl Compute the contribution of material number "material" to the dnl color of the current voxel. The result is stored in the color dnl variables for scanline scan (either "top" or "bot") using dnl operation op ("=" or "+="). dnl ifelse(ColorChannels, 1, `define(ShadeMaterial, ` ShadeComponent($1_clr, $2, $3, 0); ShadeShadowComponent($1_sclr, $2, $3, 0)')', `define(ShadeMaterial, ` ShadeComponent($1_rclr, $2, $3, 0); ShadeComponent($1_gclr, $2, $3, 1); ShadeComponent($1_bclr, $2, $3, 2); ShadeShadowComponent($1_rsclr, $2, $3, 0); ShadeShadowComponent($1_gsclr, $2, $3, 1); ShadeShadowComponent($1_bsclr, $2, $3, 2)')') dnl dnl ShadeComponent(dst, material, op, component) dnl dnl Compute the contribution of material number "material" to channel dnl number "component" (0 = red, 1 = green, 2 = blue) of the dnl color of the current voxel. The result is stored in dst using dnl operator "op" ("=" or "+="). This macro uses non-shadow lighting only. dnl define(ShadeComponent, ` $1 $3 ShadeLookup($2, $4) * MaterialWeight($2)') dnl dnl ShadeLookup(material, component) dnl dnl Compute the contribution of material number "material" to channel dnl number "component" (0 = red, 1 = green, 2 = blue) of the current dnl voxel (which determines the contents of shade_index). Use the dnl value in the shading lookup table (which does not contain the dnl contribution of lights that may produce shadows). The result is dnl returned. dnl define(ShadeLookup, ` shade_table[shade_index + ColorChannels*$1 + $2]') dnl dnl ShadeShadowComponent(dst, material, op, component) dnl dnl Compute the contribution of material number "material" to channel dnl number "component" (0 = red, 1 = green, 2 = blue) of the dnl color of the current voxel. The result is stored in dst using dnl operator "op" ("=" or "+="). This macro uses shadow lighting only. dnl ifdef(`ShadowBuffer', `define(ShadeShadowComponent, ` $1 $3 ShadowLookup($2, $4) * MaterialWeight($2)')', `define(ShadeShadowComponent, `')') dnl dnl ShadowLookup(material, component) dnl dnl Compute the contribution of material number "material" to channel dnl number "component" (0 = red, 1 = green, 2 = blue) of the current dnl voxel (which determines the contents of shade_index). Use the dnl value in the shadow lookup table (which contains only the dnl contribution of lights that may produce shadows). The result is dnl returned. dnl define(ShadowLookup, ` shadow_table[shade_index + ColorChannels*$1 + $2]') dnl dnl MaterialWeight(material) dnl dnl Return the weight associated with the specified material number dnl for the current voxel. dnl ifelse( NumMaterials, 1, `define(MaterialWeight, `(float)1.0')', NumMaterials, `N', `define(MaterialWeight, ` ifelse($1, 0, `((num_materials > 1) ? weight_table[weight_index] : (float)1.0)', `weight_table[weight_index + $1]')')', `define(MaterialWeight, `weight_table[weight_index + $1]')') dnl dnl AttenuateColor(scan) dnl dnl Scale the color for the current voxel in scanline scan ("top" or "bot") dnl by the current shading factor (the voxel's opacity multiplied by dnl the depth cueing factor). This macro uses non-shadow lighting only. dnl ifelse(ColorChannels, 1, `define(AttenuateColor, ` $1_clr *= shade_factor')', `define(AttenuateColor, ` $1_rclr *= shade_factor; $1_gclr *= shade_factor; $1_bclr *= shade_factor')') dnl dnl AttenuateShadowColor(scan) dnl dnl Scale the color for the current voxel in scanline scan ("top" or "bot") dnl by the current shading factor (the voxel's opacity multiplied by dnl the depth cueing factor). This macro uses shadow lighting only. dnl ifdef(`ShadowBuffer', `ifelse(ColorChannels, 1, `define(AttenuateShadowColor, ` $1_sclr *= shade_factor')', `define(AttenuateShadowColor, ` $1_rsclr *= shade_factor; $1_gsclr *= shade_factor; $1_bsclr *= shade_factor')')', `define(AttenuateShadowColor, `')') dnl dnl ClearAccum() dnl dnl Clear the voxel opacity/color accumulator. dnl define(ClearAccum, ` acc_opc = 0; ClearColorAccum()') dnl dnl Accum(scan, wgt, op) dnl dnl Accumulate opacity and color for scan (either "top" or "bot") dnl weighted by one of the four weights ("TL", "BL", "TR" or "BR") using dnl operation op ("+=" or "="). dnl define(Accum, ` acc_opc $3 $1_opc * wgt$2; AccumColor($1, $2, $3); Trace($1, $2)') dnl dnl Composite() dnl dnl Composite the current resampled voxel. dnl define(Composite, ` COUNT_RESAMPLE; if (acc_opc > min_opacity) { COUNT_COMPOSITE; iopc = ipixel->opcflt; # ifndef SKIP_ERT ASSERT(iopc < max_opacity); # endif iopc_inv = (float)1. - iopc; CompositeColor(); iopc += acc_opc * iopc_inv; ipixel->opcflt = iopc; PrintTrace(); # ifndef SKIP_ERT if (iopc >= max_opacity) { ASSERT(ipixel->lnk == 0); ipixel->lnk = 1; } # endif }') dnl dnl NextIntPixel(c) dnl dnl Increment intermediate image pointer by c pixels. dnl ifdef(`ShadowBuffer', `define(NextIntPixel, `ipixel += $1; shadow_pixel += $1')', `define(NextIntPixel, `ipixel += $1')') dnl dnl Macros that depend on the number of color channels: dnl IntPixelType type of an intermediate image pixel dnl (GrayIntPixel or RGBIntPixel) dnl ClearColorAccum clear the pixel color accumulator dnl AccumColor(scan, wgt, op) dnl accumulate color for scan (either "top" dnl or "bot") weighted by one of the four dnl weights ("TL", "BL", "TR" or "BR") using dnl operation op ("+=" or "=") dnl CompositeColor composite color for current resampled voxel dnl shadow buffer (0 color channels) ifelse(ColorChannels, 0, ` define(IntPixelType, `GrayIntPixel') define(ClearColorAccum, `') define(AccumColor, `') define(CompositeColor, `')') dnl grayscale image (1 color channel) ifelse(ColorChannels, 1, ` #define GRAYSCALE define(IntPixelType, `GrayIntPixel') define(ClearColorAccum, `acc_clr = 0') ifdef(`ShadowBuffer', `define(AccumColor, `acc_clr $3 ($1_clr + $1_sclr * ((float)1.0 - shadow_pixel->opcflt)) * wgt$2')', `define(AccumColor, `acc_clr $3 $1_clr * wgt$2')') define(CompositeColor, `ipixel->clrflt += acc_clr * iopc_inv')') dnl RGB image (3 color channels) ifelse(ColorChannels, 3, ` #define RGB define(IntPixelType, `RGBIntPixel') define(ClearColorAccum, `acc_rclr = acc_gclr = acc_bclr = 0') ifdef(`ShadowBuffer', `define(AccumColor, ` acc_rclr $3 ($1_rclr + $1_rsclr * ((float)1.0 - shadow_pixel->opcflt)) * wgt$2; acc_gclr $3 ($1_gclr + $1_gsclr * ((float)1.0 - shadow_pixel->opcflt)) * wgt$2; acc_bclr $3 ($1_bclr + $1_bsclr * ((float)1.0 - shadow_pixel->opcflt)) * wgt$2')', `define(AccumColor, ` acc_rclr $3 $1_rclr * wgt$2; acc_gclr $3 $1_gclr * wgt$2; acc_bclr $3 $1_bclr * wgt$2')') define(CompositeColor, ` ipixel->rclrflt += acc_rclr * iopc_inv; ipixel->gclrflt += acc_gclr * iopc_inv; ipixel->bclrflt += acc_bclr * iopc_inv')') dnl dnl Macros that depend on the type of volume data structure: dnl VolumeArgs list of function arguments for volume data dnl VolumeArgsDecl declaration of VolumeArgs dnl NextNonZeroTopVoxel(c) increment top voxel ptr. by c nonzero voxels dnl NextZeroTopVoxel(c) increment top voxel ptr. by c zero voxels dnl NextNonZeroBotVoxel(c) increment bot voxel ptr. by c nonzero voxels dnl NextZeroBotVoxel(c) increment bot voxel ptr. by c zero voxels dnl ClassifyVox(opc, vox) classify a voxel and store the result in opc dnl dnl rlevolume (run-length encoded volume) ifelse(VolumeType, `rlevolume', ` #define RLEVOLUME define(VolumeArgs, `run_lengths, voxel_data') define(VolumeArgsDecl, ` unsigned char *run_lengths; /* run lengths for slice */ void *voxel_data; /* voxel data for slice */') define(NextNonZeroTopVoxel, `topRLEdata += $1 * voxel_istride') define(NextZeroTopVoxel, `') define(NextNonZeroBotVoxel, `botRLEdata += $1 * voxel_istride') define(NextZeroBotVoxel, `') define(ClassifyVox, `$1 = opac_correct[ByteField($2, voxel_istride-1)]')') dnl rawvolume (3D volume array, optionally with a min-max octree) ifelse(VolumeType, `rawvolume', ` #define RAWVOLUME define(VolumeArgs, `voxel_data, voxel_istride, voxel_jstride') define(VolumeArgsDecl, ` void *voxel_data; /* voxel data for slice */ int voxel_istride; /* strides for voxel data */ int voxel_jstride;') define(NextNonZeroTopVoxel, `topRLEdata += $1 * voxel_istride') define(NextZeroTopVoxel, `topRLEdata += $1 * voxel_istride') define(NextNonZeroBotVoxel, `botRLEdata += $1 * voxel_istride') define(NextZeroBotVoxel, `botRLEdata += $1 * voxel_istride') define(ClassifyVox, ` opac_param = VoxelField($2, param0_offset, param0_size); opacity = param0_table[opac_param]; if (param1_size != 0) { opac_param = VoxelField($2, param1_offset, param1_size); opacity *= param1_table[opac_param]; if (param2_size != 0) { opac_param = VoxelField($2, param2_offset, param2_size); opacity *= param2_table[opac_param]; } } if (opacity > min_opacity) { opacity_int = opacity*255.; $1 = opac_correct[opacity_int]; } else { $1 = (float)0.; }')') dnl rlevolume + IndexVolume (experimental data structure that contains dnl a mapping from voxel coordinates to location of voxel in rlevolume) ifdef(`IndexVolume', ` #define INDEX_VOLUME define(`VolumeArgs', `run_lengths, voxel_data, voxel_index') define(`VolumeArgsDecl', ` unsigned char *run_lengths; /* run lengths for slice */ void *voxel_data; /* voxel data for slice */ VoxelLocation *voxel_index; /* index for ERT */')', ` #undef INDEX_VOLUME') dnl dnl Macros for rendering shadows: dnl ShadowArgs list of function arguments for shadow buffer dnl ShadowArgsDecl declaration of ShadowArgs dnl ifdef(`ShadowBuffer', ` define(ShadowArgs, `, shadow_buffer') define(ShadowArgsDecl, `GrayIntPixel *shadow_buffer;')',` define(ShadowArgs, `') define(ShadowArgsDecl, `')') dnl dnl Macros for pixel tracing (a printout of all of the voxels and dnl filter weights that contribute to one intermediate image pixel). dnl dnl dnl NewPixel() dnl dnl Prepare to process a new pixel by clearing tracing buffers. dnl define(NewPixel, ` #ifdef DEBUG if (ipixel == trace_pixel_ptr) { trace_opcTL = 0.; trace_opcBL = 0.; trace_opcTR = 0.; trace_opcBR = 0.; trace_rsclrTL=0.; trace_rsclrBL=0.; trace_rsclrTR=0.; trace_rsclrBR=0.; trace_rclrTL= 0.; trace_rclrBL= 0.; trace_rclrTR= 0.; trace_rclrBR= 0.; trace_gclrTL= 0.; trace_gclrBL= 0.; trace_gclrTR= 0.; trace_gclrBR= 0.; trace_bclrTL= 0.; trace_bclrBL= 0.; trace_bclrTR= 0.; trace_bclrBR= 0.; } #endif ') dnl dnl Trace(scan, wgt) dnl dnl Store voxel opacity and color from the specified scanline ("top" or "bot") dnl in the tracing buffer associated with the specified weight ("TR", "BR", dnl "TL", "BL"). dnl define(Trace, ` #ifdef DEBUG if (ipixel == trace_pixel_ptr) { trace_opc$2 = $1_opc; ifelse(ColorChannels, 1, `trace_rclr$2 = $1_clr;', ColorChannels, 3, `trace_rclr$2 = $1_rclr; trace_gclr$2 = $1_gclr; trace_bclr$2 = $1_bclr;') ifdef(`ShadowBuffer', `ifelse(ColorChannels, 1, `trace_rsclr$2 = $1_sclr;')') } #endif ') dnl dnl PrintTrace() dnl dnl Print one line of the trace. dnl define(PrintTrace, ` #ifdef DEBUG if (ipixel == trace_pixel_ptr) { #ifdef COMPUTE_SHADOW_BUFFER printf("{%3d} %3d %3d", k, icount-i-count, j); #else printf("[%3d] %3d %3d", k, icount-i-count, j); #endif printf(" %3.0f %3.0f %3.0f",trace_opcTL*255.,trace_rclrTL,wgtTL*100.); printf(" %3.0f %3.0f %3.0f",trace_opcBL*255.,trace_rclrBL,wgtBL*100.); printf(" %3.0f %3.0f %3.0f",trace_opcTR*255.,trace_rclrTR,wgtTR*100.); printf(" %3.0f %3.0f %3.0f",trace_opcBR*255.,trace_rclrBR,wgtBR*100.); printf(" %3.0f %3.0f\n", iopc*255., ifelse(ColorChannels, 3, `ipixel->rclrflt', ColorChannels, 1, `ipixel->clrflt', `0')); ifdef(`ShadowBuffer', ` printf(" "); printf(" %3.0f ",trace_rsclrTL); printf(" %3.0f ",trace_rsclrBL); printf(" %3.0f ",trace_rsclrTR); printf(" %3.0f ",trace_rsclrBR); printf(" %3.0f\n", shadow_pixel->opcflt * 255.);') ifelse(ColorChannels, 3, ` printf(" "); printf(" %3.0f ",trace_gclrTL); printf(" %3.0f ",trace_gclrBL); printf(" %3.0f ",trace_gclrTR); printf(" %3.0f ",trace_gclrBR); printf(" %3.0f\n", ipixel->gclrflt); printf(" "); printf(" %3.0f ",trace_bclrTL); printf(" %3.0f ",trace_bclrBL); printf(" %3.0f ",trace_bclrTR); printf(" %3.0f ",trace_bclrBR); printf(" %3.0f\n", ipixel->bclrflt);') } #endif /* DEBUG */ ') /* codes indicating the types of a pair of runs in adjacent scanlines */ #define ALL_ZERO 0 /* both runs are runs of zeros */ #define TOP_NONZERO 1 /* run for top scanline has nonzero data */ #define BOT_NONZERO 2 /* run for bottom scanline has nonzero data */ #define ALL_NONZERO 3 /* both runs have nonzero data */ /* codes indicating the types for the current left and right voxel pairs */ #define ALL_ZERO__ALL_ZERO ((ALL_ZERO << 2) | ALL_ZERO) #define ALL_ZERO__TOP_NONZERO ((ALL_ZERO << 2) | TOP_NONZERO) #define ALL_ZERO__BOT_NONZERO ((ALL_ZERO << 2) | BOT_NONZERO) #define ALL_ZERO__ALL_NONZERO ((ALL_ZERO << 2) | ALL_NONZERO) #define TOP_NONZERO__ALL_ZERO ((TOP_NONZERO << 2) | ALL_ZERO) #define TOP_NONZERO__TOP_NONZERO ((TOP_NONZERO << 2) | TOP_NONZERO) #define TOP_NONZERO__BOT_NONZERO ((TOP_NONZERO << 2) | BOT_NONZERO) #define TOP_NONZERO__ALL_NONZERO ((TOP_NONZERO << 2) | ALL_NONZERO) #define BOT_NONZERO__ALL_ZERO ((BOT_NONZERO << 2) | ALL_ZERO) #define BOT_NONZERO__TOP_NONZERO ((BOT_NONZERO << 2) | TOP_NONZERO) #define BOT_NONZERO__BOT_NONZERO ((BOT_NONZERO << 2) | BOT_NONZERO) #define BOT_NONZERO__ALL_NONZERO ((BOT_NONZERO << 2) | ALL_NONZERO) #define ALL_NONZERO__ALL_ZERO ((ALL_NONZERO << 2) | ALL_ZERO) #define ALL_NONZERO__TOP_NONZERO ((ALL_NONZERO << 2) | TOP_NONZERO) #define ALL_NONZERO__BOT_NONZERO ((ALL_NONZERO << 2) | BOT_NONZERO) #define ALL_NONZERO__ALL_NONZERO ((ALL_NONZERO << 2) | ALL_NONZERO) #ifdef SKIP_ERT #define PIXEL_IS_OPAQUE(ipixel) 0 #else #define PIXEL_IS_OPAQUE(ipixel) ((ipixel)->lnk != 0) #endif #ifdef STATISTICS extern int vpResampleCount; extern int vpCompositeCount; extern int vpERTSkipCount; extern int vpERTSkipAgainCount; extern int vpERTUpdateCount; extern int vpSpecialZeroSkipCount; extern int vpRunFragmentCount; #define COUNT_RESAMPLE vpResampleCount++ #define COUNT_COMPOSITE vpCompositeCount++ #define COUNT_ERT_SKIP vpERTSkipCount++ #define COUNT_ERT_SKIP_AGAIN vpERTSkipAgainCount++ #define COUNT_ERT_UPDATE vpERTUpdateCount++ #define COUNT_SPECIAL_ZERO_SKIP vpSpecialZeroSkipCount++ #define COUNT_RUN_FRAGMENT vpRunFragmentCount++ #else #define COUNT_RESAMPLE #define COUNT_COMPOSITE #define COUNT_ERT_SKIP #define COUNT_ERT_SKIP_AGAIN #define COUNT_ERT_UPDATE #define COUNT_SPECIAL_ZERO_SKIP #define COUNT_RUN_FRAGMENT #endif /* STATISTICS */ /* * FuncName * * Compositing routine for run-length encoded volume data slices. * Decode and resample one slice of volume data, and composite * it into the intermediate image. The resampling filter is a bilirp. */ void FuncName (vpc, icount, jcount, k, slice_depth_cueing_dbl, intimage, weightTLdbl, weightBLdbl, weightTRdbl, weightBRdbl, VolumeArgs ShadowArgs) vpContext *vpc; /* context */ int icount; /* slice size */ int jcount; int k; /* slice number */ double slice_depth_cueing_dbl; /* depth cueing factor for slice */ IntPixelType *intimage; /* intermediate image pixels */ double weightTLdbl; /* resampling weights */ double weightBLdbl; double weightTRdbl; double weightBRdbl; VolumeArgsDecl ShadowArgsDecl { int i, j; /* voxel index in rotated object space */ IntPixelType *ipixel; /* current intermediate image pixel */ IntPixelType *ipixel2; /* another intermediate image pixel */ int update_interval; /* # of pixels to skip when updating links */ float iopc; /* intermediate pixel opacity (0-1) */ float iopc_inv; /* 1-iopc */ float acc_opc; /* accumulator for resampled voxel opacity */ float top_opc, bot_opc; /* voxel opacity (top and bottom scanlines) */ #ifdef NO_REUSE_VOXEL #define voxels_loaded 0 #define CLEAR_VOXELS_LOADED #define SET_VOXELS_LOADED #else int voxels_loaded; /* if true, top/bot_opc contain valid data loaded during the last resample */ #define CLEAR_VOXELS_LOADED voxels_loaded = 0 #define SET_VOXELS_LOADED voxels_loaded = 1 #endif float wgtTL, wgtBL, /* weights in the range 0..1 which give the */ wgtTR, wgtBR; /* fractional contribution of the */ /* neighboring voxels to the current */ /* intermediate image pixel */ unsigned char *topRLElen; /* length of current run in top scanline */ unsigned char *botRLElen; /* length of current run in bottom scanline */ char *topRLEdata; /* data for current run in top scanline */ char *botRLEdata; /* data for current run in bottom scanline */ int toprun_count; /* number of voxels left in top run */ int botrun_count; /* number of voxels left in bottom run */ int last_run_state; /* run state code for last resample */ int run_state; /* run state code for this resample */ int final_run_state; /* run state code for end of scanline */ float min_opacity; /* low opacity threshold */ float max_opacity; /* high opacity threshold */ float slice_depth_cueing; /* depth cueing factor for slice */ float *opac_correct; /* opacity correction table */ int ert_skip_count; /* number of pixels to skip for ERT */ int intermediate_width; /* width of intermediate image in pixels */ int count; /* voxels left in current run */ float *shade_table; /* shade lookup table */ int norm_offset; /* byte offset to shade table index in voxel */ int shade_index; /* shade index */ float shade_factor; /* attenuation factor for color (voxel opacity * depth cueing) */ #ifdef MULTIPLE_MATERIALS float *weight_table; /* weight lookup table */ int wgt_offset; /* byte offset to weight table index */ int weight_index; /* weight index */ int m, num_materials; float weight1, weight2; #endif /* MULTIPLE_MATERIALS */ #ifdef GRAYSCALE float acc_clr; /* accumulator for resampled color */ float top_clr, bot_clr; /* voxel color (top and bottom scanlines) */ #endif /* GRAYSCALE */ #ifdef RGB float acc_rclr; /* accumulator for resampled color */ float acc_gclr; float acc_bclr; float top_rclr; /* voxel color (top and bottom scanlines) */ float bot_rclr; float top_gclr; float bot_gclr; float top_bclr; float bot_bclr; #endif #ifdef RLEVOLUME int voxel_istride; /* size of a voxel in bytes */ #endif #ifdef RAWVOLUME int use_octree; /* if true then use the min-max octree */ MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; /* stack for traversal of min-max octree */ int scans_left; /* scanlines until next octree traversal */ int best_view_axis; /* viewing axis */ unsigned char runlen_buf1[VP_MAX_VOLUME_DIM]; /* buffers for run lengths */ unsigned char runlen_buf2[VP_MAX_VOLUME_DIM]; unsigned char *top_len_base;/* first run length for top scanline */ unsigned char *bot_len_base;/* first run length for bottom scanline */ int opac_param; /* parameter to opacity transfer function */ float opacity; /* voxel opacity */ int opacity_int; /* voxel opacity truncated to an integer */ int param0_offset; /* offset to first parameter in voxel */ int param0_size; /* size of first parameter in bytes */ float *param0_table; /* lookup table for first parameter */ int param1_offset; /* offset to second parameter in voxel */ int param1_size; /* size of second parameter in bytes */ float *param1_table; /* lookup table for second parameter */ int param2_offset; /* offset to third parameter in voxel */ int param2_size; /* size of third parameter in bytes */ float *param2_table; /* lookup table for third parameter */ #endif /* RAWVOLUME */ #ifdef INDEX_VOLUME unsigned char *scanline_topRLElen; /* first topRLElen in scanline */ unsigned char *scanline_botRLElen; /* first botRLElen in scanline */ char *scanline_topRLEdata; /* first topRLEdata in scanline */ char *scanline_botRLEdata; /* first botRLEdata in scanline */ VoxelLocation *top_voxel_index; /* voxel indexes for top scanline */ VoxelLocation *bot_voxel_index; /* voxel indexes for bot scanline */ VoxelLocation *vindex; int next_i; /* i coordinate of voxel to skip to */ int next_scan; /* true if skipped to next scanline */ #endif /* INDEX_VOLUME */ #ifdef CALLBACK /* shading callback function */ #ifdef GRAYSCALE void (*shade_func) ANSI_ARGS((void *, float *, void *)); #endif #ifdef RGB void (*shade_func) ANSI_ARGS((void *, float *, float *, float *, void *)); #endif void *client_data; /* client data handle */ #endif /* CALLBACK */ #ifdef USE_SHADOW_BUFFER float *shadow_table; /* color lookup table for shadows */ int shadow_width; /* width of shadow buffer */ GrayIntPixel *shadow_pixel; /* current shadow buffer pixel */ #ifdef GRAYSCALE float top_sclr, bot_sclr; /* shadow color (top and bottom scanlines) */ #endif /* GRAYSCALE */ #ifdef RGB float top_rsclr; /* shadow color (top and bottom scanlines) */ float bot_rsclr; float top_gsclr; float bot_gsclr; float top_bsclr; float bot_bsclr; #endif #endif /* SHADOW_BUFFER */ #ifdef DEBUG float trace_opcTL, trace_opcBL, trace_opcTR, trace_opcBR; float trace_rsclrTL, trace_rsclrBL, trace_rsclrTR, trace_rsclrBR; float trace_rclrTL, trace_rclrBL, trace_rclrTR, trace_rclrBR; float trace_gclrTL, trace_gclrBL, trace_gclrTR, trace_gclrBR; float trace_bclrTL, trace_bclrBL, trace_bclrTR, trace_bclrBR; IntPixelType *trace_pixel_ptr; #ifdef COMPUTE_SHADOW_BUFFER int slice_u_int, shadow_slice_u_int; int slice_v_int, shadow_slice_v_int; #endif #endif /* DEBUG */ DECLARE_HIRES_TIME(t0); DECLARE_HIRES_TIME(t1); /******************************************************************* * Copy parameters from the rendering context into local variables. *******************************************************************/ GET_HIRES_TIME(vpc, t0); wgtTL = weightTLdbl; wgtBL = weightBLdbl; wgtTR = weightTRdbl; wgtBR = weightBRdbl; slice_depth_cueing = slice_depth_cueing_dbl; min_opacity = vpc->min_opacity; max_opacity = vpc->max_opacity; #ifdef USE_SHADOW_BUFFER opac_correct = vpc->shadow_opac_correct; #else opac_correct = vpc->affine_opac_correct; #endif #ifdef COMPUTE_SHADOW_BUFFER intermediate_width = vpc->shadow_width; #else intermediate_width = vpc->intermediate_width; #endif #ifdef USE_SHADOW_BUFFER shadow_table = vpc->shadow_color_table; shadow_width = vpc->shadow_width; shadow_pixel = shadow_buffer; #endif ipixel = intimage; shade_table = vpc->shade_color_table; norm_offset = vpc->field_offset[vpc->color_field]; #ifdef MULTIPLE_MATERIALS weight_table = vpc->shade_weight_table; wgt_offset = vpc->field_offset[vpc->weight_field]; num_materials = vpc->num_materials; #endif /* MULTIPLE_MATERIALS */ #ifdef RLEVOLUME topRLEdata = voxel_data; botRLEdata = voxel_data; topRLElen = run_lengths; botRLElen = run_lengths; voxel_istride = vpc->rle_bytes_per_voxel; #endif /* RLEVOLUME */ #ifdef RAWVOLUME ASSERT(vpc->num_clsfy_params > 0); ASSERT(vpc->num_clsfy_params < 3); param0_offset = vpc->field_offset[vpc->param_field[0]]; param0_size = vpc->field_size[vpc->param_field[0]]; param0_table = vpc->clsfy_table[0]; if (vpc->num_clsfy_params > 1) { param1_offset = vpc->field_offset[vpc->param_field[1]]; param1_size = vpc->field_size[vpc->param_field[1]]; param1_table = vpc->clsfy_table[1]; } else { param1_offset = 0; param1_size = 0; param1_table = NULL; } if (vpc->num_clsfy_params > 2) { param2_offset = vpc->field_offset[vpc->param_field[2]]; param2_size = vpc->field_size[vpc->param_field[2]]; param2_table = vpc->clsfy_table[2]; } else { param2_offset = 0; param2_size = 0; param2_table = NULL; } if (vpc->mm_octree == NULL) { use_octree = 0; } else { use_octree = 1; best_view_axis = vpc->best_view_axis; VPInitOctreeLevelStack(vpc, level_stack, best_view_axis, k); scans_left = 0; bot_len_base = runlen_buf1; } #endif /* RAWVOLUME */ #ifdef CALLBACK shade_func = vpc->shade_func; client_data = vpc->client_data; ASSERT(shade_func != NULL); #endif #ifdef DEBUG trace_pixel_ptr = 0; if (vpc->trace_u >= 0 && vpc->trace_v >= 0) { #ifdef GRAYSCALE trace_pixel_ptr = &vpc->int_image.gray_intim[vpc->trace_u + vpc->trace_v*vpc->intermediate_width]; #endif #ifdef RGB trace_pixel_ptr = &vpc->int_image.rgb_intim[vpc->trace_u + vpc->trace_v*vpc->intermediate_width]; #endif #ifdef COMPUTE_SHADOW_BUFFER slice_u_int = (int)ceil(vpc->shear_i * vpc->trace_shadow_k + vpc->trans_i) - 1; shadow_slice_u_int = (int)ceil(vpc->shadow_shear_i * vpc->trace_shadow_k + vpc->shadow_trans_i) - 1; slice_v_int = (int)ceil(vpc->shear_j * vpc->trace_shadow_k + vpc->trans_j) - 1; shadow_slice_v_int = (int)ceil(vpc->shadow_shear_j * vpc->trace_shadow_k + vpc->shadow_trans_j) - 1; trace_pixel_ptr = &vpc->shadow_buffer[vpc->trace_u + shadow_slice_u_int - slice_u_int + (vpc->trace_v + shadow_slice_v_int - slice_v_int)*vpc->shadow_width]; #endif } #endif /* DEBUG */ /******************************************************************* * Loop over voxel scanlines. *******************************************************************/ for (j = 0; j <= jcount; j++) { /*************************************************************** * Initialize counters and flags. ***************************************************************/ i = icount; CLEAR_VOXELS_LOADED; last_run_state = ALL_ZERO; #ifdef RAWVOLUME botRLEdata = (char *)voxel_data + j*voxel_jstride; topRLEdata = botRLEdata - voxel_jstride; if (!use_octree) { if (j == 0) { run_state = BOT_NONZERO; toprun_count = icount+2; botrun_count = icount; } else if (j == jcount) { run_state = TOP_NONZERO; toprun_count = icount; botrun_count = icount+2; } else { run_state = ALL_NONZERO; toprun_count = icount; botrun_count = icount; } } else #endif /* RAWVOLUME */ if (j == 0) { run_state = BOT_NONZERO; toprun_count = icount+2; botrun_count = 0; } else if (j == jcount) { run_state = TOP_NONZERO; toprun_count = 0; botrun_count = icount+2; } else { run_state = ALL_NONZERO; toprun_count = 0; botrun_count = 0; } #ifdef INDEX_VOLUME scanline_topRLElen = topRLElen; scanline_botRLElen = botRLElen; scanline_topRLEdata = topRLEdata; scanline_botRLEdata = botRLEdata; if (j == 0) { top_voxel_index = voxel_index; bot_voxel_index = voxel_index; } else { top_voxel_index = bot_voxel_index; bot_voxel_index += icount; } #endif /* INDEX_VOLUME */ /*************************************************************** * If the volume is not run-length encoded, use the min-max * to find run lengths for the current voxel scanline. ***************************************************************/ #ifdef RAWVOLUME if (use_octree) { top_len_base = bot_len_base; if (scans_left == 0) { if (bot_len_base == runlen_buf1) bot_len_base = runlen_buf2; else bot_len_base = runlen_buf1; GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_TRAVERSE_RUNS, t0, t1); COPY_HIRES_TIME(t0, t1); scans_left = VPComputeScanRuns(vpc, level_stack, bot_len_base, best_view_axis, j, icount); GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_TRAVERSE_OCTREE, t0, t1); COPY_HIRES_TIME(t0, t1); } #ifdef DEBUG if (j > 0) VPCheckRuns(vpc, top_len_base, best_view_axis, k, j-1); if (j < jcount) VPCheckRuns(vpc, bot_len_base, best_view_axis, k, j); #endif scans_left--; topRLElen = top_len_base; botRLElen = bot_len_base; } #endif /* RAWVOLUME */ /*************************************************************** * Loop over runs in the voxel scanline. ***************************************************************/ Debug((vpc, VPDEBUG_COMPOSITE, "StartIScan(u=%d,v=%d)\n", (((int)ipixel - (int)vpc->int_image.gray_intim) / sizeof(IntPixelType)) % vpc->intermediate_width, (((int)ipixel - (int)vpc->int_image.gray_intim) / sizeof(IntPixelType)) / vpc->intermediate_width)); #ifdef UNROLL_RUN_LOOP while (i > 0) { #else while (i >= 0) { #endif /*********************************************************** * Skip over any empty runs at beginning of scanline. ***********************************************************/ if (last_run_state == ALL_ZERO) { #ifndef UNROLL_RUN_LOOP if (i == 0) { Debug((vpc, VPDEBUG_COMPOSITE, "ZeroSkip(1)End\n")); NextIntPixel(1); final_run_state = ALL_ZERO; i = -1; break; /* scanline is done */ } #endif /* check if this is the start of a new run */ while (toprun_count == 0) { toprun_count = *topRLElen++; run_state ^= 1; } while (botrun_count == 0) { botrun_count = *botRLElen++; run_state ^= 2; } if (run_state == ALL_ZERO) { COUNT_SPECIAL_ZERO_SKIP; /* find the union of the two runs of voxels */ count = MIN(toprun_count, botrun_count); toprun_count -= count; botrun_count -= count; NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); i -= count; ASSERT(i >= 0); Debug((vpc, VPDEBUG_COMPOSITE, "ZeroSkip(%d)\n", count)); continue; } } #ifndef SKIP_ERT /*********************************************************** * Skip over opaque pixels (early-ray termination). ***********************************************************/ if ((ert_skip_count = ipixel->lnk) != 0) { GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_TRAVERSE_RUNS, t0, t1); COPY_HIRES_TIME(t0, t1); COUNT_ERT_SKIP; #ifndef UNROLL_RUN_LOOP if (i == 0) { NextIntPixel(1); final_run_state = last_run_state; i = -1; Debug((vpc, VPDEBUG_COMPOSITE, "ERTSkip(1)End\n")); break; /* scanline is done */ } #endif /* find out how many pixels to skip */ if (ert_skip_count < i && (count = ipixel[ert_skip_count].lnk) != 0) { /* follow pointer chain */ do { COUNT_ERT_SKIP_AGAIN; ert_skip_count += count; } while (ert_skip_count < i && (count = ipixel[ert_skip_count].lnk) != 0); /* update some of the lnk pointers in the run of opaque pixels; the more links we update the longer it will take to perform the update, but we will potentially save time in future slices by not having to follow long pointer chains */ ipixel2 = ipixel; update_interval = 1; count = ert_skip_count - 1; while (count > 0) { COUNT_ERT_UPDATE; ipixel2 += update_interval; if (count > 255) ipixel2->lnk = 255; else ipixel2->lnk = count; update_interval *= 2; count -= update_interval; } /* update the current link */ COUNT_ERT_UPDATE; if (ert_skip_count > 255) ert_skip_count = 255; ipixel->lnk = ert_skip_count; } /* skip over the opaque pixels */ if (ert_skip_count > i) ert_skip_count = i; Debug((vpc, VPDEBUG_COMPOSITE,"ERTSkip(%d)\n",ert_skip_count)); NextIntPixel(ert_skip_count); CLEAR_VOXELS_LOADED; #ifdef INDEX_VOLUME /* compute i coordinate of voxel to skip to */ next_i = icount - i + ert_skip_count; if (next_i == icount) { next_i--; next_scan = 1; } else { next_scan = 0; } /* skip over voxels in top scanline */ vindex = &top_voxel_index[next_i]; toprun_count = vindex->run_count; topRLElen = scanline_topRLElen + vindex->len_offset; if (vindex->data_offset & INDEX_RUN_IS_ZERO) { run_state &= ~1; topRLEdata = scanline_topRLEdata + (vindex->data_offset & ~INDEX_RUN_IS_ZERO); } else { run_state |= 1; topRLEdata = scanline_topRLEdata + vindex->data_offset; } /* skip over voxels in bottom scanline */ vindex = &bot_voxel_index[next_i]; botrun_count = vindex->run_count; botRLElen = scanline_botRLElen + vindex->len_offset; if (vindex->data_offset & INDEX_RUN_IS_ZERO) { run_state &= ~2; botRLEdata = scanline_botRLEdata + (vindex->data_offset & ~INDEX_RUN_IS_ZERO); } else { run_state |= 2; botRLEdata = scanline_botRLEdata + vindex->data_offset; } /* special case to skip over last voxel in scanline */ if (next_scan) { /* advance to beginning of next top scanline */ while (toprun_count == 0) { toprun_count = *topRLElen++; run_state ^= 1; } toprun_count--; if (run_state & 1) { NextNonZeroTopVoxel(1); } else { NextZeroTopVoxel(1); } /* advance to beginning of next bottom scanline */ while (botrun_count == 0) { botrun_count = *botRLElen++; run_state ^= 2; } botrun_count--; if (run_state & 2) { NextNonZeroBotVoxel(1); } else { NextZeroBotVoxel(1); } } #else /* !INDEX_VOLUME */ /* skip over voxels in top scanline */ count = ert_skip_count; for (;;) { if (toprun_count >= count) { toprun_count -= count; if (run_state & 1) { NextNonZeroTopVoxel(count); } else { NextZeroTopVoxel(count); } break; } else { count -= toprun_count; if (run_state & 1) { NextNonZeroTopVoxel(toprun_count); } else { NextZeroTopVoxel(toprun_count); } toprun_count = *topRLElen++; if (toprun_count == 0) toprun_count = *topRLElen++; else run_state ^= 1; } } /* skip over voxels in bottom scanline */ count = ert_skip_count; for (;;) { if (botrun_count >= count) { botrun_count -= count; if (run_state & 2) { NextNonZeroBotVoxel(count); } else { NextZeroBotVoxel(count); } break; } else { count -= botrun_count; if (run_state & 2) { NextNonZeroBotVoxel(botrun_count); } else { NextZeroBotVoxel(botrun_count); } botrun_count = *botRLElen++; if (botrun_count == 0) botrun_count = *botRLElen++; else run_state ^= 2; } } #endif /* INDEX_VOLUME */ i -= ert_skip_count; last_run_state = run_state; if (i == 0) { #ifdef UNROLL_RUN_LOOP break; #else if (last_run_state == ALL_ZERO) { NextIntPixel(1); final_run_state = ALL_ZERO; i = -1; Debug((vpc, VPDEBUG_COMPOSITE, "ZeroSkip(1)End\n")); break; /* scanline is done */ } if (ipixel->lnk != 0) { NextIntPixel(1); final_run_state = last_run_state; i = -1; Debug((vpc, VPDEBUG_COMPOSITE, "ERTSkip(1)End\n")); break; /* scanline is done */ } #endif /* UNROLL_RUN_LOOP */ } GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_ERT, t0, t1); COPY_HIRES_TIME(t0, t1); } ASSERT(ipixel->opcflt < max_opacity); #endif /* SKIP_ERT */ /*********************************************************** * Compute the length of the current run. ***********************************************************/ #ifndef UNROLL_RUN_LOOP if (i == 0) { final_run_state = last_run_state; run_state = ALL_ZERO; i = -1; count = 1; Debug((vpc, VPDEBUG_COMPOSITE, "Run(1)End\n")); } else { #endif /* check if this is the start of a new run */ while (toprun_count == 0) { toprun_count = *topRLElen++; run_state ^= 1; } while (botrun_count == 0) { botrun_count = *botRLElen++; run_state ^= 2; } /* find the union of the two runs of voxels */ count = MIN(toprun_count, botrun_count); toprun_count -= count; botrun_count -= count; i -= count; Debug((vpc, VPDEBUG_COMPOSITE, "Run(%d)\n", count)); ASSERT(i >= 0); #ifndef UNROLL_RUN_LOOP } #endif COUNT_RUN_FRAGMENT; /*********************************************************** * composite the voxels in the current run. ***********************************************************/ GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_TRAVERSE_RUNS, t0, t1); COPY_HIRES_TIME(t0, t1); #ifdef SKIP_COMPOSITE switch (run_state) { case ALL_ZERO: NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case TOP_NONZERO: NextIntPixel(count); NextNonZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case BOT_NONZERO: NextIntPixel(count); NextZeroTopVoxel(count); NextNonZeroBotVoxel(count); count = 0; break; case ALL_NONZERO: NextIntPixel(count); NextNonZeroTopVoxel(count); NextNonZeroBotVoxel(count); count = 0; break; } #else /* !SKIP_COMPOSITE */ #ifdef UNROLL_RUN_LOOP /* this run contains pixels, so process them */ switch ((last_run_state << 2) | run_state) { case ALL_ZERO__ALL_ZERO: /* no voxels contribute to the pixels in this run */ NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case TOP_NONZERO__ALL_ZERO: /* only the top-left voxel contributes to the first pixel of the run, and the rest are zero */ if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); Composite(); NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case BOT_NONZERO__ALL_ZERO: /* only the bottom left voxel contributes to the first pixel of the run, and the rest are zero */ if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); Composite(); NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case ALL_NONZERO__ALL_ZERO: /* the top and bottom left voxels contribute to the first pixel of the run, and the rest are zero */ if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); Composite(); NextIntPixel(count); NextZeroTopVoxel(count); NextZeroBotVoxel(count); count = 0; break; case ALL_ZERO__TOP_NONZERO: /* first pixel: only the top-right voxel contributes */ LoadTopRight(); NewPixel(); Accum(top, TR, =); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; the top-left and top-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case TOP_NONZERO__TOP_NONZERO: /* do the pixels in this run; the top-left and top-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case BOT_NONZERO__TOP_NONZERO: /* first pixel: bottom-left and top-right voxels contribute */ if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; the top-left and top-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case ALL_NONZERO__TOP_NONZERO: /* first pixel: top-left, bottom-left and top-right voxels contribute */ if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; the top-left and top-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadTopRight(); Accum(top, TR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case ALL_ZERO__BOT_NONZERO: /* first pixel: only the bottom-right voxel contributes */ LoadBotRight(); NewPixel(); Accum(bot, BR, =); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; bottom-left and bottom-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case TOP_NONZERO__BOT_NONZERO: /* first pixel: top-left and bottom-right voxels contribute */ if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; bottom-left and bottom-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case BOT_NONZERO__BOT_NONZERO: /* do the pixels in this run; bottom-left and bottom-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case ALL_NONZERO__BOT_NONZERO: /* first pixel: top-left, bottom-left and bottom-right voxels contribute */ if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; bottom-left and bottom-right voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadBotRight(); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case ALL_ZERO__ALL_NONZERO: /* first pixel: top-right and bottom-right voxels contribute */ LoadTopRight(); LoadBotRight(); NewPixel(); Accum(top, TR, =); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; all four voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case TOP_NONZERO__ALL_NONZERO: /* first pixel: top-left, top-right and bottom-right voxels contribute */ if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; all four voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case BOT_NONZERO__ALL_NONZERO: /* first pixel: bottom-left, top-right and bottom-right voxels contribute */ if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; /* do the rest of the pixels in this run; all four voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; case ALL_NONZERO__ALL_NONZERO: /* do the pixels in this run; all four voxels contribute */ while (count > 0) { if (PIXEL_IS_OPAQUE(ipixel)) break; if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); LoadTopRight(); LoadBotRight(); Accum(top, TR, +=); Accum(bot, BR, +=); Composite(); NextIntPixel(1); NextNonZeroTopVoxel(1); NextNonZeroBotVoxel(1); count--; SET_VOXELS_LOADED; } break; default: VPBug("illegal value for run states in compositing loop"); } #else /* UNROLL_RUN_LOOP */ /* this run contains pixels, so process them */ while (count > 0) { if (last_run_state == ALL_ZERO && run_state == ALL_ZERO) { NextIntPixel(count); if (i != -1) { NextZeroTopVoxel(count); NextZeroBotVoxel(count); } count = 0; break; } if (ipixel->lnk != 0) break; NewPixel(); ClearAccum(); if (last_run_state & TOP_NONZERO) { if (!voxels_loaded) { LoadTopLeft(); } Accum(top, TL, +=); } if (last_run_state & BOT_NONZERO) { if (!voxels_loaded) { LoadBotLeft(); } Accum(bot, BL, +=); } if (run_state & TOP_NONZERO) { LoadTopRight(); Accum(top, TR, +=); NextNonZeroTopVoxel(1); } else { if (i != -1) { NextZeroTopVoxel(1); } } if (run_state & BOT_NONZERO) { LoadBotRight(); Accum(bot, BR, +=); NextNonZeroBotVoxel(1); } else { if (i != -1) { NextZeroBotVoxel(1); } } Composite(); NextIntPixel(1); count--; SET_VOXELS_LOADED; last_run_state = run_state; } #endif /* UNROLL_RUN_LOOP */ GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_PROCESS_VOXELS, t0, t1); COPY_HIRES_TIME(t0, t1); if (count > 0) { Debug((vpc, VPDEBUG_COMPOSITE, "Backup(%d)\n", count)); toprun_count += count; botrun_count += count; i += count; } #endif /* SKIP_COMPOSITE */ /*********************************************************** * Go on to next voxel run. ***********************************************************/ last_run_state = run_state; } /* while (i > 0) */ /*************************************************************** * Finish processing voxel scanline and go on to next one. ***************************************************************/ #ifdef UNROLL_RUN_LOOP ASSERT(i == 0); #else ASSERT(i == -1); #endif #ifndef SKIP_COMPOSITE #ifdef UNROLL_RUN_LOOP /* do the last pixel (to the right of the last voxel) */ if (last_run_state != ALL_ZERO && !PIXEL_IS_OPAQUE(ipixel)) { /* last voxels are nonzero and the pixel is not opaque yet so there is work to be done */ Debug((vpc, VPDEBUG_COMPOSITE, "Run(1)End\n")); switch (last_run_state) { case TOP_NONZERO: /* only the top-left voxel contributes */ if (!voxels_loaded) { LoadTopLeft(); } NewPixel(); Accum(top, TL, =); Composite(); break; case BOT_NONZERO: /* only the bottom left voxel contributes */ if (!voxels_loaded) { LoadBotLeft(); } NewPixel(); Accum(bot, BL, =); Composite(); break; case ALL_NONZERO: /* the top and bottom left voxels contribute */ if (!voxels_loaded) { LoadTopLeft(); LoadBotLeft(); } NewPixel(); Accum(top, TL, =); Accum(bot, BL, +=); Composite(); break; default: VPBug("illegal value for run state at end of scanline"); } } else if (last_run_state == ALL_ZERO) { Debug((vpc, VPDEBUG_COMPOSITE, "ZeroSkip(1)End\n")); } else { Debug((vpc, VPDEBUG_COMPOSITE, "ERTSkip(1)End\n")); } #endif /* UNROLL_RUN_LOOP */ #endif /* SKIP_COMPOSITE */ #ifndef UNROLL_RUN_LOOP run_state = final_run_state; #endif /* skip over any zero-length runs remaining in this scanline */ if (j != 0 && ((run_state & 1) == 0)) { toprun_count = *topRLElen++; ASSERT(toprun_count == 0); } if (j != jcount && ((run_state & 2) == 0)) { botrun_count = *botRLElen++; ASSERT(botrun_count == 0); } /* go to next intermediate image scanline */ #ifdef UNROLL_RUN_LOOP ipixel += intermediate_width - icount; #ifdef USE_SHADOW_BUFFER shadow_pixel += shadow_width - icount; #endif #else /* UNROLL_RUN_LOOP */ ipixel += intermediate_width - (icount+1); #ifdef USE_SHADOW_BUFFER shadow_pixel += shadow_width - (icount+1); #endif #endif /* UNROLL_RUN_LOOP */ Debug((vpc, VPDEBUG_COMPOSITE, "ScanDone\n")); } /* for j */ /*************************************************************** * Finish processing the voxel slice. ***************************************************************/ GET_HIRES_TIME(vpc, t1); STORE_HIRES_TIME(vpc, VPTIMER_TRAVERSE_RUNS, t0, t1); Debug((vpc, VPDEBUG_COMPOSITE, "SliceDone\n")); } volpack-1.0b3/patchlevel.h0000644000265600020320000000006005674454534012473 00000000000000/* current patch level */ #define PATCH_LEVEL 8 volpack-1.0b3/configure.in0000644000265600020320000000421610727044625012502 00000000000000dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during installation dnl to configure the system for the local environment. dnl dnl Authors: dnl Andreas Tille and Daniel Leidert dnl License: GPL dnl Initialize autoconf by any header file of the source dnl AC_INIT([volpack], [1.0b3], [volpack@graphics.stanford.edu]) AC_PREREQ([2.54]) AC_CONFIG_SRCDIR([volpack.h]) dnl Define the library SONAME. You can create the different numbers from VERSION dnl if you want (probably awk, ...) dnl LIBVOLPACK_MAJOR=1 LIBVOLPACK_MINOR=1 LIBVOLPACK_MICRO=0 AC_SUBST(LIBVOLPACK_VERSION_INFO, [$LIBVOLPACK_MAJOR:$LIBVOLPACK_MINOR:$LIBVOLPACK_MICRO]) dnl This configures autoheader to generate a config.h file dnl AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall]) AM_PROG_LIBTOOL AC_CANONICAL_HOST case "$host" in *-irix*) test -n "$silent" || echo "choosing compiler flags for SGI Irix" OFLAGS="-O -Olimit 2500 -float" ;; *-ultrix*) test -n "$silent" || echo "choosing compiler flags for DEC Ultrix" OFLAGS="-O -Olimit 2500 -float" MFLAGS= ;; *-sunos*) test -n "$silent" || echo "choosing compiler flags for SunOS" OFLAGS="-O" MFLAGS= ;; *-hpux*) test -n "$silent" || echo "choosing compiler flags for HP-UX" # thanks to Mike Goss (goss@cs.colostate.edu) OFLAGS="-Aa +O3 -J +Obb1600" MFLAGS="-D_HPUX_SOURCE" ;; *) echo "Unrecognized system type $host. Using generic compiler options." OFLAGS= MFLAGS= ;; esac AC_SUBST([OFLAGS]) AC_SUBST([MFLAGS]) dnl AC_PROG_LIBTOOL AC_PROG_CC dnl CC=${CC-cc} dnl AC_SUBST(CC) AC_PROG_CPP AC_PROG_INSTALL if test -z "$M4" ; then case "$host" in *-sunos*) AC_CHECKING(/usr/5bin/m4) if test -f /usr/5bin/m4; then M4="/usr/5bin/m4" fi ;; esac fi AC_PATH_PROGS([M4], [gnum4 gm4 m4]) test -n "$M4" || AC_MSG_ERROR([m4 is missing on your system or not present in PATH.]) AC_HEADER_STDC AC_CHECK_HEADERS([string.h memory.h]) AC_CHECK_LIB([m], [cos]) AC_FUNC_VPRINTF AC_CONFIG_FILES([ Makefile doc/Makefile examples/Makefile man/Makefile man/src/Makefile ]) AC_OUTPUT volpack-1.0b3/vp_extract.c0000644000265600020320000005161305701116537012515 00000000000000/* * vp_extract.c * * Routines to extract fields from a volume. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.28 $ */ #include "vp_global.h" static int ExtractRawVolume ANSI_ARGS((vpContext *vpc, int x0, int y0, int z0, int x1, int y1, int z1, int field, void *dst, int dst_xstride, int dst_ystride, int dst_zstride)); static int ClassifyRawVolume ANSI_ARGS((vpContext *vpc, int correct, int x0, int y0, int z0, int x1, int y1, int z1, unsigned char *dst, int dst_xstride, int dst_ystride, int dst_zstride)); static int ShadeRawVolume ANSI_ARGS((vpContext *vpc, int x0, int y0, int z0, int x1, int y1, int z1, unsigned char *dst, int dst_xstride, int dst_ystride, int dst_zstride)); static float CorrectOpacity ANSI_ARGS((vpContext *vpc, int quant_opc, int x, int y, int z)); static void ShadeVoxel ANSI_ARGS((vpContext *vpc, void *voxel, int x, int y, int z, float *dst)); static int ExtractClassifiedVolume ANSI_ARGS((vpContext *vpc, int axis, int x0, int y0, int z0, int x1, int y1, int z1, int field, void *dst, int dst_xstride, int dst_ystride, int dst_zstride)); /* * vpExtract * * Extract a field from a volume. */ vpResult vpExtract(vpc, volume_type, x0, y0, z0, x1, y1, z1, field, dst, dst_size, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int volume_type; /* which volume representation to extract from */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ int field; /* field to extract */ void *dst; /* buffer to store result into */ int dst_size; /* size of dst in bytes */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { int field_size; int xrange, yrange, zrange; int retcode; int axis; /* check for errors */ if (x0 < 0 || y0 < 0 || z0 < 0 || x1 >= vpc->xlen || y1 >= vpc->ylen || z1 >= vpc->zlen || x0 > x1 || y0 > y1 || z0 > z1) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (field == VP_OPACITY_FIELD || field == VP_CORRECTED_OPAC_FIELD) field_size = 1; else if (field == VP_COLOR_FIELD) field_size = vpc->color_channels; else if (field < 0 || field >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); else if (volume_type != VP_RAW_VOLUME && field >= vpc->num_shade_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); else field_size = vpc->field_size[field]; if (dst == NULL || dst_size != field_size*(x1-x0+1)*(y1-y0+1)*(z1-z0+1)) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* choose axis */ switch (volume_type) { case VP_CLASSIFIED_VOLUME: xrange = x1 - x0; yrange = y1 - y0; zrange = z1 - z0; if (vpc->rle_z != NULL && zrange < xrange && zrange < yrange) axis = VP_Z_AXIS; else if (vpc->rle_x != NULL && xrange < yrange && xrange < zrange) axis = VP_X_AXIS; else if (vpc->rle_z != NULL && yrange < zrange && yrange < xrange) axis = VP_Y_AXIS; else if (vpc->rle_z != NULL && xrange >= yrange && xrange >= zrange) axis = VP_Z_AXIS; else if (vpc->rle_x != NULL && yrange >= zrange) axis = VP_X_AXIS; else if (vpc->rle_y != NULL) axis = VP_Y_AXIS; else if (vpc->rle_z != NULL) axis = VP_Z_AXIS; else if (vpc->rle_x != NULL) axis = VP_X_AXIS; else return(VPSetError(vpc, VPERROR_BAD_VOLUME)); break; case VP_CLX_VOLUME: axis = VP_X_AXIS; break; case VP_CLY_VOLUME: axis = VP_Y_AXIS; break; case VP_CLZ_VOLUME: axis = VP_Z_AXIS; break; case VP_RAW_VOLUME: break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } /* compute result */ if (volume_type == VP_RAW_VOLUME) { if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); if (field == VP_OPACITY_FIELD) return(ClassifyRawVolume(vpc, 0, x0, y0, z0, x1, y1, z1, dst, dst_xstride, dst_ystride, dst_zstride)); else if (field == VP_CORRECTED_OPAC_FIELD) return(ClassifyRawVolume(vpc, 1, x0, y0, z0, x1, y1, z1, dst, dst_xstride, dst_ystride, dst_zstride)); else if (field == VP_COLOR_FIELD) return(ShadeRawVolume(vpc, x0, y0, z0, x1, y1, z1, dst, dst_xstride, dst_ystride, dst_zstride)); else return(ExtractRawVolume(vpc, x0, y0, z0, x1, y1, z1, field, dst, dst_xstride, dst_ystride, dst_zstride)); } else { if ((retcode = VPCheckClassifiedVolume(vpc, axis)) != VP_OK) return(retcode); if (field == VP_COLOR_FIELD) { return(VPSetError(vpc, VPERROR_BAD_VALUE)); } else { return(ExtractClassifiedVolume(vpc, axis, x0, y0, z0, x1, y1, z1, field, dst, dst_xstride, dst_ystride, dst_zstride)); } } } /* * ExtractRawVolume * * Extract a field from a raw volume into an array. */ static int ExtractRawVolume(vpc, x0, y0, z0, x1, y1, z1, field, dst, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ int field; /* field to extract */ void *dst; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { int x, y, z; unsigned char *voxel, *dstptr; int field_size; int field_offset; int xstride, ystride, zstride; int retcode; field_size = vpc->field_size[field]; field_offset = vpc->field_offset[field]; xstride = vpc->xstride; ystride = vpc->ystride; zstride = vpc->zstride; voxel = vpc->raw_voxels; voxel += x0*xstride + y0*ystride + z0*zstride; dstptr = dst; for (z = z0; z <= z1; z++) { for (y = y0; y <= y1; y++) { for (x = x0; x <= x1; x++) { if (field_size == 1) ByteField(dstptr, 0) = ByteField(voxel, field_offset); else if (field_size == 2) ShortField(dstptr, 0) = ShortField(voxel, field_offset); else IntField(dstptr, 0) = IntField(voxel, field_offset); dstptr += dst_xstride; voxel += xstride; } dstptr += dst_ystride - (x1-x0+1)*dst_xstride; voxel += ystride - (x1-x0+1)*xstride; } dstptr += dst_zstride - (y1-y0+1)*dst_ystride; voxel += zstride - (y1-y0+1)*ystride; } return(VP_OK); } /* * ClassifyRawVolume * * Classify a portion of a raw volume, quantize the result, and store * as an array of 8-bit opacities. */ static int ClassifyRawVolume(vpc, correct, x0, y0, z0, x1, y1, z1, dst, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int correct; /* if true then correct for view */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ unsigned char *dst; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { float *opc; int num_voxels; int retcode; /* check for errors */ if ((retcode = VPCheckClassifier(vpc)) != VP_OK) return(retcode); /* compute opacities */ num_voxels = (x1-x0+1)*(y1-y0+1)*(z1-z0+1); Alloc(vpc, opc, float *, num_voxels*sizeof(float), "opacity_block"); VPClassifyBlock(vpc, correct, x0, y0, z0, x1, y1, z1, opc, sizeof(float), (x1-x0+1)*sizeof(float), (x1-x0+1)*(y1-y0+1)*sizeof(float)); /* quantize opacities */ VPQuantize(opc, x1-x0+1, y1-y0+1, z1-z0+1, 255., 255, dst, dst_xstride, dst_ystride, dst_zstride); Dealloc(vpc, opc); return(VP_OK); } /* * ShadeRawVolume * * Shade a portion of a raw volume, quantize the result, and store * as an array of 8-bit intensities. */ static int ShadeRawVolume(vpc, x0, y0, z0, x1, y1, z1, dst, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ unsigned char *dst; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { float *shd; int num_colors; int retcode; int xstride, ystride, zstride; /* check for errors */ if ((retcode = VPCheckShader(vpc)) != VP_OK) return(retcode); /* compute colors */ num_colors = (x1-x0+1)*(y1-y0+1)*(z1-z0+1)*vpc->color_channels; Alloc(vpc, shd, float *, num_colors*sizeof(float), "color_block"); xstride = vpc->color_channels * sizeof(float); ystride = xstride * (x1-x0+1); zstride = ystride * (y1-y0+1); VPShadeBlock(vpc, x0, y0, z0, x1, y1, z1, shd, xstride, ystride, zstride); /* quantize colors */ VPQuantize(shd, x1-x0+1, y1-y0+1, z1-z0+1, 1., 255, dst, dst_xstride, dst_ystride, dst_zstride); Dealloc(vpc, shd); return(VP_OK); } /* * VPClassifyBlock * * Classify a block of the current raw volume. The result is an * array of floating point opacities in the range 0.0-1.0. */ vpResult VPClassifyBlock(vpc, correct, x0, y0, z0, x1, y1, z1, opc, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int correct; /* if true then correct for view */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ float *opc; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { unsigned char *voxel; int xstride, ystride, zstride; int x, y, z; float opacity; int quant_opc; int retcode; if (correct) { if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); } xstride = vpc->xstride; ystride = vpc->ystride; zstride = vpc->zstride; voxel = vpc->raw_voxels; voxel += x0*xstride + y0*ystride + z0*zstride; for (z = z0; z <= z1; z++) { for (y = y0; y <= y1; y++) { for (x = x0; x <= x1; x++) { opacity = VPClassifyVoxel(vpc, voxel); if (correct) { quant_opc = opacity * 255.; if (quant_opc > 255) quant_opc = 255; else if (quant_opc < 0) quant_opc = 0; opacity = CorrectOpacity(vpc, quant_opc, x, y, z); } *opc = opacity; opc = (float *)((char *)opc + dst_xstride); voxel += xstride; } opc = (float *)((char *)opc + dst_ystride - (x1-x0+1)*dst_xstride); voxel += ystride - (x1-x0+1)*xstride; } opc = (float *)((char *)opc + dst_zstride - (y1-y0+1)*dst_ystride); voxel += zstride - (y1-y0+1)*ystride; } return(VP_OK); } /* * VPClassifyVoxel * * Classify a single voxel. Return value is an opacity. */ float VPClassifyVoxel(vpc, voxel) vpContext *vpc; /* context */ void *voxel; /* pointer to voxel */ { int num_params; /* number of parameters to classifier */ int p; /* current parameter number */ int field; /* field for the parameter */ int field_size; /* size of the field */ int field_offset; /* offset for the field */ int index; /* index for table lookup */ float opacity; /* current value of the opacity */ num_params = vpc->num_clsfy_params; opacity = 1; for (p = 0; p < num_params; p++) { /* get table index */ field = vpc->param_field[p]; field_offset = vpc->field_offset[field]; field_size = vpc->field_size[field]; index = VoxelField(voxel, field_offset, field_size); /* load table value */ opacity *= vpc->clsfy_table[p][index]; } return(opacity); } /* * CorrectOpacity * * Correct an opacity for the current view. * Return value is the corrected opacity. */ static float CorrectOpacity(vpc, quant_opc, x, y, z) vpContext *vpc; /* context */ int quant_opc; /* input opacity (0-255) */ int x, y, z; /* voxel coordinates in object space */ { float opacity; if (vpc->affine_view) { opacity = vpc->affine_opac_correct[quant_opc]; } else { /* XXX perspective rendering not available yet */ opacity = (float)quant_opc / (float)255.; } return(opacity); } /* * VPShadeBlock * * Shade a block of the current raw volume. The result is an * array of floating point colors in the range 0.0-255.0. */ vpResult VPShadeBlock(vpc, x0, y0, z0, x1, y1, z1, shd, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ float *shd; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { unsigned char *voxel; int xstride, ystride, zstride; int x, y, z; int color_channels; color_channels = vpc->color_channels; xstride = vpc->xstride; ystride = vpc->ystride; zstride = vpc->zstride; voxel = vpc->raw_voxels; voxel += x0*xstride + y0*ystride + z0*zstride; for (z = z0; z <= z1; z++) { for (y = y0; y <= y1; y++) { for (x = x0; x <= x1; x++) { ShadeVoxel(vpc, voxel, x, y, z, shd); shd = (float *)((char *)shd + dst_xstride); voxel += xstride; } shd = (float *)((char *)shd + dst_ystride - (x1-x0+1)*dst_xstride); voxel += ystride - (x1-x0+1)*xstride; } shd = (float *)((char *)shd + dst_zstride - (y1-y0+1)*dst_ystride); voxel += zstride - (y1-y0+1)*ystride; } return(VP_OK); } /* * ShadeVoxel * * Shade a voxel. */ static void ShadeVoxel(vpc, voxel, x, y, z, dst) vpContext *vpc; /* context */ void *voxel; /* voxel data */ int x, y, z; /* voxel coordinates */ float *dst; /* storage for result (1 or 3 intensities, 0-255) */ { int num_materials; int color_channels; int color_index_size, color_index_offset, color_index, color_table_offset; int weight_index_size, weight_index_offset, weight_index; int weight_table_offset; int m; float r, g, b; float *color_table; float *weight_table; /* check shading mode */ if (vpc->shading_mode == CALLBACK_SHADER) { if (vpc->color_channels == 1) vpc->shade_func(voxel, dst, vpc->client_data); else vpc->shade_func(voxel, dst, dst+1, dst+2, vpc->client_data); return; } else if (vpc->shading_mode != LOOKUP_SHADER) { VPBug("unknown shader type"); } /* compute table indices */ num_materials = vpc->num_materials; color_channels = vpc->color_channels; color_index_size = vpc->field_size[vpc->color_field]; color_index_offset = vpc->field_offset[vpc->color_field]; color_index = VoxelField(voxel, color_index_offset, color_index_size); color_table_offset = color_index * num_materials; weight_index_size = vpc->field_size[vpc->weight_field]; weight_index_offset = vpc->field_offset[vpc->weight_field]; weight_index = VoxelField(voxel, weight_index_offset, weight_index_size); weight_table_offset = weight_index * num_materials; /* look up values in tables */ if (color_channels == 1) { color_table = vpc->shade_color_table + color_table_offset; weight_table = vpc->shade_weight_table + weight_table_offset; if (num_materials == 1) { r = *color_table; } else { r = 0; for (m = 0; m < num_materials; m++) r += *color_table++ * *weight_table++; } *dst = r; } else { color_table = vpc->shade_color_table + 3*color_table_offset; weight_table = vpc->shade_weight_table + weight_table_offset; if (num_materials == 1) { r = *color_table++; g = *color_table++; b = *color_table; } else { r = 0; g = 0; b = 0; for (m = 0; m < num_materials; m++) { r += *color_table++ * *weight_table; g += *color_table++ * *weight_table; b += *color_table++ * *weight_table; } } dst[0] = r; dst[1] = g; dst[2] = b; } } /* * VPQuantize * * Quantize a floating point array and store the result in a byte array. */ void VPQuantize(src, xlen, ylen, zlen, scale, maxvalue, dst, dst_xstride, dst_ystride, dst_zstride) float *src; /* floating point array */ int xlen, ylen, zlen; /* array dimensions */ double scale; /* scale to apply to each array element */ int maxvalue; /* clamp each array element to this value */ unsigned char *dst; /* store results here */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { int value; int x, y, z; for (z = 0; z < zlen; z++) { for (y = 0; y < ylen; y++) { for (x = 0; x < xlen; x++) { value = (int)rint(*src++ * scale); if (value > maxvalue) value = maxvalue; else if (value < 0) value = 0; *dst = value; dst += dst_xstride; } dst += dst_ystride - xlen*dst_xstride; } dst += dst_zstride - ylen*dst_ystride; } } /* * ExtractClassifiedVolume * * Extract a field from a classified volume into an array. */ static int ExtractClassifiedVolume(vpc, axis, x0, y0, z0, x1, y1, z1, field, dst, dst_xstride, dst_ystride, dst_zstride) vpContext *vpc; /* context */ int axis; /* which axis to extract from */ int x0, y0, z0; /* origin of extracted region */ int x1, y1, z1; /* opposite corner of extracted region */ int field; /* field to extract */ void *dst; /* buffer to store result into */ int dst_xstride; /* stride (in bytes) for destination array */ int dst_ystride; int dst_zstride; { int i, j, k; /* voxel coordinates in rotated object space */ int i0, j0, k0; /* origin of extracted region */ int i1, j1, k1; /* opposite corner of extracted region */ int dst_istride; /* stride (in bytes) for destination array */ int dst_jstride; int dst_kstride; int ilen, jlen, klen; /* volume size */ RLEVoxels *rle_voxels; /* run-length encoded, classified volume */ unsigned char *voxel; /* pointer to current voxel in volume */ unsigned char *dstptr; /* pointer to destination */ unsigned char *length; /* pointer to current run length */ int run_length; /* length of current run */ int is_non_zero; /* true if current run is nonzero */ int rle_bytes_per_voxel; /* size of unclassified voxel */ int value; /* value of parameter for current voxel */ ScanOffset *slice_runs; /* offsets to start of runs for a slice */ int field_size; /* size of field in bytes */ int field_offset; /* byte offset for voxel field */ /* initialize */ switch (axis) { case VP_X_AXIS: rle_voxels = vpc->rle_x; i0 = y0; j0 = z0; k0 = x0; i1 = y1; j1 = z1; k1 = x1; dst_istride = dst_ystride; dst_jstride = dst_zstride; dst_kstride = dst_xstride; break; case VP_Y_AXIS: rle_voxels = vpc->rle_y; i0 = z0; j0 = x0; k0 = y0; i1 = z1; j1 = x1; k1 = y1; dst_istride = dst_zstride; dst_jstride = dst_xstride; dst_kstride = dst_ystride; break; case VP_Z_AXIS: rle_voxels = vpc->rle_z; i0 = x0; j0 = y0; k0 = z0; i1 = x1; j1 = y1; k1 = z1; dst_istride = dst_xstride; dst_jstride = dst_ystride; dst_kstride = dst_zstride; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } if (rle_voxels == NULL) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); if (rle_voxels->scan_offsets_per_slice < 1) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); ilen = rle_voxels->ilen; jlen = rle_voxels->jlen; klen = rle_voxels->klen; rle_bytes_per_voxel = vpc->rle_bytes_per_voxel; if (field == VP_OPACITY_FIELD || field == VP_CORRECTED_OPAC_FIELD) { field_size = 1; field_offset = rle_bytes_per_voxel - 1; } else { field_size = vpc->field_size[field]; field_offset = vpc->field_offset[field]; } /* extract slice */ dstptr = dst; for (k = k0; k <= k1; k++) { slice_runs = &rle_voxels->scan_offsets[k * rle_voxels->scan_offsets_per_slice]; voxel = (unsigned char *)rle_voxels->data + slice_runs->first_data; length = rle_voxels->run_lengths + slice_runs->first_len; run_length = 0; is_non_zero = 1; for (j = 0; j < jlen; j++) { for (i = 0; i < ilen; i++) { while (run_length == 0) { run_length = *length++; is_non_zero = !is_non_zero; } run_length--; if (i >= i0 && i <= i1 && j >= j0 && j <= j1) { if (is_non_zero) { if (field_size == 1) ByteField(dstptr, 0) = ByteField(voxel, field_offset); else if (field_size == 2) ShortField(dstptr, 0) = ShortField(voxel, field_offset); else IntField(dstptr, 0) = IntField(voxel,field_offset); voxel += rle_bytes_per_voxel; } else { if (field_size == 1) ByteField(dstptr, 0) = 0; else if (field_size == 2) ShortField(dstptr, 0) = 0; else IntField(dstptr, 0) = 0; } dstptr += dst_istride; } else { if (is_non_zero) voxel += rle_bytes_per_voxel; } } if (j >= j0 && j <= j1) dstptr += dst_jstride - (i1-i0+1)*dst_istride; } dstptr += dst_kstride - (j1-j0+1)*dst_jstride; } return(VP_OK); } volpack-1.0b3/vp_shade.c0000644000265600020320000006177605701116546012142 00000000000000/* * vp_shade.c * * Routines to implement the Phong shading equation using a lookup-table. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ #include "vp_global.h" /* * Lookup Table Shading and Normal Vector Encoding * * The shader defined in this file implements the Phong shading equation * (I = Ia + Id*(N.L) + Is*(N.H)^n) using lookup tables. To use this * shader you must include a "normal" field in each voxel. This field * is computed by preprocessing the volume to estimate a surface normal * vector for each voxel (using the central-difference gradient operator) * and then encoding the normal in an index (13 bits in this program). * An index is stored in the normal field of each voxel. At rendering * time the index is used to look up a color for the voxel in a table. * * There are many ways a normal vector can be encoded using the 13 bits of * the index. A straight-forward method is to use 6 bits for the x component * of the vector, 6 bits for the y component, and 1 bit to indicate the sign * of the z component. Assuming that the vector is normalized the z * component can be reconstructed from x and y. Unfortunately this method * results in an uneven distribution of code points: the distance between * exactly-representable vectors is much smaller near N = +z or -z than * N = +x, -x, +y or -z (where x, y and z are the unit vectors). This * can result in significant quantization error near the "equator", or more * table storage than necessary near the "poles". * * The normal vector encoding scheme used here is derived from a recursive * tesselation of a regular octahedron (an eight-sided solid with * equilateral triangular faces). Consider subdividing each triangular * face into four smaller equilateral triangles, and then subdividing those * triangles recursively until a sufficiently large number of triangles * have been generated. The representable normal vectors are the vectors * connecting the center of the solid to the vertices of the triangles. * The distribution of these vectors is not perfectly uniform (the density * is lower at the "mid-latitudes"), but the variation is relatively small. * * Each normal vector is now assigned a unique index as follows. Let the * origin be at the center of the solid, and the x, y and z axes each * intersect a vertex of the original octahedron. Use one bit of the index * to indicate the sign of the z component of the normal. Now project the * subdivided triangle vertices onto the x-y plane. This forms a square * grid of dots rotated 45 degrees relative to the x-y axes. Starting at * (x=0, y=max), assign sequential integers to each normal vector projection, * proceeding left-to-right and top-to-bottom. Finally, append the sign bit * for the z component to the least-significant end of the integer to get * the normal vector encoding. * * This scheme is useful because it is easy to compute the vector components * from an index and conversely to find the closest index for a given vector, * yet the distribution of representable vectors is pretty uniform. * * XXX better method is to rotate 45 degrees (M = [1 -1 ; 1 1]) and then * assign points in scanline order; no lookup tables needed; implement this! * * The layout of the shading lookup table is as follows: * float shade_table[MAX_NORMAL+1][materials][color_channels] * where materials is the number of materials and color_channels is 1 * for grayscale intensities or 3 for RGB intensities (stored in R,G,B * order). */ /* define normal index parameters; if you change these then you must change VP_NORM_MAX in volpack.h */ #define NORM_13 /* use 13 bit normals */ #undef NORM_15 /* don't use 15 bit normals */ #ifdef NORM_13 /* parameters for 13 bit normals */ #define NORM_N 44 /* N parameter for normal computation */ #define NORM_BITS 13 /* number of bits to encode a normal: (1+ceil(log2(2*(N*N+N+1)))) */ #define MAX_NORMAL 7923 /* maximum normal index */ #endif #ifdef NORM_15 /* parameters for 15 bit normals */ #define NORM_N 90 #define NORM_BITS 15 #define MAX_NORMAL 16131 #endif /* static lookup tables (computed only once, used for all vpContexts) */ static int NormalTablesInitialized = 0; /* set to 1 after initialization */ static short *NormalPy; /* NormalPy[py] = normal index for the normal whose projection in the x-y plane is (0,py) and whose z component is + (py = -NORM_N to +NORM_N) */ static short NormalPyStorage[1+2*NORM_N]; /* storage for NormalPy */ static short *NormalXLimit; /* max abs(x) allowed for a given y */ static short NormalXLimitStorage[1+2*NORM_N]; /* storage for NormalXLimit */ static void InitNormalTables ANSI_ARGS((void)); /* * InitNormalTables * * Initialize lookup tables for computing normal indices. */ static void InitNormalTables() { int y, xcount, codepoint; int sum; double value; /* initialize NormalPy */ xcount = 1; codepoint = 2; NormalPy = &NormalPyStorage[NORM_N]; NormalXLimit = &NormalXLimitStorage[NORM_N]; for (y = -NORM_N; y <= NORM_N; y++) { NormalPy[y] = codepoint + (((xcount-1)/2) << 1); codepoint += (xcount << 1); NormalXLimit[y] = (xcount-1)/2; if (y < 0) xcount += 2; else xcount -= 2; } NormalTablesInitialized = 1; } /* * vpNormalIndex * * Return the best normal index for the given normal vector. */ int vpNormalIndex(nx, ny, nz) double nx, ny, nz; { int n, x, y, xlimit; double denom, denominv; if (!NormalTablesInitialized) InitNormalTables(); denom = (nx < 0) ? -nx : nx; denom += (ny < 0) ? -ny : ny; denom += (nz < 0) ? -nz : nz; denominv = (double)NORM_N / denom; x = (int)rint(nx * denominv); y = (int)rint(ny * denominv); /* clamp x */ xlimit = NormalXLimit[y]; if (x < 0) { if (-x > xlimit) x = -xlimit; } else { if (x > xlimit) x = xlimit; } n = NormalPy[y] + (x << 1); if (nz < 0) n |= 1; ASSERT(n >= 0 && n <= VP_NORM_MAX); return(n); } /* * vpNormal * * Compute normal vector components given a normal vector index. */ vpResult vpNormal(n, nx, ny, nz) int n; /* normal index */ double *nx, *ny, *nz; /* storage for result */ { int py, px, pz, pxlimit2; double pxd, pyd, pzd, plength; if (!NormalTablesInitialized) InitNormalTables(); for (py = -NORM_N; py <= NORM_N; py++) { pxlimit2 = 2 * ((py<0) ? (NORM_N + py) : (NORM_N - py)); if (NormalPy[py] - pxlimit2 <= n && NormalPy[py] + pxlimit2 + 1 >= n) { break; } } if (py > NORM_N) { return(VPERROR_BAD_VALUE); } else { px = (n - NormalPy[py]) >> 1; pz = NORM_N; if (px < 0) pz += px; else pz -= px; if (py < 0) pz += py; else pz -= py; if (n & 1) pz = -pz; pxd = (double)px; pyd = (double)py; pzd = (double)pz; plength = 1. / sqrt(pxd*pxd+pyd*pyd+pzd*pzd); *nx = pxd * plength; *ny = pyd * plength; *nz = pzd * plength; } return(VP_OK); } /* * vpScanlineNormals * * Compute normals and/or gradients for a scanline of voxels. */ vpResult vpScanlineNormals(vpc, length, scalar_data, scalar_minus_y, scalar_plus_y, scalar_minus_z, scalar_plus_z, voxel_data, scalar_field, grad_field, norm_field) vpContext *vpc; /* context */ int length; /* number of scalars in scanline */ unsigned char *scalar_data; /* scanline of scalar data */ unsigned char *scalar_minus_y; /* adjacent scanline of scalar data (-y) */ unsigned char *scalar_plus_y; /* adjacent scanline of scalar data (+y) */ unsigned char *scalar_minus_z; /* adjacent scanline of scalar data (-z) */ unsigned char *scalar_plus_z; /* adjacent scanline of scalar data (+z) */ void *voxel_data; /* location to store first voxel */ int scalar_field; /* voxel field for scalar, or VP_SKIP_FIELD */ int grad_field; /* voxel field for gradient, or VP_SKIP_FIELD */ int norm_field; /* voxel field for normal, or VP_SKIP_FIELD */ { int x; /* voxel index */ double grad_x; /* components of the gradient vector */ double grad_y; double grad_z; double twice_grad_mag; /* twice the magnitude of the gradient */ int grad; /* gradient magnitude */ int norm; /* normal index */ int edge; /* true if this scanline is on the edge of the volume */ int voxel_size; /* size of a voxel in bytes */ int scalar_offset; /* byte offset for scalar in voxel */ int grad_offset; /* byte offset for gradient in voxel */ int norm_offset; /* byte offset for normal in voxel */ char *voxel; /* pointer to current voxel */ int retcode; /* check for errors */ if ((retcode = VPCheckVoxelFields(vpc)) != VP_OK) return(retcode); if (scalar_field != VP_SKIP_FIELD) { if (scalar_field < 0 || scalar_field >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (vpc->field_size[scalar_field] != VP_SCALAR_SIZE) return(VPSetError(vpc, VPERROR_BAD_VALUE)); scalar_offset = vpc->field_offset[scalar_field]; } if (grad_field != VP_SKIP_FIELD) { if (grad_field < 0 || grad_field >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (vpc->field_size[grad_field] != VP_GRAD_SIZE) return(VPSetError(vpc, VPERROR_BAD_VALUE)); grad_offset = vpc->field_offset[grad_field]; } if (norm_field != VP_SKIP_FIELD) { if (norm_field < 0 || norm_field >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (vpc->field_size[norm_field] != VP_NORM_SIZE) return(VPSetError(vpc, VPERROR_BAD_VALUE)); norm_offset = vpc->field_offset[norm_field]; } voxel_size = vpc->raw_bytes_per_voxel; /* compute the scanline */ voxel = voxel_data; if (scalar_minus_y == NULL || scalar_plus_y == NULL || scalar_minus_z == NULL || scalar_plus_z == NULL) { edge = 1; } else { edge = 0; } for (x = 0; x < length; x++) { /* compute gradient and normal for voxel x and store */ if (edge || x == 0 || x == length-1) { if (scalar_field != VP_SKIP_FIELD) ByteField(voxel, scalar_offset) = scalar_data[x]; if (grad_field != VP_SKIP_FIELD) ByteField(voxel, grad_offset) = 0; if (norm_field != VP_SKIP_FIELD) ShortField(voxel, norm_offset) = 0; } else { grad_x = (int)scalar_data[x+1] - (int)scalar_data[x-1]; grad_y = (int)scalar_plus_y[x] - (int)scalar_minus_y[x]; grad_z = (int)scalar_plus_z[x] - (int)scalar_minus_z[x]; twice_grad_mag = sqrt(grad_x*grad_x+grad_y*grad_y+grad_z*grad_z); if (scalar_field != VP_SKIP_FIELD) ByteField(voxel, scalar_offset) = scalar_data[x]; if (grad_field != VP_SKIP_FIELD) { grad = (int)rint(0.5 * twice_grad_mag); ASSERT(grad >= 0 && grad <= VP_GRAD_MAX); ByteField(voxel, grad_offset) = grad; } if (norm_field != VP_SKIP_FIELD) { if (twice_grad_mag < VP_EPS) norm = 0; else norm = vpNormalIndex(grad_x / twice_grad_mag, grad_y / twice_grad_mag, grad_z / twice_grad_mag); ShortField(voxel, norm_offset) = norm; } } /* go on to next voxel */ voxel += voxel_size; } return(VP_OK); } /* * vpVolumeNormals * * Compute normals and/or gradients for a volume. Result is stored * in raw_voxels in the current context. */ vpResult vpVolumeNormals(vpc, scalar_data, length, scalar_field, grad_field, norm_field) vpContext *vpc; /* context */ unsigned char *scalar_data; /* 3D array of scalar data */ int length; /* number of scalars in scalar_data */ int scalar_field; /* voxel field for scalar, or VP_SKIP_FIELD */ int grad_field; /* voxel field for gradient, or VP_SKIP_FIELD */ int norm_field; /* voxel field for normal, or VP_SKIP_FIELD */ { int xlen, ylen, zlen; /* volume dimensions */ int y, z; /* loop indices */ unsigned char *scalar; /* pointer to current scalar */ int scalar_ystride; /* stride to next scalar scanline */ int scalar_zstride; /* stride to next scalar slice */ char *voxel; /* pointer to current voxel */ int voxel_ystride; /* stride to next voxel scanline */ int voxel_zstride; /* stride to next voxel slice */ unsigned char *s_py, *s_my, *s_pz, *s_mz; /* ptrs to adjacent scans */ int retcode; /* check for errors */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; if (xlen * ylen * zlen != length) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* initialize */ scalar = scalar_data; scalar_ystride = xlen; scalar_zstride = xlen*ylen; voxel = vpc->raw_voxels; voxel_ystride = vpc->ystride; voxel_zstride = vpc->zstride; /* compute volume data */ for (z = 0; z < zlen; z++) { ReportStatus(vpc, (double)z / (double)zlen); for (y = 0; y < ylen; y++) { s_my = (y == 0) ? NULL : scalar - scalar_ystride; s_py = (y == ylen-1) ? NULL : scalar + scalar_ystride; s_mz = (z == 0) ? NULL : scalar - scalar_zstride; s_pz = (z == zlen-1) ? NULL : scalar + scalar_zstride; retcode = vpScanlineNormals(vpc, xlen, scalar, s_my, s_py, s_mz, s_pz, voxel, scalar_field, grad_field, norm_field); if (retcode != VP_OK) return(retcode); scalar += scalar_ystride; voxel += voxel_ystride; } scalar += scalar_zstride - ylen*scalar_ystride; voxel += voxel_zstride - ylen*voxel_ystride; } ReportStatus(vpc, 1.0); return(VP_OK); } /* * vpShadeTable * * Compute a shading lookup table for the current lighting and * model matrix. */ vpResult vpShadeTable(vpc) vpContext *vpc; { int num_lights; /* number of enabled lights */ vpVector3 light_color[VP_MAX_LIGHTS]; /* light colors */ vpVector4 obj_light[VP_MAX_LIGHTS]; /* light_vector in object space */ vpVector4 obj_highlight[VP_MAX_LIGHTS]; /* halfway-vector */ vpVector4 obj_viewpoint; /* viewpoint in object coordinates */ vpMatrix4 a; /* linear system matrix */ double *rhs[VP_MAX_LIGHTS+1];/* right-hand-side/solution vectors */ int px, py, pz; /* code point coordinates (integers) */ double pxd, pyd, pzd; /* code point coordinates (doubles) */ double plength; int pxlimit; /* maximum absolute value of px for this py */ double nx, ny, nz; /* normal vector components */ double n_dot_v_xy; /* normal_vector dot obj_viewpoint (x&y) */ double n_dot_v_z; /* normal_vector dot obj_viewpoint (z) */ double n_dot_v; /* normal_vector dot obj_viewpoint */ double n_dot_l_xy; /* normal_vector dot light_vector (x&y) */ double n_dot_l_z; /* normal_vector dot light_vector (z) */ double n_dot_l; /* normal_vector dot light_vector */ double n_dot_h_xy; /* normal_vector dot halfway_vector (x&y) */ double n_dot_h_z; /* normal_vector dot halfway_vector (z) */ double n_dot_h; /* normal_vector dot halfway_vector */ float r, g, b; /* intensities to store in shade table */ float *table_row; /* pointer to table row for current normal */ float *table; /* pointer to table entry */ float *shadow_table_row; /* pointer to table row for current normal */ float *shadow_table; /* pointer to shadow table entry */ int surface_side; /* EXT_SURFACE or INT_SURFACE */ int znegative; /* true iff nz is negative */ int light_both_sides; /* use two-sided lighting */ int reverse_surface_sides; /* reverse interior and exterior */ int color_channels; /* number of color channels */ int num_materials; /* number of materials */ int retcode; double *matl_props; /* material properties */ int enable_shadows; /* true if shadows are enabled */ int shadow_light; /* light index for light casting shadows */ int clamp; /* true if table entries should be clamped */ int c, l, m; #ifdef DEBUG vpVector4 tmpv; #endif DECLARE_TIME(t0); DECLARE_TIME(t1); /* error checking */ if (vpc->shading_mode != LOOKUP_SHADER) return(VP_OK); if ((retcode = VPCheckShader(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckShadows(vpc)) != VP_OK) return(retcode); ASSERT(vpc->color_channels == 1 || vpc->color_channels == 3); /* start timer */ GET_TIME(vpc, t0); /* transform viewpoint vector and light vectors to object space */ vpSetVector4(obj_viewpoint, 0., 0., 1., 1.); rhs[0] = obj_viewpoint; num_lights = 0; for (c = 0; c < VP_MAX_LIGHTS; c++) { if (vpc->light_enable[c]) { bcopy(vpc->light_color[c], light_color[num_lights], sizeof(vpVector3)); bcopy(vpc->light_vector[c], obj_light[num_lights], sizeof(vpVector4)); rhs[num_lights+1] = obj_light[num_lights]; num_lights++; } } bcopy(vpc->transforms[VP_MODEL], a, sizeof(vpMatrix4)); retcode = vpSolveSystem4(a, rhs, num_lights+1); if (retcode != VP_OK) return(retcode); #ifdef DEBUG /* make sure the solver gave the right answer */ vpMatrixVectorMult4(tmpv, vpc->transforms[VP_MODEL], obj_viewpoint); if (fabs(tmpv[0]) > VP_EPS || fabs(tmpv[1]) > VP_EPS || fabs(tmpv[2] - 1.) > VP_EPS || fabs(tmpv[3] - 1.) > VP_EPS) { printf("\n"); printf("Modelview:\n"); printf(" %12.8f %12.8f %12.8f %12.8f\n", vpc->transforms[VP_MODEL][0][0], vpc->transforms[VP_MODEL][0][1], vpc->transforms[VP_MODEL][0][2], vpc->transforms[VP_MODEL][0][3]); printf(" %12.8f %12.8f %12.8f %12.8f\n", vpc->transforms[VP_MODEL][1][0], vpc->transforms[VP_MODEL][1][1], vpc->transforms[VP_MODEL][1][2], vpc->transforms[VP_MODEL][1][3]); printf(" %12.8f %12.8f %12.8f %12.8f\n", vpc->transforms[VP_MODEL][2][0], vpc->transforms[VP_MODEL][2][1], vpc->transforms[VP_MODEL][2][2], vpc->transforms[VP_MODEL][2][3]); printf(" %12.8f %12.8f %12.8f %12.8f\n", vpc->transforms[VP_MODEL][3][0], vpc->transforms[VP_MODEL][3][1], vpc->transforms[VP_MODEL][3][2], vpc->transforms[VP_MODEL][3][3]); VPBug("SolveSystem failed on viewpoint"); } l = 0; for (c = 0; c < VP_MAX_LIGHTS; c++) { if (vpc->light_enable[c]) { vpMatrixVectorMult4(tmpv, vpc->transforms[VP_MODEL], obj_light[l]); if (fabs(tmpv[0] - vpc->light_vector[c][0]) > VP_EPS || fabs(tmpv[1] - vpc->light_vector[c][1]) > VP_EPS || fabs(tmpv[2] - vpc->light_vector[c][2]) > VP_EPS || fabs(tmpv[3] - vpc->light_vector[c][3]) > VP_EPS) VPBug("SolveSystem failed on light %d\n", c); l++; } } #endif /* compute highlight vectors */ for (l = 0; l < num_lights; l++) { obj_highlight[l][0] = obj_light[l][0] + obj_viewpoint[0]; obj_highlight[l][1] = obj_light[l][1] + obj_viewpoint[1]; obj_highlight[l][2] = obj_light[l][2] + obj_viewpoint[2]; vpNormalize3(obj_highlight[l]); } /* initialize options */ light_both_sides = vpc->light_both_sides; reverse_surface_sides = vpc->reverse_surface_sides; color_channels = vpc->color_channels; num_materials = vpc->num_materials; table = vpc->shade_color_table; enable_shadows = vpc->enable_shadows; if (enable_shadows) { shadow_table = vpc->shadow_color_table; shadow_light = vpc->shadow_light_num - VP_LIGHT0; bzero(shadow_table, vpc->shadow_color_table_size); } else { shadow_table = NULL; shadow_light = -1; } clamp = vpc->clamp_shade_table; /* store shade table entries for the zero-vector */ for (znegative = 0; znegative <= 1; znegative++) { if (znegative) { if (reverse_surface_sides) surface_side = EXT_SURFACE; else surface_side = INT_SURFACE; } else { if (reverse_surface_sides) surface_side = INT_SURFACE; else surface_side = EXT_SURFACE; } for (m = 0; m < num_materials; m++) { matl_props = vpc->matl_props[m][surface_side]; *table++ = matl_props[MATL_AMB_R]; if (color_channels == 3) { *table++ = matl_props[MATL_AMB_G]; *table++ = matl_props[MATL_AMB_B]; } } } table_row = table; if (enable_shadows) { for (znegative = 0; znegative <= 1; znegative++) { for (m = 0; m < num_materials; m++) { *shadow_table++ = 0; if (color_channels == 3) { *shadow_table++ = 0; *shadow_table++ = 0; } } } } shadow_table_row = shadow_table; /* compute the shade table entries for nonzero normals */ for (py = -NORM_N; py <= NORM_N; py++) { pxlimit = (py < 0) ? (NORM_N + py) : (NORM_N - py); pz = -1; pxd = (double)(-pxlimit-1); pyd = (double)py; pzd = (double)(-1); for (px = -pxlimit; px <= pxlimit; px++) { /* compute normal vector components for this code point */ pxd += 1.0; if (px <= 0) { pz++; pzd += 1.0; } else { pz--; pzd -= 1.0; } plength = 1. / sqrt(pxd*pxd + pyd*pyd + pzd*pzd); nx = pxd * plength; ny = pyd * plength; nz = pzd * plength; /* compute n dot v (for determining surface side) */ n_dot_v_xy = nx*obj_viewpoint[0] + ny*obj_viewpoint[1]; n_dot_v_z = nz*obj_viewpoint[2]; /* store ambient light terms */ table = table_row; for (znegative = 0; znegative <= 1; znegative++) { if (znegative) n_dot_v = n_dot_v_xy - n_dot_v_z; else n_dot_v = n_dot_v_xy + n_dot_v_z; if (reverse_surface_sides) n_dot_v = -n_dot_v; if (n_dot_v >= 0) surface_side = EXT_SURFACE; else surface_side = INT_SURFACE; for (m = 0; m < num_materials; m++) { matl_props = vpc->matl_props[m][surface_side]; *table++ = matl_props[MATL_AMB_R]; if (color_channels == 3) { *table++ = matl_props[MATL_AMB_G]; *table++ = matl_props[MATL_AMB_B]; } } } /* loop over lights */ for (l = 0; l < num_lights; l++) { if (l == shadow_light) table = shadow_table_row; else table = table_row; /* compute n dot l and n dot h */ n_dot_l_xy = nx*obj_light[l][0] + ny*obj_light[l][1]; n_dot_l_z = nz*obj_light[l][2]; n_dot_h_xy = nx*obj_highlight[l][0] + ny*obj_highlight[l][1]; n_dot_h_z = nz*obj_highlight[l][2]; /* loop over the two signs for z */ for (znegative = 0; znegative <= 1; znegative++) { if (znegative) { n_dot_v = n_dot_v_xy - n_dot_v_z; n_dot_l = n_dot_l_xy - n_dot_l_z; n_dot_h = n_dot_h_xy - n_dot_h_z; } else { n_dot_v = n_dot_v_xy + n_dot_v_z; n_dot_l = n_dot_l_xy + n_dot_l_z; n_dot_h = n_dot_h_xy + n_dot_h_z; } if (reverse_surface_sides) { n_dot_v = -n_dot_v; n_dot_l = -n_dot_l; n_dot_h = -n_dot_h; } if (n_dot_v >= 0) surface_side = EXT_SURFACE; else surface_side = INT_SURFACE; if (light_both_sides) { n_dot_l = fabs(n_dot_l); n_dot_h = fabs(n_dot_h); } else if (surface_side == EXT_SURFACE) { n_dot_l = MAX(n_dot_l, 0.0); n_dot_h = MAX(n_dot_h, 0.0); } else { n_dot_l = MAX(-n_dot_l, 0.0); n_dot_h = MAX(-n_dot_h, 0.0); } /* loop over material types */ for (m = 0; m < num_materials; m++) { matl_props = vpc->matl_props[m][surface_side]; *table++ += light_color[l][0]*(matl_props[MATL_DIFF_R]* n_dot_l + matl_props[MATL_SPEC_R]* pow(n_dot_h, matl_props[MATL_SHINY])); if (color_channels == 3) { *table++ += light_color[l][1]* (matl_props[MATL_DIFF_G]* n_dot_l + matl_props[MATL_SPEC_G]* pow(n_dot_h, matl_props[MATL_SHINY])); *table++ += light_color[l][2]* (matl_props[MATL_DIFF_B]* n_dot_l + matl_props[MATL_SPEC_B]* pow(n_dot_h, matl_props[MATL_SHINY])); } } /* for m */ } /* for znegative */ } /* for l */ /* clamp */ if (clamp) { if (enable_shadows) { table = table_row; shadow_table = shadow_table_row; for (znegative = 0; znegative <= 1; znegative++) { for (m = 0; m < num_materials; m++) { for (c = 0; c < color_channels; c++) { if (*table > 255.) *table = 255.; if (*table + *shadow_table > 255.) *shadow_table = 255. - *table; shadow_table++; table++; } } } } else { table = table_row; for (znegative = 0; znegative <= 1; znegative++) { for (m = 0; m < num_materials; m++) { for (c = 0; c < color_channels; c++) { if (*table > 255.) *table = 255.; table++; } } } } } if (num_materials == 1) { table_row += 2*color_channels; } else { if (color_channels == 1) table_row += 2*num_materials; else table_row += 6*num_materials; } if (enable_shadows) { if (num_materials == 1) { shadow_table_row += 2*color_channels; } else { if (color_channels == 1) shadow_table_row += 2*num_materials; else shadow_table_row += 6*num_materials; } } } /* for px */ } /* for py */ /* stop timer */ GET_TIME(vpc, t1); STORE_TIME(vpc, VPTIMER_SHADE, t0, t1); return(VP_OK); } volpack-1.0b3/config.guess0000755000265600020320000012706110661211205012500 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-07-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # 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 ;; sh5el) machine=sh5le-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 ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[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 ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; 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 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # 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 ;; 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 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; 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\n"); 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # 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 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; 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: volpack-1.0b3/NEWS0000644000265600020320000000014410727044625010664 00000000000000For more detailed information please look at the ChangeLog file 2007-07-28 - Added automake stuff volpack-1.0b3/depcomp0000755000265600020320000004224610515602102011534 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 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 to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" 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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. 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$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: volpack-1.0b3/vp_renderR.c0000644000265600020320000001152605701116544012441 00000000000000/* * vp_renderR.c * * Function to render raw (unclassified) volumes. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.23 $ */ #include "vp_global.h" #define COMP_AR1PB_FUNC VPCompAR1PB extern void VPCompAR1PB(); #define COMP_AR3PB_FUNC VPCompAR3PB extern void VPCompAR3PB(); #ifdef COMP_AR11B #define COMP_AR11B_FUNC VPCompAR11B extern void VPCompAR11B(); #else #define COMP_AR11B_FUNC VPCompAR1NB #endif #ifdef COMP_AR31B #define COMP_AR31B_FUNC VPCompAR31B extern void VPCompAR31B(); #else #define COMP_AR31B_FUNC VPCompAR3NB #endif #ifdef COMP_AR12B #define COMP_AR12B_FUNC VPCompAR12B extern void VPCompAR12B(); #else #define COMP_AR12B_FUNC VPCompAR1NB #endif #ifdef COMP_AR32B #define COMP_AR32B_FUNC VPCompAR32B extern void VPCompAR32B(); #else #define COMP_AR32B_FUNC VPCompAR3NB #endif #define COMP_AR1NB_FUNC VPCompAR1NB extern void VPCompAR1NB(); #define COMP_AR3NB_FUNC VPCompAR3NB extern void VPCompAR3NB(); #define COMP_AR1PS_FUNC VPCompAR1PB #define COMP_AR3PS_FUNC VPCompAR3PB #ifdef COMP_AR11S #define COMP_AR11S_FUNC VPCompAR11S extern void VPCompAR11S(); #else #define COMP_AR11S_FUNC VPCompAR1NS #endif #ifdef COMP_AR31S #define COMP_AR31S_FUNC VPCompAR31S extern void VPCompAR31S(); #else #define COMP_AR31S_FUNC VPCompAR3NS #endif #ifdef COMP_AR12S #define COMP_AR12S_FUNC VPCompAR12S extern void VPCompAR12S(); #else #define COMP_AR12S_FUNC VPCompAR1NS #endif #ifdef COMP_AR32S #define COMP_AR32S_FUNC VPCompAR32S extern void VPCompAR32S(); #else #define COMP_AR32S_FUNC VPCompAR3NS #endif #define COMP_AR1NS_FUNC VPCompAR1NS extern void VPCompAR1NS(); #define COMP_AR3NS_FUNC VPCompAR3NS extern void VPCompAR3NS(); #ifdef INDEX_VOLUME extern void VPCompAI11B(); #endif #define SHADOWS_OFF 0 #define SHADOWS_ON 1 #define SHADOW_OPTS 2 #define MATERIAL_CALLBACK 0 #define MATERIAL_ONE 1 #define MATERIAL_TWO 2 #define MATERIAL_MORE 3 #define MATERIAL_OPTS 4 #define COLOR_GRAY 0 #define COLOR_RGB 1 #define COLOR_OPTS 2 static void (*AffineProcTable[SHADOW_OPTS][MATERIAL_OPTS][COLOR_OPTS])() = { { { COMP_AR1PB_FUNC, COMP_AR3PB_FUNC }, { COMP_AR11B_FUNC, COMP_AR31B_FUNC }, { COMP_AR12B_FUNC, COMP_AR32B_FUNC }, { COMP_AR1NB_FUNC, COMP_AR3NB_FUNC } }, { { COMP_AR1PS_FUNC, COMP_AR3PS_FUNC }, { COMP_AR11S_FUNC, COMP_AR31S_FUNC }, { COMP_AR12S_FUNC, COMP_AR32S_FUNC }, { COMP_AR1NS_FUNC, COMP_AR3NS_FUNC } } }; /* * vpRenderRawVolume * * Render an uclassified volume using the shear-warp algorithm. */ vpResult vpRenderRawVolume(vpc) vpContext *vpc; { int retcode; void (*composite_func)(); int shadow_option, material_option, color_option; /* check for errors and initialize */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckClassifier(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckShader(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckImage(vpc)) != VP_OK) return(retcode); if (vpc->num_clsfy_params > 2) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); Debug((vpc, VPDEBUG_RENDER, "Algorithm: affine RAWvolume (%s)\n", vpc->mm_octree == NULL ? "no octree" : "with octree")); /* determine which options are enabled */ if (vpc->enable_shadows) shadow_option = SHADOWS_ON; else shadow_option = SHADOWS_OFF; if (vpc->shading_mode == CALLBACK_SHADER) material_option = MATERIAL_CALLBACK; else if (vpc->num_materials == 1) material_option = MATERIAL_ONE; else if (vpc->num_materials == 2) material_option = MATERIAL_TWO; else material_option = MATERIAL_MORE; if (vpc->color_channels == 1) color_option = COLOR_GRAY; else color_option = COLOR_RGB; /* render */ if (vpc->affine_view) { /* choose a compositing function */ composite_func = AffineProcTable[shadow_option][material_option] [color_option]; VPRenderAffine(vpc, USE_RAWVOLUME, composite_func); } else { /* XXX perspective rendering not available yet */ return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } volpack-1.0b3/vp_warp.c0000644000265600020320000003531205701116551012006 00000000000000/* * vp_warp.c * * Support routines for 1-pass image warping. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.26 $ */ #include "vp_global.h" /* weights for bilirp filter; index with (yfrac, xfrac, tap number) */ float VPBilirpWeight[WARP_WEIGHT_ENTRIES][WARP_WEIGHT_ENTRIES][4]; static int BilirpWeightsReady = 0; /* true if weight table initialized */ static void OrderCoords ANSI_ARGS((double coords[4][2], double lft[3][2], double rgt[3][2])); /* * VPComputeWarpTables * * Precompute lookup tables for fast filter convolution during warping. */ void VPComputeWarpTables() { float *wptr; /* pointer into weight table */ int x, y; double in_x, in_y; if (BilirpWeightsReady) return; #ifdef MEMSPY bin_init(BinNumber(__LINE__, __FILE__, "VPBilirpWeight"), -1, -1, VPBilirpWeight, sizeof(VPBilirpWeight), "VPBilirpWeight"); #endif wptr = &VPBilirpWeight[0][0][0]; for (y = 0; y < WARP_WEIGHT_ENTRIES; y++) { in_y = (double)y / (WARP_WEIGHT_ENTRIES-1); for (x = 0; x < WARP_WEIGHT_ENTRIES; x++) { in_x = (double)x / (WARP_WEIGHT_ENTRIES-1); *wptr++ = (1. - in_x)*(1. - in_y); *wptr++ = in_x * (1. - in_y); *wptr++ = (1. - in_x) * in_y; *wptr++ = 1. - wptr[-1] - wptr[-2] - wptr[-3]; } } BilirpWeightsReady = 1; } /* * VPAffineComputeImageOverlap * * Compute the intersection of the intermediate image and the final image. * This intersection is broken up into a series of trapezoids whose * bases are parallel to the scanlines of the final image (for ease * of scan conversion). Two sets of trapezoids are computed: one set * gives the region of the final image for which the filter kernel is * completely contained within the intermedaite image. The second set of * trapezoids gives the region of the final image for which the filter * kernel overlaps at least some of the intermedaite image, but may or may not * be completely contained. Any region of the final image which is not * within the second set of trapezoids is not affected by the intermediate * image at all and should be set to the background color. */ void VPAffineImageOverlap(in_width, in_height, out_width, out_height, warp_matrix, filter_width, full_overlap, part_overlap) int in_width, in_height; /* input (intermediate) image size */ int out_width, out_height; /* output (final) image size */ vpMatrix3 warp_matrix; /* affine transformation from input image to output image */ double filter_width; /* filter kernel width in input image coordinates */ Trapezoid full_overlap[9]; /* portion of the intersection with full filter kernel overlap */ Trapezoid part_overlap[9]; /* portion of the intersection with partial filter kernel overlap */ { double int_lft[3][2]; /* coordinates bounding the left side of the full_overlap region in output coordinates, sorted from top (lowest y) to bottom */ double int_rgt[3][2]; /* right side of full_overlap region */ double ext_lft[3][2]; /* left side of part_overlap region */ double ext_rgt[3][2]; /* right side of part_overlap region */ double coords[4][2]; double inset; int ilft, irgt, elft, ergt; int region; int lasty, nexty, y; /* compute the bounding box of the full_overlap region and store it in int_lft and int_rgt */ inset = -1.0 + filter_width / 2.0 + 1.0e-5; coords[0][0] = warp_matrix[0][0] * inset + warp_matrix[0][1] * inset + warp_matrix[0][2]; coords[0][1] = warp_matrix[1][0] * inset + warp_matrix[1][1] * inset + warp_matrix[1][2]; coords[1][0] = warp_matrix[0][0] * (in_width - 1 - inset) + warp_matrix[0][1] * inset + warp_matrix[0][2]; coords[1][1] = warp_matrix[1][0] * (in_width - 1 - inset) + warp_matrix[1][1] * inset + warp_matrix[1][2]; coords[2][0] = warp_matrix[0][0] * (in_width - 1 - inset) + warp_matrix[0][1] * (in_height - 1 - inset) + warp_matrix[0][2]; coords[2][1] = warp_matrix[1][0] * (in_width - 1 - inset) + warp_matrix[1][1] * (in_height - 1 - inset) + warp_matrix[1][2]; coords[3][0] = warp_matrix[0][0] * inset + warp_matrix[0][1] * (in_height - 1 - inset) + warp_matrix[0][2]; coords[3][1] = warp_matrix[1][0] * inset + warp_matrix[1][1] * (in_height - 1 - inset) + warp_matrix[1][2]; OrderCoords(coords, int_lft, int_rgt); /* compute the bounding box of the part_overlap region and store it in int_lft and int_rgt */ inset = -filter_width / 2.0; coords[0][0] = warp_matrix[0][0] * inset + warp_matrix[0][1] * inset + warp_matrix[0][2]; coords[0][1] = warp_matrix[1][0] * inset + warp_matrix[1][1] * inset + warp_matrix[1][2]; coords[1][0] = warp_matrix[0][0] * (in_width - 1 - inset) + warp_matrix[0][1] * inset + warp_matrix[0][2]; coords[1][1] = warp_matrix[1][0] * (in_width - 1 - inset) + warp_matrix[1][1] * inset + warp_matrix[1][2]; coords[2][0] = warp_matrix[0][0] * (in_width - 1 - inset) + warp_matrix[0][1] * (in_height - 1 - inset) + warp_matrix[0][2]; coords[2][1] = warp_matrix[1][0] * (in_width - 1 - inset) + warp_matrix[1][1] * (in_height - 1 - inset) + warp_matrix[1][2]; coords[3][0] = warp_matrix[0][0] * inset + warp_matrix[0][1] * (in_height - 1 - inset) + warp_matrix[0][2]; coords[3][1] = warp_matrix[1][0] * inset + warp_matrix[1][1] * (in_height - 1 - inset) + warp_matrix[1][2]; OrderCoords(coords, ext_lft, ext_rgt); for (ilft = 0; ilft < 3 && int_lft[ilft][1] <= 0.; ilft++); for (irgt = 0; irgt < 3 && int_rgt[irgt][1] <= 0.; irgt++); for (elft = 0; elft < 3 && ext_lft[elft][1] <= 0.; elft++); for (ergt = 0; ergt < 3 && ext_rgt[ergt][1] <= 0.; ergt++); region = 0; lasty = -1; while (lasty < out_height-1) { ASSERT(region < 9); /* find nexty */ nexty = out_height - 1; if (ilft < 3) { y = (int)floor(int_lft[ilft][1]); if (nexty > y) nexty = y; } if (irgt < 3) { y = (int)floor(int_rgt[irgt][1]); if (nexty > y) nexty = y; } if (elft < 3) { y = (int)floor(ext_lft[elft][1]); if (nexty > y) nexty = y; } if (ergt < 3) { y = (int)floor(ext_rgt[ergt][1]); if (nexty > y) nexty = y; } ASSERT((ilft == 0 && (int)floor(int_lft[0][1]) >= nexty) || (ilft == 3 && (int)floor(int_lft[2][1]) <= lasty) || (((int)floor(int_lft[ilft-1][1]) <= lasty || lasty == -1) && (int)floor(int_lft[ilft][1]) >= nexty)); ASSERT((irgt == 0 && (int)floor(int_rgt[0][1]) >= nexty) || (irgt == 3 && (int)floor(int_rgt[2][1]) <= lasty) || (((int)floor(int_rgt[irgt-1][1]) <= lasty || lasty == -1) && (int)floor(int_rgt[irgt][1]) >= nexty)); ASSERT((elft == 0 && (int)floor(ext_lft[0][1]) >= nexty) || (elft == 3 && (int)floor(ext_lft[2][1]) <= lasty) || (((int)floor(ext_lft[elft-1][1]) <= lasty || lasty == -1) && (int)floor(ext_lft[elft][1]) >= nexty)); ASSERT((ergt == 0 && (int)floor(ext_rgt[0][1]) >= nexty) || (ergt == 3 && (int)floor(ext_rgt[2][1]) <= lasty) || (((int)floor(ext_rgt[ergt-1][1]) <= lasty || lasty == -1) && (int)floor(ext_rgt[ergt][1]) >= nexty)); full_overlap[region].miny = lasty + 1; full_overlap[region].maxy = nexty; part_overlap[region].miny = lasty + 1; part_overlap[region].maxy = nexty; if (ilft == 0 || ilft == 3) { /* this trapezoid does not intersect full_overlap */ full_overlap[region].x_top_lft = 0; full_overlap[region].x_top_rgt = -1; full_overlap[region].x_incr_lft = 0; full_overlap[region].x_incr_rgt = 0; } else { full_overlap[region].x_incr_lft = (int_lft[ilft][0] - int_lft[ilft-1][0]) / (int_lft[ilft][1] - int_lft[ilft-1][1]); full_overlap[region].x_top_lft = int_lft[ilft-1][0] + (lasty+1 - int_lft[ilft-1][1]) * full_overlap[region].x_incr_lft; full_overlap[region].x_incr_rgt = (int_rgt[irgt][0] - int_rgt[irgt-1][0]) / (int_rgt[irgt][1] - int_rgt[irgt-1][1]); full_overlap[region].x_top_rgt = int_rgt[irgt-1][0] + (lasty+1 - int_rgt[irgt-1][1]) * full_overlap[region].x_incr_rgt; } if (elft == 0 || elft == 3) { /* this trapezoid does not intersect part_overlap */ part_overlap[region].x_top_lft = 0; part_overlap[region].x_top_rgt = -1; part_overlap[region].x_incr_lft = 0; part_overlap[region].x_incr_rgt = 0; } else { part_overlap[region].x_incr_lft = (ext_lft[elft][0] - ext_lft[elft-1][0]) / (ext_lft[elft][1] - ext_lft[elft-1][1]); part_overlap[region].x_top_lft = ext_lft[elft-1][0] + (lasty+1 - ext_lft[elft-1][1]) * part_overlap[region].x_incr_lft; part_overlap[region].x_incr_rgt = (ext_rgt[ergt][0] - ext_rgt[ergt-1][0]) / (ext_rgt[ergt][1] - ext_rgt[ergt-1][1]); part_overlap[region].x_top_rgt = ext_rgt[ergt-1][0] + (lasty+1 - ext_rgt[ergt-1][1]) * part_overlap[region].x_incr_rgt; } ASSERT(!(full_overlap[region].x_top_lft <= full_overlap[region].x_top_rgt && part_overlap[region].x_top_lft > part_overlap[region].x_top_rgt)); for (; ilft < 3 && (int)floor(int_lft[ilft][1]) <= nexty; ilft++); for (; irgt < 3 && (int)floor(int_rgt[irgt][1]) <= nexty; irgt++); for (; elft < 3 && (int)floor(ext_lft[elft][1]) <= nexty; elft++); for (; ergt < 3 && (int)floor(ext_rgt[ergt][1]) <= nexty; ergt++); region++; lasty = nexty; } for (; region < 9; region++) { full_overlap[region].miny = out_height; full_overlap[region].maxy = out_height; part_overlap[region].miny = out_height; part_overlap[region].maxy = out_height; full_overlap[region].x_top_lft = 0; full_overlap[region].x_top_rgt = -1; full_overlap[region].x_incr_lft = 0; full_overlap[region].x_incr_rgt = 0; part_overlap[region].x_top_lft = 0; part_overlap[region].x_top_rgt = -1; part_overlap[region].x_incr_lft = 0; part_overlap[region].x_incr_rgt = 0; } #ifdef DEBUG_OVERLAP for (region = 0; region < 9; region++) { printf("region %d: y = %d to %d, [%d+%g [%d+%g %d+%g] %d+%g]\n", region, full_overlap[region].miny, full_overlap[region].maxy, (int)part_overlap[region].x_top_lft, part_overlap[region].x_incr_lft, (int)full_overlap[region].x_top_lft, full_overlap[region].x_incr_lft, (int)full_overlap[region].x_top_rgt, full_overlap[region].x_incr_rgt, (int)part_overlap[region].x_top_rgt, part_overlap[region].x_incr_rgt); } #endif } /* * OrderCoords * * Sort an array of coordinates. */ static void OrderCoords(coords, lft, rgt) double coords[4][2]; /* inputs */ double lft[3][2]; /* outputs */ double rgt[3][2]; { int index; double swap_buf; double sorted_coords[4][2]; double xmid; /* sort the coordinates as follows: coords[0]: smallest y value; if there is a tie, then smallest x value to break the tie; this is the top or top left corner coords[1]: next coordinate in CCW order; this is the left or bottom left corner coords[2]: next coordinate in CCW order; this is the bottom or bottom right corner coords[3]: next coordinate in CCW order; this is the right or top right corner */ /* search for coords[0] */ index = 0; if (coords[1][1] < coords[index][1] || (coords[1][1] == coords[index][1] && coords[1][0] < coords[index][0])) index = 1; if (coords[2][1] < coords[index][1] || (coords[2][1] == coords[index][1] && coords[2][0] < coords[index][0])) index = 2; if (coords[3][1] < coords[index][1] || (coords[3][1] == coords[index][1] && coords[3][0] < coords[index][0])) index = 3; sorted_coords[0][0] = coords[index][0]; sorted_coords[0][1] = coords[index][1]; /* coords[2] is the opposite corner */ sorted_coords[2][0] = coords[(index+2)%4][0]; sorted_coords[2][1] = coords[(index+2)%4][1]; /* determine which of the remaining two coordinates is to the left of the line joining coords[0] and coords[2]; this coordinate is coords[1], and the final remaining coordinate is coords[3] */ index = (index + 1) % 4; if (fabs(sorted_coords[0][1] - sorted_coords[2][1]) < VP_EPS) { /* input image is degenerate (transforms to a horizontal line) */ lft[0][0] = sorted_coords[0][0]; lft[0][1] = sorted_coords[0][1]; lft[1][0] = sorted_coords[0][0]; lft[1][1] = sorted_coords[0][1]; lft[2][0] = sorted_coords[0][0]; lft[2][1] = sorted_coords[0][1]; rgt[0][0] = sorted_coords[2][0]; rgt[0][1] = sorted_coords[2][1]; rgt[1][0] = sorted_coords[2][0]; rgt[1][1] = sorted_coords[2][1]; rgt[2][0] = sorted_coords[2][0]; rgt[2][1] = sorted_coords[2][1]; return; } xmid = sorted_coords[0][0] + (coords[index][1] - sorted_coords[0][1]) * (sorted_coords[2][0] - sorted_coords[0][0]) / (sorted_coords[2][1] - sorted_coords[0][1]); if (coords[index][0] < xmid) { sorted_coords[1][0] = coords[index][0]; sorted_coords[1][1] = coords[index][1]; sorted_coords[3][0] = coords[(index+2)%4][0]; sorted_coords[3][1] = coords[(index+2)%4][1]; } else { sorted_coords[1][0] = coords[(index+2)%4][0]; sorted_coords[1][1] = coords[(index+2)%4][1]; sorted_coords[3][0] = coords[index][0]; sorted_coords[3][1] = coords[index][1]; } /* store the results in the output array */ lft[0][0] = sorted_coords[0][0]; lft[0][1] = sorted_coords[0][1]; lft[1][0] = sorted_coords[1][0]; lft[1][1] = sorted_coords[1][1]; if (sorted_coords[1][1] == sorted_coords[2][1]) { lft[2][0] = sorted_coords[1][0]; lft[2][1] = sorted_coords[1][1]; } else { lft[2][0] = sorted_coords[2][0]; lft[2][1] = sorted_coords[2][1]; } if (sorted_coords[0][1] == sorted_coords[3][1]) { rgt[0][0] = sorted_coords[3][0]; rgt[0][1] = sorted_coords[3][1]; rgt[1][0] = sorted_coords[2][0]; rgt[1][1] = sorted_coords[2][1]; rgt[2][0] = sorted_coords[2][0]; rgt[2][1] = sorted_coords[2][1]; } else { rgt[0][0] = sorted_coords[0][0]; rgt[0][1] = sorted_coords[0][1]; rgt[1][0] = sorted_coords[3][0]; rgt[1][1] = sorted_coords[3][1]; rgt[2][0] = sorted_coords[2][0]; rgt[2][1] = sorted_coords[2][1]; } } volpack-1.0b3/vp_warpA.m40000644000265600020320000004553405701116554012217 00000000000000/* * vp_warpA.m4 * * One-pass image warping routine for affine transformations. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.21 $ */ #include "vp_global.h" dnl Description: dnl This is an m4 source file which defines a C procedure to warp dnl a 2D image according to an affine transformation. The macro dnl definitions allow the procedure to be specialized for a particular dnl output pixel type. dnl dnl To produce a C source file, run this file through m4 with the dnl following m4 macros defined: dnl dnl FuncName name of the C function to produce dnl IntPixelType intermediate image element type (GrayIntPixel dnl or RGBIntPixel) dnl BGRPixel 1 to store color pixel in BGR order, dnl 0 otherwise dnl ColorChannels number of channels for color (0, 1 or 3) dnl OpacityChannels number of channels for opacity (0, 1) dnl dnl OR, define "SourceFile" to be a file name of the form dnl vp_warpA????.c dnl where the four wildcard characters (call them W, X, Y and Z) dnl can have one of the following values: dnl W: number of color channels in intermediate image ("1" or "3") dnl X: number of color channels in the output image ("0", "1" or "3") dnl Y: number of opacity channels in output image ("0" or "1") dnl Z: "R" to store color pixel in reverse order (ABGR), dnl "N" to store color pixel in normal order (RGBA) ifdef(`SourceFile', ` define(FuncNameStr, `substr(SourceFile, 7, 5)') define(ColorChannelsIn, `substr(SourceFile, 8, 1)') define(ColorChannels, `substr(SourceFile, 9, 1)') define(OpacityChannels, `substr(SourceFile, 10, 1)') define(ReverseOrder, `substr(SourceFile, 11, 1)') define(FuncName, `VPWarp'FuncNameStr()) ifelse(ColorChannelsIn, `1', `define(IntPixelType, GrayIntPixel)', ColorChannelsIn, `3', `define(IntPixelType, RGBIntPixel)') ifelse(ReverseOrder, `R', `define(BGRPixel, 1)', `define(BGRPixel, 0)') ') dnl Macros defined below: dnl DeclareAccumulator() declare a pixel accumulator dnl ClearAccumulator() clear the pixel accumulator dnl Accumulate1(wgt, ipixel) multiply ipixel by wgt and add to accumulator dnl Accumulate4(wgt0, ipixel0, wgt1, ipixel1, wgt2, ipixel2, wgt3, ipixel3) dnl multiply each pixel by corresponding weight dnl and store in accumulator dnl StoreAccumulator(dst) write the pixel accumulator to dst dnl dnl dnl Definitions that depend on the number of color channels. dnl ifelse(ColorChannels, 0, ` define(`DeclareColorAccumulator', `') define(`ClearColorAccumulator', `') define(`ColorAccumulate1', `') define(`ColorAccumulate4', `') define(`StoreColorAccumulator', `')') ifelse(ColorChannels, 1, ` define(`DeclareColorAccumulator', `float gray_acc; int gray_acc_int;') define(`ClearColorAccumulator', `gray_acc = 0;') define(`ColorAccumulate1', `gray_acc += ($1) * ($2.clrflt);') define(`ColorAccumulate4', ` gray_acc = ($1) * ($2.clrflt) + ($3) * ($4.clrflt) + ($5) * ($6.clrflt) + ($7) * ($8.clrflt);') define(`StoreColorAccumulator', ` gray_acc_int = gray_acc; if (gray_acc_int > 255) gray_acc_int = 255; ($1) = gray_acc_int;')') ifelse(ColorChannels, 3, ` define(`DeclareColorAccumulator', `float r_acc, g_acc, b_acc; int r_acc_int, g_acc_int, b_acc_int;') define(`ClearColorAccumulator', `r_acc = g_acc = b_acc = 0;') define(`ColorAccumulate1', ` r_acc += ($1) * ($2.rclrflt); g_acc += ($1) * ($2.gclrflt); b_acc += ($1) * ($2.bclrflt);') define(`ColorAccumulate4', ` r_acc = ($1) * ($2.rclrflt) + ($3) * ($4.rclrflt) + ($5) * ($6.rclrflt) + ($7) * ($8.rclrflt); g_acc = ($1) * ($2.gclrflt) + ($3) * ($4.gclrflt) + ($5) * ($6.gclrflt) + ($7) * ($8.gclrflt); b_acc = ($1) * ($2.bclrflt) + ($3) * ($4.bclrflt) + ($5) * ($6.bclrflt) + ($7) * ($8.bclrflt);') define(`StoreColorAccumulator', ` r_acc_int = r_acc; if (r_acc_int > 255) r_acc_int = 255; ($1) = r_acc_int; g_acc_int = g_acc; if (g_acc_int > 255) g_acc_int = 255; ($2) = g_acc_int; b_acc_int = b_acc; if (b_acc_int > 255) b_acc_int = 255; ($3) = b_acc_int;')') dnl dnl Definitions that depend on the number of opacity channels. dnl ifelse(OpacityChannels, 0, ` define(`DeclareOpacityAccumulator', `') define(`ClearOpacityAccumulator', `') define(`OpacityAccumulate1', `') define(`OpacityAccumulate4', `') define(`StoreOpacityAccumulator', `')') ifelse(OpacityChannels, 1, ` define(`DeclareOpacityAccumulator', `float opc_acc; int opc_acc_int;') define(`ClearOpacityAccumulator', `opc_acc = 0;') define(`OpacityAccumulate1', `opc_acc += ($1) * ($2.opcflt);') define(`OpacityAccumulate4', ` opc_acc = ($1) * ($2.opcflt) + ($3) * ($4.opcflt) + ($5) * ($6.opcflt) + ($7) * ($8.opcflt);') define(`StoreOpacityAccumulator', ` opc_acc_int = opc_acc * (float)255.; if (opc_acc_int > 255) opc_acc_int = 255; ($1) = opc_acc_int;')') dnl dnl Other defintions. dnl define(`OutputChannels', ((ColorChannels) + (OpacityChannels))) define(`DeclareAccumulator', ` DeclareColorAccumulator DeclareOpacityAccumulator') define(`ClearAccumulator', ` ClearColorAccumulator ClearOpacityAccumulator') define(`Accumulate1', ` ColorAccumulate1($1, $2) OpacityAccumulate1($1, $2)') define(`Accumulate4', ` ColorAccumulate4($1, $2, $3, $4, $5, $6, $7, $8) OpacityAccumulate4($1, $2, $3, $4, $5, $6, $7, $8)') ifelse(BGRPixel, 0, ` define(`StoreAccumulator', ` StoreColorAccumulator(($1)[0], ($1)[1], ($1)[2]) StoreOpacityAccumulator(($1)[ColorChannels])')', ` define(`StoreAccumulator', ` StoreOpacityAccumulator(($1)[0]) StoreColorAccumulator(($1)[OpacityChannels+2], ($1)[OpacityChannels+1], ($1)[OpacityChannels+0])')') /* convert a float in the interval [0-1) to a 31-bit fixed point */ #define FLTFRAC_TO_FIX31(f) ((int)((f) * 2147483648.)) /* convert a 31-bit fixed point to a weight table index */ #define FIX31_TO_WGTIND(f) ((f) >> (31 - WARP_WEIGHT_INDEX_BITS)) extern float VPBilirpWeight[WARP_WEIGHT_ENTRIES][WARP_WEIGHT_ENTRIES][4]; /* * FuncName * * One-pass warper. Transforms in_image to out_image according to * the affine warp specified by warp_matrix. The resampling filter * is a bilirp (suitable for upsampling only). */ void FuncName (in_image, in_width, in_height, in_bytes_per_scan, out_image, out_width, out_height, out_bytes_per_scan, warp_matrix) IntPixelType *in_image; /* input image data */ int in_width; /* size of input image */ int in_height; int in_bytes_per_scan; /* bytes per scanline in input image */ char *out_image; /* output image data */ int out_width; /* size of output image */ int out_height; int out_bytes_per_scan; /* bytes per scanline in output image */ vpMatrix3 warp_matrix; /* [ outx ] [ inx ] */ /* [ outy ] = warp_matrix * [ iny ] */ /* [ 1 ] [ 1 ] */ { Trapezoid full_overlap[9]; /* description of the area of overlap of output image (shrunk by the size of the filter kernel) with input image */ Trapezoid part_overlap[9]; /* description of the area of overlap of output image (unlarged by the size of the filter kernel) with input image */ int region; /* index into full/part_overlap */ char *out_ptr; /* pointer to current pixel of output image */ int out_scan_y; /* coordinate of current output scanline */ int scans_to_next_vertex; /* number of scans left to process before the next vertex is reached */ IntPixelType *in_ptr; /* pointer to current pixel of input image */ double x_lft_full, x_rgt_full; /* intersection of scan with full_overlap */ double x_lft_part, x_rgt_part; /* intersection of scan with part_overlap */ int no_full_pixels; /* true if full_overlap is empty for scan */ double in_x, in_y; /* exact coordinates in the input image of the current output image pixel */ int in_x_int, in_y_int; /* coordinates of the nearest input image pixel to the upper-left of the current output image pixel */ int xfrac, yfrac; /* in_x - in_x_int and in_y - in_y_int, stored as a fixed-point number with 31 bits of fraction */ int xfrac_incr, yfrac_incr; /* increments to xfrac and yfrac to give the fractions for the next output image pixel in the current scan */ double in_x_incr, in_y_incr;/* increments to in_x and in_y to give the input image coordinates of the next output image pixel in the current scan (equal to dx_in/dx_out and dy_in/dx_out) */ int in_x_incr_int, in_y_incr_int; /* integer part of in_x/y_incr */ int in_x_incr_dlt, in_y_incr_dlt; /* sign of in_x/y_incr */ float *wptr; /* pointer into weight table */ int lft_zero_cnt; /* # zero pixels on left edge of scan */ int lft_edge_cnt; /* # pixels on left w/ part filter overlap */ int full_cnt; /* # pixels w/ full filter overlap */ int rgt_edge_cnt; /* # pixels on rgt w/ part filter overlap */ int rgt_zero_cnt; /* # zero pixels on right edge of scan */ int x; /* pixel index */ DeclareAccumulator /* pixel accumulator */ double denom; int c; #ifdef DEBUG { int y; for (y = 0; y < out_height; y++) { out_ptr = out_image + y*out_bytes_per_scan; for (x = 0; x < out_width; x++) { for (c = 0; c < OutputChannels; c++) *out_ptr++ = 255; } } } #endif /* initialize tables */ VPComputeWarpTables(); /* compute the intersection of the input image and the output image */ /* filter width = 2.0 in input image space (triangle filter) */ VPAffineImageOverlap(in_width, in_height, out_width, out_height, warp_matrix, 2., full_overlap, part_overlap); /* compute the output image */ out_ptr = out_image; out_scan_y = 0; denom = 1. / (warp_matrix[0][0] * warp_matrix[1][1] - warp_matrix[0][1] * warp_matrix[1][0]); in_x_incr = warp_matrix[1][1]*denom; in_y_incr = -warp_matrix[1][0]*denom; if (in_x_incr < 0) { in_x_incr_int = (int)ceil(in_x_incr); in_x_incr_dlt = -1; } else { in_x_incr_int = (int)floor(in_x_incr); in_x_incr_dlt = 1; } if (in_y_incr < 0) { in_y_incr_int = (int)ceil(in_y_incr); in_y_incr_dlt = -1; } else { in_y_incr_int = (int)floor(in_y_incr); in_y_incr_dlt = 1; } xfrac_incr = FLTFRAC_TO_FIX31(in_x_incr - in_x_incr_int); yfrac_incr = FLTFRAC_TO_FIX31(in_y_incr - in_y_incr_int); for (region = 0; region < 9; region++) { /* check for empty region */ if (part_overlap[region].miny >= out_height) { break; } /* check if this region of the output image is unaffected by the input image */ if (part_overlap[region].x_top_lft > part_overlap[region].x_top_rgt) { c = (part_overlap[region].maxy - part_overlap[region].miny + 1) * out_bytes_per_scan; bzero(out_ptr, c); out_ptr += c; out_scan_y += part_overlap[region].maxy - part_overlap[region].miny + 1; continue; } /* process scanlines of this region */ scans_to_next_vertex = part_overlap[region].maxy - part_overlap[region].miny + 1; x_lft_full = full_overlap[region].x_top_lft; x_rgt_full = full_overlap[region].x_top_rgt; x_lft_part = part_overlap[region].x_top_lft; x_rgt_part = part_overlap[region].x_top_rgt; if (x_lft_full > x_rgt_full) no_full_pixels = 1; else no_full_pixels = 0; ASSERT(scans_to_next_vertex > 0); ASSERT(out_scan_y == part_overlap[region].miny); while (scans_to_next_vertex > 0) { /* compute the portions of the scanline which are zero and which intersect the full and partially-full regions */ lft_zero_cnt = (int)floor(x_lft_part); if (lft_zero_cnt < 0) lft_zero_cnt = 0; else if (lft_zero_cnt > out_width) lft_zero_cnt = out_width; if (no_full_pixels) { lft_edge_cnt = (int)ceil(x_rgt_part); if (lft_edge_cnt < 0) lft_edge_cnt = 0; else if (lft_edge_cnt > out_width) lft_edge_cnt = out_width; lft_edge_cnt -= lft_zero_cnt; if (lft_edge_cnt < 0) lft_edge_cnt = 0; full_cnt = 0; rgt_edge_cnt = 0; rgt_zero_cnt = out_width - lft_zero_cnt - lft_edge_cnt; } else { lft_edge_cnt = (int)ceil(x_lft_full); if (lft_edge_cnt < 0) lft_edge_cnt = 0; else if (lft_edge_cnt > out_width) lft_edge_cnt = out_width; lft_edge_cnt -= lft_zero_cnt; if (lft_edge_cnt < 0) lft_edge_cnt = 0; full_cnt = (int)floor(x_rgt_full); if (full_cnt < 0) full_cnt = 0; else if (full_cnt > out_width) full_cnt = out_width; full_cnt -= lft_edge_cnt + lft_zero_cnt; if (full_cnt < 0) full_cnt = 0; rgt_edge_cnt = (int)ceil(x_rgt_part); if (rgt_edge_cnt < 0) rgt_edge_cnt = 0; else if (rgt_edge_cnt > out_width) rgt_edge_cnt = out_width; rgt_edge_cnt -= full_cnt + lft_edge_cnt + lft_zero_cnt; if (rgt_edge_cnt < 0) rgt_edge_cnt = 0; rgt_zero_cnt = out_width - lft_zero_cnt - lft_edge_cnt - full_cnt - rgt_edge_cnt; } /* reverse map the first left-edge output pixel coordinate into the input image coordinate system */ in_x = ((lft_zero_cnt - warp_matrix[0][2]) * warp_matrix[1][1] - (out_scan_y - warp_matrix[1][2])*warp_matrix[0][1])*denom; in_y = (-(lft_zero_cnt - warp_matrix[0][2]) * warp_matrix[1][0] + (out_scan_y - warp_matrix[1][2])*warp_matrix[0][0])*denom; in_x_int = (int)floor(in_x); in_y_int = (int)floor(in_y); in_ptr = (IntPixelType *)(((char *)in_image + in_y_int * in_bytes_per_scan)) + in_x_int; /* compute the weight lookup table indices and increments */ xfrac = FLTFRAC_TO_FIX31(in_x - in_x_int); yfrac = FLTFRAC_TO_FIX31(in_y - in_y_int); /* zero out unaffected pixels on left edge of scan */ if (lft_zero_cnt > 0) { bzero(out_ptr, lft_zero_cnt * OutputChannels); out_ptr += lft_zero_cnt * OutputChannels; } /* process left edge case pixels */ for (x = lft_zero_cnt; x < lft_zero_cnt + lft_edge_cnt; x++) { wptr = VPBilirpWeight[FIX31_TO_WGTIND(yfrac)] [FIX31_TO_WGTIND(xfrac)]; ClearAccumulator(); if (in_x_int >= 0 && in_x_int < in_width) { if (in_y_int >= 0 && in_y_int < in_height) { Accumulate1(wptr[0], in_ptr[0]); } if (in_y_int+1 >= 0 && in_y_int+1 < in_height) { Accumulate1(wptr[2], in_ptr[in_width]); } } if (in_x_int+1 >= 0 && in_x_int+1 < in_width) { if (in_y_int >= 0 && in_y_int < in_height) { Accumulate1(wptr[1], in_ptr[1]); } if (in_y_int+1 >= 0 && in_y_int+1 < in_height) { Accumulate1(wptr[3], in_ptr[in_width + 1]); } } StoreAccumulator(out_ptr); out_ptr += OutputChannels; xfrac += xfrac_incr; yfrac += yfrac_incr; if (xfrac < 0) { xfrac &= 0x7fffffff; in_x_int += in_x_incr_int + in_x_incr_dlt; in_ptr += in_x_incr_int + in_x_incr_dlt; } else { in_x_int += in_x_incr_int; in_ptr += in_x_incr_int; } if (yfrac < 0) { yfrac &= 0x7fffffff; in_y_int += in_y_incr_int + in_y_incr_dlt; in_ptr += in_width * (in_y_incr_int + in_y_incr_dlt); } else { in_y_int += in_y_incr_int; in_ptr += in_width * in_y_incr_int; } } /* process output pixels affected by four input pixels */ for (x = lft_zero_cnt + lft_edge_cnt; x < lft_zero_cnt + lft_edge_cnt + full_cnt; x++) { ASSERT(in_x_int >= 0 && in_x_int < in_width-1); ASSERT(in_y_int >= 0 && in_y_int < in_height-1); ASSERT((IntPixelType *)(((char *)in_image + in_y_int * in_bytes_per_scan)) + in_x_int == in_ptr); wptr = VPBilirpWeight[FIX31_TO_WGTIND(yfrac)] [FIX31_TO_WGTIND(xfrac)]; Accumulate4(wptr[0], in_ptr[0], wptr[2], in_ptr[in_width], wptr[1], in_ptr[1], wptr[3], in_ptr[in_width+1]); StoreAccumulator(out_ptr); out_ptr += OutputChannels; xfrac += xfrac_incr; yfrac += yfrac_incr; if (xfrac < 0) { xfrac &= 0x7fffffff; in_x_int += in_x_incr_int + in_x_incr_dlt; in_ptr += in_x_incr_int + in_x_incr_dlt; } else { in_x_int += in_x_incr_int; in_ptr += in_x_incr_int; } if (yfrac < 0) { yfrac &= 0x7fffffff; in_y_int += in_y_incr_int + in_y_incr_dlt; in_ptr += in_width * (in_y_incr_int + in_y_incr_dlt); } else { in_y_int += in_y_incr_int; in_ptr += in_width * in_y_incr_int; } } /* process right edge case pixels */ for (x = lft_zero_cnt + lft_edge_cnt + full_cnt; x < lft_zero_cnt + lft_edge_cnt + full_cnt + rgt_edge_cnt; x++) { wptr = VPBilirpWeight[FIX31_TO_WGTIND(yfrac)] [FIX31_TO_WGTIND(xfrac)]; ClearAccumulator(); if (in_x_int >= 0 && in_x_int < in_width) { if (in_y_int >= 0 && in_y_int < in_height) { Accumulate1(wptr[0], in_ptr[0]); } if (in_y_int+1 >= 0 && in_y_int+1 < in_height) { Accumulate1(wptr[2], in_ptr[in_width]); } } if (in_x_int+1 >= 0 && in_x_int+1 < in_width) { if (in_y_int >= 0 && in_y_int < in_height) { Accumulate1(wptr[1], in_ptr[1]); } if (in_y_int+1 >= 0 && in_y_int+1 < in_height) { Accumulate1(wptr[3], in_ptr[in_width + 1]); } } StoreAccumulator(out_ptr); out_ptr += OutputChannels; xfrac += xfrac_incr; yfrac += yfrac_incr; if (xfrac < 0) { xfrac &= 0x7fffffff; in_x_int += in_x_incr_int + in_x_incr_dlt; in_ptr += in_x_incr_int + in_x_incr_dlt; } else { in_x_int += in_x_incr_int; in_ptr += in_x_incr_int; } if (yfrac < 0) { yfrac &= 0x7fffffff; in_y_int += in_y_incr_int + in_y_incr_dlt; in_ptr += in_width * (in_y_incr_int + in_y_incr_dlt); } else { in_y_int += in_y_incr_int; in_ptr += in_width * in_y_incr_int; } } /* zero out unaffected pixels on right edge of scan */ if (rgt_zero_cnt > 0) { bzero(out_ptr, rgt_zero_cnt * OutputChannels); out_ptr += rgt_zero_cnt * OutputChannels; } /* go on to next scan */ scans_to_next_vertex--; out_scan_y++; out_ptr += out_bytes_per_scan - out_width * OutputChannels; x_lft_full += full_overlap[region].x_incr_lft; x_rgt_full += full_overlap[region].x_incr_rgt; x_lft_part += part_overlap[region].x_incr_lft; x_rgt_part += part_overlap[region].x_incr_rgt; } /* next scanline in region */ } /* next region */ ASSERT(out_scan_y == out_height); } volpack-1.0b3/configure0000755000265600020320000260433410727044633012110 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for volpack 1.0b3. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # 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 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='volpack' PACKAGE_TARNAME='volpack' PACKAGE_VERSION='1.0b3' PACKAGE_STRING='volpack 1.0b3' PACKAGE_BUGREPORT='volpack@graphics.stanford.edu' ac_unique_file="volpack.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias LIBVOLPACK_VERSION_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os 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 GREP EGREP LN_S ECHO AR RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL OFLAGS MFLAGS M4 LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures volpack 1.0b3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/volpack] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names 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 volpack 1.0b3:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --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-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor 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. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF volpack configure 1.0b3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by volpack $as_me 1.0b3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LIBVOLPACK_MAJOR=1 LIBVOLPACK_MINOR=1 LIBVOLPACK_MICRO=0 LIBVOLPACK_VERSION_INFO=$LIBVOLPACK_MAJOR:$LIBVOLPACK_MINOR:$LIBVOLPACK_MICRO ac_config_headers="$ac_config_headers config.h" am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if 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 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='volpack' VERSION='1.0b3' 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-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(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 -' # Check whether --enable-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 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 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. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { 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 if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for 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 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 grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-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* | 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* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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 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 4319 "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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------- ## ## Report this to volpack@graphics.stanford.edu ## ## -------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_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 if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi 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` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_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 { 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 ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag 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 ac_ext=cpp 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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 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=cpp 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$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=cpp 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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_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 if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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* | k*bsd*-gnu) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_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 if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi 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 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 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:7050: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7054: \$? = $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* | k*bsd*-gnu) 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:7318: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7322: \$? = $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:7422: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7426: \$? = $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* | k*bsd*-gnu) 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 link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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* | 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* | netbsdelf*-gnu) 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 ;; 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* | k*bsd*-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' 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 # 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)); 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 /usr/lib $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' ;; netbsdelf*-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='NetBSD ld.elf_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char 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 #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char 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 #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 # 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=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # 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=$lt_compiler_lib_search_path # 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=$lt_sys_lib_search_path_spec # 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 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=cpp 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 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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* | 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* | k*bsd*-gnu) 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* | netbsdelf*-gnu) 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* | 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* | k*bsd*-gnu) 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* | netbsdelf*-gnu) ;; 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:12155: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12159: \$? = $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:12259: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12263: \$? = $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' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) 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 ;; 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* | k*bsd*-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' 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 # 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)); 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 /usr/lib $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' ;; netbsdelf*-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='NetBSD ld.elf_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 # 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=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # 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=$lt_compiler_lib_search_path_CXX # 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=$lt_sys_lib_search_path_spec # 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* | k*bsd*-gnu) 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:13820: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13824: \$? = $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:13924: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13928: \$? = $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* | k*bsd*-gnu) 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 link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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* | 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* | netbsdelf*-gnu) 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 ;; 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* | k*bsd*-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' 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 # 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)); 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 /usr/lib $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' ;; netbsdelf*-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='NetBSD ld.elf_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 # 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=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # 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=$lt_compiler_lib_search_path_F77 # 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=$lt_sys_lib_search_path_spec # 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:16111: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16115: \$? = $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* | k*bsd*-gnu) 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:16379: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16383: \$? = $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:16483: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16487: \$? = $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* | k*bsd*-gnu) 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 link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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* | 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* | netbsdelf*-gnu) 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 ;; 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* | k*bsd*-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' 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 # 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)); 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 /usr/lib $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' ;; netbsdelf*-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='NetBSD ld.elf_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 # 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=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # 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=$lt_compiler_lib_search_path_GCJ # 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=$lt_sys_lib_search_path_spec # 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 # 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=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # 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=$lt_compiler_lib_search_path_RC # 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=$lt_sys_lib_search_path_spec # 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 { 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 if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac case "$host" in *-irix*) test -n "$silent" || echo "choosing compiler flags for SGI Irix" OFLAGS="-O -Olimit 2500 -float" ;; *-ultrix*) test -n "$silent" || echo "choosing compiler flags for DEC Ultrix" OFLAGS="-O -Olimit 2500 -float" MFLAGS= ;; *-sunos*) test -n "$silent" || echo "choosing compiler flags for SunOS" OFLAGS="-O" MFLAGS= ;; *-hpux*) test -n "$silent" || echo "choosing compiler flags for HP-UX" # thanks to Mike Goss (goss@cs.colostate.edu) OFLAGS="-Aa +O3 -J +Obb1600" MFLAGS="-D_HPUX_SOURCE" ;; *) echo "Unrecognized system type $host. Using generic compiler options." OFLAGS= MFLAGS= ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' if test -z "$M4" ; then case "$host" in *-sunos*) { echo "$as_me:$LINENO: checking /usr/5bin/m4..." >&5 echo "$as_me: checking /usr/5bin/m4..." >&6;} if test -f /usr/5bin/m4; then M4="/usr/5bin/m4" fi ;; esac fi for ac_prog in gnum4 gm4 m4 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_path_M4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $M4 in [\\/]* | ?:[\\/]*) ac_cv_path_M4="$M4" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi M4=$ac_cv_path_M4 if test -n "$M4"; then { echo "$as_me:$LINENO: result: $M4" >&5 echo "${ECHO_T}$M4" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$M4" && break done test -n "$M4" || { { echo "$as_me:$LINENO: error: m4 is missing on your system or not present in PATH." >&5 echo "$as_me: error: m4 is missing on your system or not present in PATH." >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in string.h memory.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------------- ## ## Report this to volpack@graphics.stanford.edu ## ## -------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for cos in -lm" >&5 echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_cos=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5 echo "${ECHO_T}$ac_cv_lib_m_cos" >&6; } if test $ac_cv_lib_m_cos = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile man/Makefile man/src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__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 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 : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by volpack $as_me 1.0b3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ volpack config.status 1.0b3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/src/Makefile") CONFIG_FILES="$CONFIG_FILES man/src/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim LIBVOLPACK_VERSION_INFO!$LIBVOLPACK_VERSION_INFO$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim OFLAGS!$OFLAGS$ac_delim MFLAGS!$MFLAGS$ac_delim M4!$M4$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi volpack-1.0b3/Makefile.am0000644000265600020320000000434110727044625012224 00000000000000## Process this file with automake to produce Makefile.in # Makefile.am for volpack # Andreas Tille and Daniel Leidert # GPL SUBDIRS = doc man examples EXTRA_DIST = no_edit_header vp_compA.m4 vp_warpA.m4 makeopts CLEANFILES = $(COMP_SRCS) $(WARP_SRCS) vp_opts.c AM_CFLAGS = $(AC_FLAGS) $(CCOPT_FLAGS) $(MFLAGS) \ $(PROTO_FLAG) $(UNROLL_FLAG) $(OPT_FLAGS) AM_LDFLAGS = -version-info @LIBVOLPACK_VERSION_INFO@ # Make sure, the library and source files are build first. BUILT_SOURCES = vp_opts.c $(COMP_SRCS) $(WARP_SRCS) $(lib_LTLIBRARIES) lib_LTLIBRARIES = libvolpack.la dist_libvolpack_la_SOURCES = volpack.h vp_global.h patchlevel.h \ vp_check.c vp_context.c vp_extract.c vp_file.c vp_linalg.c vp_octree.c \ vp_renderA.c vp_renderB.c vp_renderC.c vp_renderR.c vp_resample.c \ vp_rle.c vp_shade.c vp_transpose.c vp_util.c vp_view.c vp_warp.c nodist_libvolpack_la_SOURCES = $(COMP_SRCS) $(WARP_SRCS) vp_opts.c: makeopts Makefile ./makeopts vp_opts.c $(CFLAGS) # list of optional C source files to build with code specialized # for particular shaders and resampling filters OPT_SRCS = vp_compAC11B.c vp_compAC31B.c vp_compAC32B.c \ vp_compAR11B.c vp_compAR31B.c vp_compAR32B.c # C define flags corresponding to COMP_SRCS; these tell the dispatch # routines in the library which object files are available OPT_FLAGS = -DCOMP_AC11B -DCOMP_AC31B -DCOMP_AC32B \ -DCOMP_AR11B -DCOMP_AR31B -DCOMP_AR32B COMP_SRCS = vp_compAC1NB.c vp_compAC3NB.c vp_compAR1NB.c vp_compAR3NB.c \ vp_compAC1PB.c vp_compAC3PB.c vp_compAR1PB.c vp_compAR3PB.c \ vp_compAC00G.c vp_compAR00G.c vp_compAC1NS.c vp_compAC3NS.c \ vp_compAR1NS.c vp_compAR3NS.c $(OPT_SRCS) WARP_SRCS = vp_warpA101N.c vp_warpA301N.c vp_warpA110N.c vp_warpA111N.c \ vp_warpA330N.c vp_warpA331N.c vp_warpA330R.c vp_warpA331R.c COMP_IN = no_edit_header vp_compA.m4 WARP_IN = no_edit_header vp_warpA.m4 ESRC = vp_raycast.c EOBJ = vp_raycast.o $(COMP_SRCS): $(COMP_IN) $(M4) -DSourceFile=$@ $^ > $@ $(WARP_SRCS): $(WARP_IN) $(M4) -DSourceFile=$@ $^ > $@ MAINTAINERCLEANFILES = autom4te.cache volpack-1.0b3/doc/0000777000265600020320000000000010727044642011016 500000000000000volpack-1.0b3/doc/vp_userguide.ps0000644000265600020320000025003105674443032014001 00000000000000%!PS-Adobe-1.0 %%Title: VolPack User's Guide %%DocumentFonts: Times-Roman Times-Bold Times-Italic Courier Courier-Bold Courier-Oblique %%Creator: NCSA Mosaic, Postscript by Ameet Raval & Frans van Hoesel %%Pages: (atend) %%EndComments save /D {def} def /E {exch} D /M {moveto} D /S {show} D /R {rmoveto} D /L {lineto} D /RL {rlineto} D /SQ {newpath 0 0 M 0 1 L 1 1 L 1 0 L closepath} D /U {gsave currentpoint currentfont /FontInfo get /UnderlinePosition get 0 E currentfont /FontMatrix get dtransform E pop add newpath moveto dup stringwidth rlineto stroke grestore S } D /B {/r E D gsave -13 0 R currentpoint newpath r 0 360 arc closepath fill grestore } D /OB {/r E D gsave -13 0 R currentpoint newpath r 0 360 arc closepath stroke grestore } D /NP {xmargin topmargin translate scalfac dup scale } D /HR {/l E D gsave l 0 RL stroke grestore } D /SF {E findfont E scalefont setfont } D /FF {/Courier } D /FB {/Courier-Bold } D /FI {/Courier-Oblique } D /RF {/Times-Roman} D /BF {/Times-Bold} D /IF {/Times-Italic} D /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall /Encoding ISOLatin1Encoding D currentdict end definefont } D /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] D [RF BF IF FF FB FI] {reencodeISO D} forall /xmargin 43 D /topmargin 720 D /scalfac 0.54351 D %%EndProlog %%Page: 1 1 save NP 0 -20 M BF 24 SF 0 -20 R (VolPack User's Guide)S 0 -48 M 0 -65 M IF 17 SF 0 -13 R (Version 2.0beta1)S RF 17 SF ( )S 0 -84 M 0 -101 M BF 18 SF 0 -15 R (Table of Contents)S 0 -122 M 0 -139 M RF 17 SF 0 -13 R (Section 1: Overview )S 76 -158 M 0 -13 R (1. )S (Introduction to VolPack )S 76 -177 M 0 -13 R (2. )S (The Volume Rendering Pipeline )S 76 -196 M 0 -13 R (3. )S (Data Structures and Rendering Algorithms )S 0 -215 M 0 -13 R (Section 2: Using VolPack )S 76 -234 M 0 -13 R (1. )S (Include Files and Libraries )S 76 -253 M 0 -13 R (2. )S (Rendering Contexts )S 76 -272 M 0 -13 R (3. )S (Volumes )S 76 -291 M 0 -13 R (4. )S (Classification )S 76 -310 M 0 -13 R (5. )S (Classified Volumes )S 76 -329 M 0 -13 R (6. )S (Min-Max Octrees )S 76 -348 M 0 -13 R (7. )S (View Transformations )S 76 -367 M 0 -13 R (8. )S (Shading and Lighting )S 76 -386 M 0 -13 R (9. )S (Images )S 68 -405 M 0 -13 R (10. )S (Rendering )S 68 -424 M 0 -13 R (11. )S (State Variables )S 68 -443 M 0 -13 R (12. )S (Utility Functions )S 68 -462 M 0 -13 R (13. )S (Result Codes and Error Handling )S 0 -481 M 0 -13 R (Section 3: Tips and Pointers )S 76 -500 M 0 -13 R (1. )S (Maximizing Rendering Speed )S 76 -519 M 0 -13 R (2. )S (Maximizing Image Quality )S 76 -538 M 0 -13 R (3. )S (Software Support )S 76 -557 M 0 -13 R (4. )S (Obtaining the Software )S 48 -576 M 0 -593 M BF 18 SF 0 -15 R (Section 1: Overview )S 0 -614 M 0 -631 M BF 17 SF 0 -14 R (Introduction to VolPack )S 0 -651 M 0 -668 M RF 17 SF 0 -13 R (VolPack is a portable software library for volume rendering. It is based on a new family of fast volume rendering)S 0 -687 M 0 -13 R (algorithms \(see )S (Philippe Lacroute )S (and )S (Marc Levoy )S (, )S IF 17 SF (Fast Volume Rendering Using a Shear-Warp Factorization of)S 0 -706 M 0 -13 R (the Viewing Transformation)S RF 17 SF (, Proc. SIGGRAPH '94 \(Orlando, Florida, July 24-29, 1994\). In Computer Graphics)S 0 -725 M 0 -13 R (Proceedings, Annual Conference Series, 1994, ACM SIGGRAPH, pp. 451-458\). The library has the following)S 0 -744 M 0 -13 R (features: )S 0 -763 M 48 -780 M 0 -9 R 3.454545 B 0 -4 R (Renders data sampled on a regular, three-dimensional grid. )S 48 -799 M 0 -9 R 3.454545 B 0 -4 R (Supports user-specified transfer functions for both opacity and color. )S 48 -818 M 0 -9 R 3.454545 B 0 -4 R (Provides a shading model with directional light sources, multiple material types with different reflective)S 48 -837 M 0 -13 R (properties, depth cueing, and shadows. )S 48 -856 M 0 -9 R 3.454545 B 0 -4 R (Produces color \(24 bits/pixel\) or grayscale \(8 bits/pixel\) renderings, with or without an alpha channel. )S 48 -875 M 0 -9 R 3.454545 B 0 -4 R (Supports arbitrary affine view transformations. )S 48 -894 M 0 -9 R 3.454545 B 0 -4 R (Supports a flexible data format that allows an arbitrary C structure to be associated with each grid point. )S 48 -913 M 0 -9 R 3.454545 B 0 -4 R (Achieves very fast rendering times without specialized hardware. )S 48 -932 M 0 -949 M 0 -13 R (The library is intended for use in C or C++ programs but may be useful with other programming languages. The)S 0 -968 M 0 -13 R (current implementation does not support perspective projections or clipping planes. These features will be added in a)S 0 -987 M 0 -13 R (future release. )S 0 -1006 M 0 -1023 M 0 -13 R (The remainder of this section contains a brief introduction to the conceptual volume rendering pipeline used by)S 0 -1042 M 0 -13 R (VolPack, followed by a high-level description of the data structures and algorithms used by the library. This)S 0 -1061 M 0 -13 R (background material lays the foundation for )S (Section 2)S ( which describes each of the routines provided by VolPack.)S 0 -1080 M 0 -13 R (The routines are grouped by function and are presented roughly in the order that they would be called in a typical)S 0 -1099 M 0 -13 R (application. More detailed descriptions of each command can be found by consulting the man pages for VolPack.)S 0 -1118 M 0 -13 R (Finally, )S (Section 3)S ( covers some tips for maximizing rendering performance and image quality, and describes how to)S 0 -1137 M 0 -13 R (obtain the VolPack software. )S 0 -1156 M 0 -1173 M BF 17 SF 0 -14 R (The Volume Rendering Pipeline )S 0 -1193 M 0 -1210 M RF 17 SF 0 -13 R (The input to the volume renderer is a three-dimensional array of data. Each element of the array is a C structure)S showpage restore %%Page: 2 2 save NP RF 17 SF 0 0 M 0 -13 R (containing any number of fields of data, such as tissue density or temperature. Each element is called a "voxel." The)S 0 -19 M 0 -13 R (first stage in the volume rendering pipeline is to )S IF 17 SF (classify)S RF 17 SF ( the volume data, which means to assign an opacity to each)S 0 -38 M 0 -13 R (voxel. Opacity is the inverse of transparency: an opacity of 0.0 indicates a fully-transparent voxel, while an opacity)S 0 -57 M 0 -13 R (of 1.0 indicates a voxel which completely occludes anything behind it. Intermediate values between 0.0 and 1.0)S 0 -76 M 0 -13 R (indicate semi-transparent voxels. The purpose of classification is to assign low opacities to regions of the data set)S 0 -95 M 0 -13 R (which are uninteresting or distracting and high opacities to regions of the data set which should be visible in the)S 0 -114 M 0 -13 R (rendering. Intermediate opacity values are used for smooth transitions from transparent to opaque regions, and for)S 0 -133 M 0 -13 R (effects such as semi-transparent voxels which should not completely occlude objects behind them. )S 0 -152 M 0 -169 M 0 -13 R (VolPack provides a classification method based on lookup tables. To use this method you specify a transfer function)S 0 -188 M 0 -13 R (which maps the scalar data in a particular array element into the opacity for that element. Alternatively you can)S 0 -207 M 0 -13 R (implement other classification techniques such as context-sensitive segmentation and then provide VolPack with a)S 0 -226 M 0 -13 R (pre-classified volume. )S 0 -245 M 0 -262 M 0 -13 R (The second rendering stage is to assign a color to each voxel, an operation which is called )S IF 17 SF (shading)S RF 17 SF ( \(or more)S 0 -281 M 0 -13 R (precisely, )S IF 17 SF (lighting)S RF 17 SF (\). VolPack includes support for the standard Phong shading equation. To use this shading)S 0 -300 M 0 -13 R (technique, the volume data is preprocessed before rendering in order to compute a gradient vector for each voxel.)S 0 -319 M 0 -13 R (The gradient vector can then be used as a pseudo surface normal to compute how light reflects off of each voxel. The)S 0 -338 M 0 -13 R (user specifies the position and color of one or more light sources, and the reflective properties of the volume data.)S 0 -357 M 0 -13 R (See )S IF 17 SF (Computer Graphics: Principles and Practice)S RF 17 SF ( \(Chapter 16, 2nd ed.\), by Foley, van Dam, Feiner and Hughes, for a)S 0 -376 M 0 -13 R (detailed discussion of the Phong shading equation. Alternative shading models can be implemented through a)S 0 -395 M 0 -13 R (callback function. )S 0 -414 M 0 -431 M 0 -13 R (The third rendering stage is to specify a view transformation and to transform the volume accordingly. This step can)S 0 -450 M 0 -13 R (be as simple as choosing the position from which to look at the volume, or it can include an arbitrary affine)S 0 -469 M 0 -13 R (transformation of the volume including non-uniform scaling and shearing. The view transformation also specifies)S 0 -488 M 0 -13 R (how the volume is projected onto a 2D image plane. )S 0 -507 M 0 -524 M 0 -13 R (The fourth and final rendering stage is to composite the voxels into an image. Digital compositing is analogous to)S 0 -543 M 0 -13 R (the compositing process used in the film industry: several layers of semi-transparent film are merged together into a)S 0 -562 M 0 -13 R (final image. VolPack provides several rendering algorithms that use different techniques to accelerate the)S 0 -581 M 0 -13 R (compositing stage. The next subsection briefly describes the available algorithms. )S 0 -600 M 0 -617 M BF 17 SF 0 -14 R (Data Structures and Rendering Algorithms )S 0 -637 M 0 -654 M RF 17 SF 0 -13 R (VolPack includes three rendering algorithms which are useful in different situations. The algorithms differ in the)S 0 -673 M 0 -13 R (degree to which they trade flexibility for speed and in the type of preprocessing required before rendering. )S 0 -692 M 0 -709 M 0 -13 R (The fastest algorithm allows the user to rapidly render a volume with any view transformation and with any shading)S 0 -728 M 0 -13 R (parameters while keeping the classification fixed. This algorithm relies on a special data structure which contains)S 0 -747 M 0 -13 R (run-length encoded, classified volume data. Depending on the volume size it can take several minutes to precompute)S 0 -766 M 0 -13 R (the run-length encoded volume, so this algorithm is most suitable when many renderings will be made from the)S 0 -785 M 0 -13 R (same volume without changing the classification. )S 0 -804 M 0 -821 M 0 -13 R (The steps when using this algorithm to render a classified volume are: )S 0 -840 M 48 -857 M 0 -9 R 3.454545 B 0 -4 R (load the volume data )S 48 -876 M 0 -9 R 3.454545 B 0 -4 R (choose the classification function )S 48 -895 M 0 -9 R 3.454545 B 0 -4 R (precompute the classified volume )S 48 -914 M 0 -9 R 3.454545 B 0 -4 R (repeat: )S 96 -933 M 0 -9 R 3.454545 OB 0 -4 R (set the view and shading parameters )S 96 -952 M 0 -9 R 3.454545 OB 0 -4 R (render with )S FF 17 SF (vpRenderClassifiedVolume\(\))S RF 17 SF ( )S 48 -971 M 0 -988 M 0 -13 R (The second algorithm is useful in situations where the classification will be adjusted frequently. It also relies on a)S 0 -1007 M 0 -13 R (special data structure: a min-max octree which contains the minimum and maximum values of each voxel field. This)S 0 -1026 M 0 -13 R (data structure must be computed once when a new volume is acquired. The volume can then be rendered multiple)S 0 -1045 M 0 -13 R (times with any opacity transfer function, any view transformation and any shading parameters. )S 0 -1064 M 0 -1081 M 0 -13 R (The steps when using this algorithm to render an unclassified volume are: )S 0 -1100 M 48 -1117 M 0 -9 R 3.454545 B 0 -4 R (load the volume data )S 48 -1136 M 0 -9 R 3.454545 B 0 -4 R (precompute the min-max octree with )S FF 17 SF (vpCreateMinMaxOctree\(\))S RF 17 SF ( )S 48 -1155 M 0 -9 R 3.454545 B 0 -4 R (repeat: )S 96 -1174 M 0 -9 R 3.454545 OB 0 -4 R (choose the classification function )S 96 -1193 M 0 -9 R 3.454545 OB 0 -4 R (set the view and shading parameters )S 96 -1212 M 0 -9 R 3.454545 OB 0 -4 R (render with )S FF 17 SF (vpRenderRawVolume\(\))S RF 17 SF ( )S showpage restore %%Page: 3 3 save NP RF 17 SF 48 0 M 0 -17 M 0 -13 R (Finally, the third algorithm does not use any precomputed data structures. In most cases it is significantly slower)S 0 -36 M 0 -13 R (than the other two algorithms and is useful only if you wish to make a single rendering from a volume. The steps for)S 0 -55 M 0 -13 R (using this algorithm are identical to the previous algorithm except that there is no need to compute the min-max)S 0 -74 M 0 -13 R (octree. )S 0 -93 M 0 -110 M BF 18 SF 0 -15 R (Section 2: Using VolPack )S 0 -131 M 0 -148 M RF 17 SF 0 -13 R (This section describes how to use the routines provided by VolPack. For more specific information about a)S 0 -167 M 0 -13 R (particular routine, consult the man pages provided with the library. )S 0 -186 M 0 -203 M BF 17 SF 0 -14 R (Include Files and Libraries )S 0 -223 M 0 -240 M RF 17 SF 0 -13 R (All of the definitions needed by a program which uses VolPack are included in the header file )S FF 17 SF (volpack.h)S RF 17 SF (. The)S 0 -259 M 0 -13 R (program must be compiled with the VolPack library by including the switch )S FF 17 SF (-lvolpack)S RF 17 SF ( on the compilation)S 0 -278 M 0 -13 R (command line. Other useful free libraries you may wish to use are John Ousterhout's Tcl/Tk libraries to build a)S 0 -297 M 0 -13 R (graphical user interface, and Jef Poskanzer's pbmplus library or Sam Leffler's TIFF library to store images. )S 0 -316 M 0 -333 M 0 -13 R (The header file defines the following data types: )S 0 -352 M 48 -369 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpContext)S RF 17 SF (: a rendering context. )S 48 -388 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpResult)S RF 17 SF (: a result code. )S 48 -407 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpVector3)S RF 17 SF (: a three-element double-precision vector. )S 48 -426 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpVector4)S RF 17 SF (: a four-element double-precision vector. )S 48 -445 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpMatrix3)S RF 17 SF (: a three-by-three double-precision matrix. )S 48 -464 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpMatrix4)S RF 17 SF (: a four-by-four double-precision matrix. )S 48 -483 M 0 -500 M BF 17 SF 0 -14 R (Rendering Contexts )S 0 -520 M 0 -537 M RF 17 SF 0 -13 R (The first argument of most of the routines in the VolPack library is a )S IF 17 SF (rendering context)S RF 17 SF (, declared as a variable of)S 0 -556 M 0 -13 R (type )S FF 17 SF (vpContext)S RF 17 SF (. A rendering context contains all of the information required to render a volume, including the)S 0 -575 M 0 -13 R (classification and shading parameters, the view transformation, a description of the format of the volume, and)S 0 -594 M 0 -13 R (private data structures used by the rendering routines. The contents of a rendering context are not directly accessible)S 0 -613 M 0 -13 R (to the application programmer; instead, you use the routines provided by the library to set, modify and query the)S 0 -632 M 0 -13 R (state in a context. A program can have multiple active contexts, for instance to render different volumes or to render)S 0 -651 M 0 -13 R (the same volume with different parameters simultaneously. )S 0 -670 M 0 -687 M 0 -13 R (To create a new context, use )S FF 17 SF (vpCreateContext\(\))S RF 17 SF (: )S 0 -706 M 0 -723 M FF 14 SF 0 -10 R ( vpContext *vpCreateContext\(\);)S 0 -738 M 0 -755 M RF 17 SF 0 -13 R (The return value is a pointer to the new context. It contains default values for most of the rendering parameters, but)S 0 -774 M 0 -13 R (you can change all of them with the routines described later in this section. )S 0 -793 M 0 -810 M 0 -13 R (To destroy a context and free the memory associated with it, use )S FF 17 SF (vpDestroyContext\(\))S RF 17 SF (: )S 0 -829 M 0 -846 M FF 14 SF 0 -10 R ( void vpDestroyContext\(vpContext *vpc\);)S 0 -861 M 0 -878 M BF 17 SF 0 -14 R (Volumes )S 0 -898 M 0 -915 M RF 17 SF 0 -13 R (A volume is simply a 3D array of data. The type of data can be almost anything, but if you choose to use the)S 0 -934 M 0 -13 R (classification and shading routines provided by VolPack then you must supply the fields these routines require. You)S 0 -953 M 0 -13 R (may also wish to precompute information required by your shader or classifier and store it in the voxel. Here is an)S 0 -972 M 0 -13 R (example layout for a voxel: )S 0 -991 M 0 -1008 M FF 14 SF 0 -10 R ( typedef unsigned char Scalar;)S 0 -1023 M 0 -10 R ( typedef unsigned short Normal;)S 0 -1038 M 0 -10 R ( typedef unsigned char Gradient;)S 0 -1053 M 0 -10 R ( typedef struct {)S 0 -1068 M 0 -10 R ( Normal normal;)S 0 -1083 M 0 -10 R ( Scalar scalar;)S 0 -1098 M 0 -10 R ( Gradient gradient;)S 0 -1113 M 0 -10 R ( } Voxel;)S 0 -1128 M 0 -1145 M RF 17 SF 0 -13 R (In this example the data stored in a voxel includes an 8-bit scalar value and two precomputed fields. The first)S 0 -1164 M 0 -13 R (precomputed field is a surface normal vector encoded in a 16-bit field; this field is used by VolPack's shading)S 0 -1183 M 0 -13 R (routines. The second precomputed field is the gradient-magnitude of the scalar value; this field can be used for)S 0 -1202 M 0 -13 R (detecting surface boundaries during classification, for instance. )S showpage restore %%Page: 4 4 save NP RF 17 SF 0 0 M 0 -17 M 0 -13 R (Note that the structure fields have been specified in the voxel structure in a very particular order. Many machines)S 0 -36 M 0 -13 R (have alignment restrictions which require two-byte quantities to be aligned to two-byte boundaries, four-byte)S 0 -55 M 0 -13 R (quantities to be aligned to four-byte boundaries, and so on. The compiler may have to insert wasted space in between)S 0 -74 M 0 -13 R (fields to satisfy these requirements if you are not careful. Use the )S FF 17 SF (sizeof\(\))S RF 17 SF ( operator to make sure the size of the)S 0 -93 M 0 -13 R (voxel matches your expectations. )S 0 -112 M 0 -129 M 0 -13 R (You should also place the fields which are required for shading first, followed by any other fields used only for)S 0 -148 M 0 -13 R (classification. Ordering the fields this way makes it possible to store just the fields for shading when a classified)S 0 -167 M 0 -13 R (volume is created for the fast rendering algorithm. This saves memory and improves cache performance. )S 0 -186 M 0 -203 M 0 -13 R (Once you have decided on the format of your volume you must describe it to VolPack. To set the dimensions of the)S 0 -222 M 0 -13 R (volume use )S FF 17 SF (vpSetVolumeSize)S RF 17 SF (: )S 0 -241 M 0 -258 M FF 14 SF 0 -10 R ( vpResult)S 0 -273 M 0 -10 R ( vpSetVolumeSize\(vpContext *vpc, int xlen, int ylen, int zlen\);)S 0 -288 M 0 -305 M RF 17 SF 0 -13 R (The first argument is the context whose state you wish to modify, and the remaining arguments are the number of)S 0 -324 M 0 -13 R (elements in each dimension of the 3D volume array. The return value is a result code \(type )S FF 17 SF (vpResult)S RF 17 SF (, which is an)S 0 -343 M 0 -13 R (integer\). The value VP_OK means the arguments are valid and the routine completed successfully. Other values)S 0 -362 M 0 -13 R (indicate the type of error which occurred. See the man pages for the specific types of errors which can occur for each)S 0 -381 M 0 -13 R (routine, or see the list of error codes in the )S (Result Codes and Error Handling)S ( section. )S 0 -400 M 0 -417 M 0 -13 R (Use )S FF 17 SF (vpSetVoxelSize\(\))S RF 17 SF ( to declare the size of the voxel and the number of fields it contains: )S 0 -436 M 0 -453 M FF 14 SF 0 -10 R ( vpResult)S 0 -468 M 0 -10 R ( vpSetVoxelSize\(vpContext *vpc, int bytes_per_voxel,)S 0 -483 M 0 -10 R ( int num_voxel_fields, int num_shade_fields,)S 0 -498 M 0 -10 R ( int num_classify_fields\);)S 0 -513 M 0 -530 M FF 17 SF 0 -13 R (Bytes_per_voxel)S RF 17 SF ( is the total size of a voxel in bytes. )S FF 17 SF (Num_voxel_fields)S RF 17 SF ( is the number of fields in the)S 0 -549 M 0 -13 R (voxel. )S FF 17 SF (Num_shade_fields)S RF 17 SF ( is the number of fields required for shading. )S FF 17 SF (Num_classify_fields)S RF 17 SF ( is the)S 0 -568 M 0 -13 R (number of fields required for classification. The return value is a result code. )S 0 -587 M 0 -604 M 0 -13 R (Continuing the earlier example, use the following call: )S 0 -623 M 0 -640 M FF 14 SF 0 -10 R ( #define NUM_FIELDS 3)S 0 -655 M 0 -10 R ( #define NUM_SHADE_FIELDS 2)S 0 -670 M 0 -10 R ( #define NUM_CLASSIFY_FIELDS 2)S 0 -685 M 0 -10 R ( vpSetVoxelSize\(vpc, sizeof\(Voxel\), NUM_FIELDS, NUM_SHADE_FIELDS,)S 0 -700 M 0 -10 R ( NUM_CLASSIFY_FIELDS\);)S 0 -715 M 0 -732 M RF 17 SF 0 -13 R (Now call )S FF 17 SF (vpSetVoxelField\(\))S RF 17 SF ( and the )S FF 17 SF (vpFieldOffset\(\))S RF 17 SF ( macro once for each field to declare its size and)S 0 -751 M 0 -13 R (position in the voxel: )S 0 -770 M 0 -787 M FF 14 SF 0 -10 R ( int)S 0 -802 M 0 -10 R ( vpFieldOffset\(void *voxel_ptr, field_name\);)S 0 -817 M 0 -832 M 0 -10 R ( vpResult)S 0 -847 M 0 -10 R ( vpSetVoxelField\(vpContext *vpc, int field_num, int field_size,)S 0 -862 M 0 -10 R ( int field_offset, int field_max\);)S 0 -877 M 0 -894 M FF 17 SF 0 -13 R (Voxel_ptr)S RF 17 SF ( is a pointer to a dummy variable of the same type as your voxel, and )S FF 17 SF (field_name)S RF 17 SF ( is the name of the)S 0 -913 M 0 -13 R (voxel field. The return value of the macro is the byte offset of the field from the beginning of the voxel. )S 0 -932 M FF 17 SF 0 -13 R (Field_num)S RF 17 SF ( is the ordinal index of the voxel field you are declaring, starting with 0 for the first field. )S 0 -951 M FF 17 SF 0 -13 R (Field_size)S RF 17 SF ( is the size of the field in bytes. Use the )S FF 17 SF (sizeof\(\))S RF 17 SF ( operator \(e.g. )S 0 -970 M FF 17 SF 0 -13 R (sizeof\(voxel_ptr->field_name\))S RF 17 SF (\). )S FF 17 SF (Field_offset)S RF 17 SF ( is the byte offset returned by )S 0 -989 M FF 17 SF 0 -13 R (vpFieldOffset\(\))S RF 17 SF (. )S FF 17 SF (Field_max)S RF 17 SF ( is the maximum value of the quantity stored in the field. The return value is a)S 0 -1008 M 0 -13 R (result code. )S 0 -1027 M 0 -1044 M 0 -13 R (Strictly speaking, the )S FF 17 SF (vpSetVoxelField\(\))S RF 17 SF ( procedure must be called only for voxel fields which will be used by)S 0 -1063 M 0 -13 R (the VolPack classifier and shader. However, if you declare the other fields too then VolPack can automatically)S 0 -1082 M 0 -13 R (convert volumes that were created on machines with a different byte ordering. Only fields with size 1, 2 or 4 bytes)S 0 -1101 M 0 -13 R (can be declared with )S FF 17 SF (vpSetVoxelField\(\))S RF 17 SF (. )S 0 -1120 M 0 -1137 M 0 -13 R (For the example voxel layout, make the following calls: )S 0 -1156 M 0 -1173 M FF 14 SF 0 -10 R ( #define NORM_FIELD 0)S 0 -1188 M 0 -10 R ( #define NORM_MAX VP_NORM_MAX)S 0 -1203 M 0 -10 R ( #define SCALAR_FIELD 1)S showpage restore %%Page: 5 5 save NP FF 14 SF 0 0 M 0 -10 R ( #define SCALAR_MAX 255)S 0 -15 M 0 -10 R ( #define GRAD_FIELD 2)S 0 -30 M 0 -10 R ( #define GRAD_MAX VP_GRAD_MAX)S 0 -45 M 0 -10 R ( Voxel *dummy_voxel;)S 0 -60 M 0 -10 R ( vpSetVoxelField\(vpc, NORM_FIELD, sizeof\(dummy_voxel->normal\),)S 0 -75 M 0 -10 R ( vpFieldOffset\(dummy_voxel, normal\), NORM_MAX\);)S 0 -90 M 0 -10 R ( vpSetVoxelField\(vpc, SCALAR_FIELD, sizeof\(dummy_voxel->scalar\),)S 0 -105 M 0 -10 R ( vpFieldOffset\(dummy_voxel, scalar\), SCALAR_MAX\);)S 0 -120 M 0 -10 R ( vpSetVoxelField\(vpc, GRAD_FIELD, sizeof\(dummy_voxel->gradient\),)S 0 -135 M 0 -10 R ( vpFieldOffset\(dummy_voxel, gradient\), GRAD_MAX\);)S 0 -150 M 0 -167 M RF 17 SF 0 -13 R (The constants )S FF 17 SF (VP_NORM_MAX)S RF 17 SF ( and )S FF 17 SF (VP_GRAD_MAX)S RF 17 SF ( are predefined by VolPack. In this example these fields will be)S 0 -186 M 0 -13 R (computed using standard routines provided by the library. )S 0 -205 M 0 -222 M 0 -13 R (To specify the volume data itself, use )S FF 17 SF (SetRawVoxels\(\))S RF 17 SF (: )S 0 -241 M 0 -258 M FF 14 SF 0 -10 R ( vpResult)S 0 -273 M 0 -10 R ( vpSetRawVoxels\(vpContext *vpc, void *voxels, int size,)S 0 -288 M 0 -10 R ( int xstride, int ystride, int zstride\);)S 0 -303 M 0 -320 M FF 17 SF 0 -13 R (Voxels)S RF 17 SF ( is a pointer to the voxel data. )S FF 17 SF (Size)S RF 17 SF ( is the number of bytes of voxel data. The remaining arguments are the)S 0 -339 M 0 -13 R (strides in bytes for each of the three dimensions of the volume. For instance, )S FF 17 SF (xstride)S RF 17 SF ( is the byte offset from the)S 0 -358 M 0 -13 R (beginning of one voxel to the beginning of the next voxel along the x axis. Some of the VolPack routines operate)S 0 -377 M 0 -13 R (faster if the volume is stored in z-major order \(xstride < ystride < zstride\), but it is not strictly necessary. If )S 0 -396 M FF 17 SF 0 -13 R (voxels)S RF 17 SF ( is a pointer to dynamically allocated storage then the caller is responsible for freeing the memory at the)S 0 -415 M 0 -13 R (appropriate time. VolPack does not free the voxel array when a context is destroyed. The data in the voxel array may)S 0 -434 M 0 -13 R (be initialized or modified at any time, before or after calling )S FF 17 SF (vpSetRawVoxels)S RF 17 SF (. )S 0 -453 M 0 -470 M 0 -13 R (Our running example continues as follows: )S 0 -489 M 0 -506 M FF 14 SF 0 -10 R ( Voxel *volume;)S 0 -521 M 0 -10 R ( unsigned size;)S 0 -536 M 0 -10 R ( #define VOLUME_XLEN 256)S 0 -551 M 0 -10 R ( #define VOLUME_YLEN 256)S 0 -566 M 0 -10 R ( #define VOLUME_ZLEN 256)S 0 -581 M 0 -10 R ( size = VOLUME_XLEN * VOLUME_YLEN * VOLUME_ZLEN * sizeof\(Voxel\);)S 0 -596 M 0 -10 R ( volume = malloc\(size\);)S 0 -611 M 0 -10 R ( vpSetRawVoxels\(vpc, volume, size, sizeof\(Voxel\),)S 0 -626 M 0 -10 R ( VOLUME_XLEN * sizeof\(Voxel\),)S 0 -641 M 0 -10 R ( VOLUME_YLEN * VOLUME_XLEN * sizeof\(Voxel\)\);)S 0 -656 M 0 -673 M RF 17 SF 0 -13 R (VolPack provides a number of routines to help initialize some of the fields of the volume. If your input data consists)S 0 -692 M 0 -13 R (of a three-dimensional array of 8-bit values and you wish to compute gradient-magnitude data or encoded normal)S 0 -711 M 0 -13 R (vectors, then you can use )S FF 17 SF (vpVolumeNormals\(\))S RF 17 SF (: )S 0 -730 M 0 -747 M FF 14 SF 0 -10 R ( vpResult)S 0 -762 M 0 -10 R ( vpVolumeNormals\(vpContext *vpc, unsigned char *scalars,)S 0 -777 M 0 -10 R ( int size, int scalar_field,)S 0 -792 M 0 -10 R ( int gradient_field, int normal_field\);)S 0 -807 M 0 -824 M FF 17 SF 0 -13 R (Scalars)S RF 17 SF ( is a pointer to the array of 8-bit values. )S FF 17 SF (Size)S RF 17 SF ( is the size of the array in bytes. It must equal the number)S 0 -843 M 0 -13 R (of voxels in the volume as previously specified with )S FF 17 SF (vpSetVolumeSize\(\))S RF 17 SF (. )S FF 17 SF (Scalar_field)S RF 17 SF (, )S 0 -862 M FF 17 SF 0 -13 R (gradient_field)S RF 17 SF ( and )S FF 17 SF (normal_field)S RF 17 SF ( are the voxel field numbers in which to store the scalar values from the)S 0 -881 M 0 -13 R (array, the gradient-magnitudes of the scalar values, and the encoded surface normals respectively. Any of these field)S 0 -900 M 0 -13 R (numbers may be equal to the constant )S FF 17 SF (VP_SKIP_FIELD)S RF 17 SF ( if that item should not be stored in the volume. This)S 0 -919 M 0 -13 R (function computes the specified fields and loads them into the volume array last specified with )S 0 -938 M FF 17 SF 0 -13 R (vpSetRawVolume\(\))S RF 17 SF (. )S 0 -957 M 0 -974 M 0 -13 R (In our example, we can initialize the volume array as follows: )S 0 -993 M 0 -1010 M FF 14 SF 0 -10 R ( unsigned char *scalars;)S 0 -1025 M 0 -10 R ( scalars = LoadScalarData\(\);)S 0 -1040 M 0 -10 R ( vpVolumeNormals\(vpc, scalars, VOLUME_XLEN*VOLUME_YLEN*VOLUME_ZLEN,)S 0 -1055 M 0 -10 R ( SCALAR_FIELD, GRAD_FIELD, NORM_FIELD\);)S 0 -1070 M 0 -1087 M FF 17 SF 0 -13 R (LoadScalarData\(\))S RF 17 SF ( might be a routine to load volume data from a file. )S 0 -1106 M 0 -1123 M 0 -13 R (If your volume is large it may be inefficient to load all of the scalar data into one array and then copy it to the)S 0 -1142 M 0 -13 R (volume array. If this is the case then you can use )S FF 17 SF (vpScanlineNormals\(\))S RF 17 SF ( to compute one scanline of the volume)S 0 -1161 M 0 -13 R (at a time: )S 0 -1180 M 0 -1197 M FF 14 SF 0 -10 R ( vpResult)S 0 -1212 M 0 -10 R ( vpScanlineNormals\(vpContext *vpc, int size,)S showpage restore %%Page: 6 6 save NP FF 14 SF 0 0 M 0 -10 R ( unsigned char *scalars,)S 0 -15 M 0 -10 R ( unsigned char *scalars_minus_y,)S 0 -30 M 0 -10 R ( unsigned char *scalars_plus_y,)S 0 -45 M 0 -10 R ( unsigned char *scalars_minus_z,)S 0 -60 M 0 -10 R ( unsigned char *scalars_plus_z,)S 0 -75 M 0 -10 R ( void *voxel_scan, int scalar_field,)S 0 -90 M 0 -10 R ( int gradient_field, int normal_field\);)S 0 -105 M 0 -122 M FF 17 SF 0 -13 R (Size)S RF 17 SF ( is the length in bytes of one scanline of scalar data \(which should equal the x dimension of the volume\). )S 0 -141 M FF 17 SF 0 -13 R (Scalars)S RF 17 SF ( points to the beginning of one scanline of scalars. )S FF 17 SF (Scalars_minus_y)S RF 17 SF ( and )S FF 17 SF (scalars_plus_y)S RF 17 SF ( point)S 0 -160 M 0 -13 R (to the beginning of the previous and next scanlines in the y dimension, respectively. Similarly, )S 0 -179 M FF 17 SF 0 -13 R (scalars_minus_z)S RF 17 SF ( and )S FF 17 SF (scalars_plus_z)S RF 17 SF ( point to the beginning of the previous and next scanlines in the z)S 0 -198 M 0 -13 R (dimension. These last four scanlines are the immediately-adjacent neighbors of the first scanline and are used to)S 0 -217 M 0 -13 R (compute the gradient and surface normal vector. The next argument, )S FF 17 SF (voxel_scan)S RF 17 SF (, points to the scanline of the)S 0 -236 M 0 -13 R (voxel array to write the result data into. The last three arguments are the voxel fields to write each type of data into)S 0 -255 M 0 -13 R (and are identical to the corresponding arguments to )S FF 17 SF (vpVolumeNormals\(\))S RF 17 SF (. You can use )S 0 -274 M FF 17 SF 0 -13 R (vpScanlineNormals\(\))S RF 17 SF ( in a loop which reads in the scalar data slice-by-slice, keeping at most three slices of)S 0 -293 M 0 -13 R (data in memory at a time \(in addition to the entire volume\). )S 0 -312 M 0 -329 M 0 -13 R (If you wish to compute normal vectors yourself but you still want to use the shading routines provided by VolPack,)S 0 -348 M 0 -13 R (you can use )S FF 17 SF (vpNormalIndex\(\))S RF 17 SF ( to encode a vector into the form expected by the shaders: )S 0 -367 M 0 -384 M FF 14 SF 0 -10 R ( int vpNormalIndex\(double nx, double ny, double nz\);)S 0 -399 M 0 -416 M RF 17 SF 0 -13 R (The arguments are the components of the normal vector, which must be normalized \(nx*nx + ny*ny + nz*nz == 1\),)S 0 -435 M 0 -13 R (and the return value is the 16-bit encoded normal. A routine is also provided to decode normals: )S 0 -454 M 0 -471 M FF 14 SF 0 -10 R ( vpResult)S 0 -486 M 0 -10 R ( vpNormal\(int n, double *nx, double *ny, double *nz\);)S 0 -501 M 0 -518 M RF 17 SF 0 -13 R (The encoded normal given by )S FF 17 SF (n)S RF 17 SF ( is decoded, and the normal vector components are stored in the locations specified)S 0 -537 M 0 -13 R (by the remaining arguments. )S 0 -556 M 0 -573 M BF 17 SF 0 -14 R (Classification )S 0 -593 M 0 -610 M RF 17 SF 0 -13 R (The classification routines provided by VolPack allow you to customize the opacity transfer function by specifying a)S 0 -629 M 0 -13 R (collection of lookup tables. Each lookup table is associated with one voxel field. To classify a voxel, VolPack uses)S 0 -648 M 0 -13 R (the value in each of the specified fields of the voxel to index the corresponding tables. The table values are then)S 0 -667 M 0 -13 R (multiplied together to get the opacity of the voxel. The tables should contain numbers in the range 0.0-1.0 so that the)S 0 -686 M 0 -13 R (final opacity is also in that range. )S 0 -705 M 0 -722 M 0 -13 R (A lookup table is specified with )S FF 17 SF (vpSetClassifierTable\(\))S RF 17 SF (: )S 0 -741 M 0 -758 M FF 14 SF 0 -10 R ( vpResult)S 0 -773 M 0 -10 R ( vpSetClassifierTable\(vpContext *vpc, int param_num, int param_field,)S 0 -788 M 0 -10 R ( float *table, int table_size\);)S 0 -803 M 0 -820 M FF 17 SF 0 -13 R (Param_num)S RF 17 SF ( is the parameter number associated with the table you are declaring. The total number of tables must)S 0 -839 M 0 -13 R (equal the )S FF 17 SF (num_classify_fields)S RF 17 SF ( argument to )S FF 17 SF (vpSetVoxelSize\(\))S RF 17 SF (. The first table is numbered 0. )S 0 -858 M FF 17 SF 0 -13 R (Param_field)S RF 17 SF ( is the number of the voxel field which should be used to index the table. )S FF 17 SF (Table)S RF 17 SF ( is a pointer to the)S 0 -877 M 0 -13 R (lookup table itself, and )S FF 17 SF (table_size)S RF 17 SF ( is the size of the table in bytes \(not the number of entries!\) Note that even if )S 0 -896 M FF 17 SF 0 -13 R (table)S RF 17 SF ( is dynamically allocated it is never deallocated by VolPack, even if the rendering context is destroyed. The)S 0 -915 M 0 -13 R (data in the table may be initialized or modified at any time, before or after calling )S FF 17 SF (vpSetClassifierTable)S RF 17 SF (. )S 0 -934 M 0 -951 M 0 -13 R (We could declare a two-parameter classifier for our example using the following calls: )S 0 -970 M 0 -987 M FF 14 SF 0 -10 R ( float scalar_table[SCALAR_MAX+1];)S 0 -1002 M 0 -10 R ( float gradient_table[GRAD_MAX+1];)S 0 -1017 M 0 -10 R ( vpSetClassifierTable\(vpc, 0, SCALAR_FIELD, scalar_table,)S 0 -1032 M 0 -10 R ( sizeof\(scalar_table\)\);)S 0 -1047 M 0 -10 R ( vpSetClassifierTable\(vpc, 0, GRAD_FIELD, gradient_table,)S 0 -1062 M 0 -10 R ( sizeof\(gradient_table\)\);)S 0 -1077 M 0 -1094 M RF 17 SF 0 -13 R (VolPack provides a useful utility routine for initializing classification tables with piecewise linear ramps: )S 0 -1113 M 0 -1130 M FF 14 SF 0 -10 R ( vpResult)S 0 -1145 M 0 -10 R ( vpRamp\(float array[], int stride, int num_points,)S 0 -1160 M 0 -10 R ( int ramp_x[], float ramp_y[]\);)S 0 -1175 M 0 -1192 M FF 17 SF 0 -13 R (Array)S RF 17 SF ( is the table to be initialized. )S FF 17 SF (Stride)S RF 17 SF ( is the number of bytes from the start of one array element to the start)S 0 -1211 M 0 -13 R (of the next \(useful if there are other fields in the array which you want to skip over\). )S FF 17 SF (Num_points)S RF 17 SF ( is the number)S showpage restore %%Page: 7 7 save NP RF 17 SF 0 0 M 0 -13 R (of endpoints of the piecewise linear segments. )S FF 17 SF (Ramp_x)S RF 17 SF ( is an array of x coordinates \(table indices\), and )S FF 17 SF (ramp_y)S RF 17 SF ( is)S 0 -19 M 0 -13 R (an array of y coordinates \(values to store in the array\). )S FF 17 SF (vpRamp)S RF 17 SF ( linearly-interpolates values for the table entries in)S 0 -38 M 0 -13 R (between the specified x coordinates. )S 0 -57 M 0 -74 M 0 -13 R (For example, we can initialize our two classification tables as follows: )S 0 -93 M 0 -110 M FF 14 SF 0 -10 R ( #define SCALAR_RAMP_POINTS 3)S 0 -125 M 0 -10 R ( int scalar_ramp_x[] = { 0, 24, 255};)S 0 -140 M 0 -10 R ( float scalar_ramp_y[] = {0.0, 1.0, 1.0};)S 0 -155 M 0 -10 R ( vpRamp\(scalar_table, sizeof\(float\), SCALAR_RAMP_POINTS,)S 0 -170 M 0 -10 R ( scalar_ramp_x, scalar_ramp_y\);)S 0 -185 M 0 -200 M 0 -10 R ( #define GRAD_RAMP_POINTS 4)S 0 -215 M 0 -10 R ( int grad_ramp_x[] = { 0, 5, 20, 221};)S 0 -230 M 0 -10 R ( float grad_ramp_y[] = {0.0, 0.0, 1.0, 1.0};)S 0 -245 M 0 -10 R ( vpRamp\(gradient_table, sizeof\(float\), GRAD_RAMP_POINTS,)S 0 -260 M 0 -10 R ( grad_ramp_x, grad_ramp_y\);)S 0 -275 M 0 -292 M RF 17 SF 0 -13 R (If you wish to use an alternative classification algorithm instead of the lookup-table classifier then you should store)S 0 -311 M 0 -13 R (the voxel opacities you compute in one of the fields of the voxel and define a lookup table which converts the values)S 0 -330 M 0 -13 R (in that field into floating-point numbers. For instance, define a 1-byte opacity field which contains values in the)S 0 -349 M 0 -13 R (range 0-255, and declare a lookup table with a linear ramp mapping those numbers to the range 0.0-1.0. )S 0 -368 M 0 -385 M 0 -13 R (In addition to setting the classification function, you should also set the minimum opacity threshold with )S FF 17 SF (vpSeti)S RF 17 SF (.)S 0 -404 M 0 -13 R (This threshold is used to discard voxels which are so transparent that they do not contribute significantly to the)S 0 -423 M 0 -13 R (image. The higher the threshold, the faster the rendering algorithms. For example, to discard voxels which are at)S 0 -442 M 0 -13 R (most 5% opaque, use the following: )S 0 -461 M 0 -478 M FF 14 SF 0 -10 R ( vpSeti\(vpc, VP_MIN_VOXEL_OPACITY, 0.05\);)S 0 -493 M 0 -510 M BF 17 SF 0 -14 R (Classified Volumes )S 0 -530 M 0 -547 M RF 17 SF 0 -13 R (The fastest rendering algorithm provided by VolPack uses a run-length encoded volume data structure which must)S 0 -566 M 0 -13 R (be computed before rendering. Three routines are provided to compute this data structure. Remember to set the)S 0 -585 M 0 -13 R (opacity transfer function and the minimum voxel opacity before calling the functions in this subsection. )S 0 -604 M 0 -621 M 0 -13 R (If you have already constructed an unclassified volume and defined the classification function as described in the)S 0 -640 M 0 -13 R (previous subsections then use )S FF 17 SF (vpClassifyVolume\(\))S RF 17 SF (: )S 0 -659 M 0 -676 M FF 14 SF 0 -10 R ( vpResult)S 0 -691 M 0 -10 R ( vpClassifyVolume\(vpContext *vpc\);)S 0 -706 M 0 -723 M RF 17 SF 0 -13 R (This routine reads data from the currently-defined volume array, classifies it using the current classifier, and then)S 0 -742 M 0 -13 R (stores it in run-length encoded form in the rendering context. The volume array is not modified or deallocated. )S 0 -761 M 0 -778 M 0 -13 R (If you wish to load an array of 8-bit scalars and compute a classified volume directly without building an)S 0 -797 M 0 -13 R (unclassified volume, then use )S FF 17 SF (vpClassifyScalars\(\))S RF 17 SF (: )S 0 -816 M 0 -833 M FF 14 SF 0 -10 R ( vpResult)S 0 -848 M 0 -10 R ( vpClassifyScalars\(vpContext *vpc, unsigned char *scalars,)S 0 -863 M 0 -10 R ( int size, int scalar_field,)S 0 -878 M 0 -10 R ( int gradient_field, int normal_field\);)S 0 -893 M 0 -910 M RF 17 SF 0 -13 R (The arguments to this routine are identical to those for )S FF 17 SF (vpVolumeNormals\(\))S RF 17 SF ( described above. The difference)S 0 -929 M 0 -13 R (between the two routines is that )S FF 17 SF (vpClassifyScalars\(\))S RF 17 SF ( stores the result as a classified, run-length encoded)S 0 -948 M 0 -13 R (volume instead of as an unclassified volume. The volume size, voxel size, voxel fields, and classifier must all be)S 0 -967 M 0 -13 R (declared before calling this routine, but there is no need to call )S FF 17 SF (vpSetRawVoxels\(\))S RF 17 SF (. )S 0 -986 M 0 -1003 M 0 -13 R (If you wish to classify one scanline of voxel data at a time instead of loading the entire array of scalar data at once)S 0 -1022 M 0 -13 R (then use )S FF 17 SF (vpClassifyScanline\(\))S RF 17 SF (: )S 0 -1041 M 0 -1058 M FF 14 SF 0 -10 R ( vpResult)S 0 -1073 M 0 -10 R ( vpClassifyScanline\(vpContext *vpc, void *voxel_scan\);)S 0 -1088 M 0 -1105 M FF 17 SF 0 -13 R (Voxel_scan)S RF 17 SF ( is a pointer to one scanline of voxel data, in the same format as the full unclassified volume. You)S 0 -1124 M 0 -13 R (could, for instance, use )S FF 17 SF (vpScanlineNormals\(\))S RF 17 SF ( to compute the fields of the scanline before passing it to )S 0 -1143 M FF 17 SF 0 -13 R (vpClassifyScanline\(\))S RF 17 SF (. Each call to this routine appends one new scanline to the current classified volume.)S 0 -1162 M 0 -13 R (Out-of-order calls are not possible, and the volume cannot be rendered until all of the scanlines have been loaded. )S 0 -1181 M 0 -1198 M 0 -13 R (Only one classified volume may be stored in a rendering context at a time. If you start classifying a new volume, any)S showpage restore %%Page: 8 8 save NP RF 17 SF 0 0 M 0 -13 R (old classified volume data is deallocated. You can also force the current classified volume to be deallocated with )S 0 -19 M FF 17 SF 0 -13 R (vpDestroyClassifiedVolume\(\))S RF 17 SF (: )S 0 -38 M 0 -55 M FF 14 SF 0 -10 R ( vpResult)S 0 -70 M 0 -10 R ( vpDestroyClassifiedVolume\(vpContext *vpc\);)S 0 -85 M 0 -102 M RF 17 SF 0 -13 R (Note that if you change the contents of the unclassified volume array and you wish the classified volume to reflect)S 0 -121 M 0 -13 R (those changes then you must call one of the routines in this section to recompute the classified volume. )S 0 -140 M 0 -157 M BF 17 SF 0 -14 R (Min-Max Octrees )S 0 -177 M 0 -194 M RF 17 SF 0 -13 R (A min-max octree is a hierarchical data structure which contains minimum and maximum values for each field used)S 0 -213 M 0 -13 R (to index the classification tables. This data structure can be used to accelerate rendering unclassified volumes, and it)S 0 -232 M 0 -13 R (can also accelerate the computation of a classified volume from an unclassified volume. )S 0 -251 M 0 -268 M 0 -13 R (To compute a min-max octree, first define an unclassified volume with )S FF 17 SF (vpSetVolumeSize\(\))S RF 17 SF (, )S 0 -287 M FF 17 SF 0 -13 R (vpSetVoxelSize\(\))S RF 17 SF (, )S FF 17 SF (vpSetVoxelField\(\))S RF 17 SF (, and )S FF 17 SF (vpSetRawVoxels\(\))S RF 17 SF (. Also be sure to initialize the)S 0 -306 M 0 -13 R (volume data. Now for each classification table make one call to )S FF 17 SF (vpMinMaxOctreeThreshold\(\))S RF 17 SF (: )S 0 -325 M 0 -342 M FF 14 SF 0 -10 R ( vpResult)S 0 -357 M 0 -10 R ( vpMinMaxOctreeThreshold\(vpContext *vpc, int param_num, int range\);)S 0 -372 M 0 -389 M FF 17 SF 0 -13 R (Param_num)S RF 17 SF ( is the same parameter number you passed to )S FF 17 SF (vpSetClassifierTable\(\))S RF 17 SF (. )S FF 17 SF (Range)S RF 17 SF ( is a range of)S 0 -408 M 0 -13 R (table indices for this parameter which you consider to be "small". The opacity of a voxel should not vary much if the)S 0 -427 M 0 -13 R (table index is changed by the amount specified in )S FF 17 SF (range)S RF 17 SF (. Choosing a value which is too small or too large may)S 0 -446 M 0 -13 R (result in a reduced performance benefit during rendering. You may wish to experiment, but the octree should)S 0 -465 M 0 -13 R (improve performance even if you don't use the optimum range value. You can use the routine )S FF 17 SF (vpOctreeMask\(\))S 0 -484 M RF 17 SF 0 -13 R (to visualize the effectiveness of the octree \(see the man pages\). )S 0 -503 M 0 -520 M 0 -13 R (To compute the octree, call )S FF 17 SF (vpCreateMinMaxOctree\(\))S RF 17 SF (: )S 0 -539 M 0 -556 M FF 14 SF 0 -10 R ( vpResult)S 0 -571 M 0 -10 R ( vpCreateMinMaxOctree\(vpContext *vpc, int root_node_size,)S 0 -586 M 0 -10 R ( int base_node_size\);)S 0 -601 M 0 -618 M FF 17 SF 0 -13 R (Root_node_size)S RF 17 SF ( is currently not used but is reserved for future use. )S FF 17 SF (Base_node_size)S RF 17 SF ( specifies the size in)S 0 -637 M 0 -13 R (voxels of one side of the smallest node in the octree. The smaller the value, the better the resolution of the data)S 0 -656 M 0 -13 R (structure at the expense of an increase in size. A value of 4 is a good starting point. This routine reads the data in the)S 0 -675 M 0 -13 R (unclassified volume array, computes an octree, and stores it in the rendering context. )S 0 -694 M 0 -711 M 0 -13 R (Once the octree has been computed it will be used automatically whenever you call )S FF 17 SF (vpClassifyVolume\(\))S RF 17 SF ( or )S 0 -730 M FF 17 SF 0 -13 R (vpRenderRawVolume\(\))S RF 17 SF (. If you change the data in the volume array you MUST call )S 0 -749 M FF 17 SF 0 -13 R (vpCreateMinMaxOctree)S RF 17 SF ( to recompute the octree, or else your renderings will be incorrect. You can also)S 0 -768 M 0 -13 R (destroy the octree by calling )S FF 17 SF (vpDestroyMinMaxOctree\(\))S RF 17 SF (: )S 0 -787 M 0 -804 M FF 14 SF 0 -10 R ( vpResult)S 0 -819 M 0 -10 R ( vpDestroyMinMaxOctree\(vpContext *vpc\);)S 0 -834 M 0 -851 M BF 17 SF 0 -14 R (View Transformations )S 0 -871 M 0 -888 M RF 17 SF 0 -13 R (VolPack maintains four transformation matrices: a modeling transform, a viewing transform, a projection)S 0 -907 M 0 -13 R (transform, and a viewport transform. The primary use of these matrices is to specify a transformation from the)S 0 -926 M 0 -13 R (volume data's coordinate system to the image coordinate system. However, they also affect light direction vectors)S 0 -945 M 0 -13 R (\(and in future releases of the library they will affect the positioning of clipping planes and polygon primitives\). )S 0 -964 M 0 -981 M 0 -13 R (There are five coordinate systems implied by the transformation matrices: object coordinates, world coordinates, eye)S 0 -1000 M 0 -13 R (coordinates, clip coordinates, and image coordinates. In the object coordinate system the volume is entirely contained)S 0 -1019 M 0 -13 R (in a unit cube centered at the origin. The modeling transform is an affine transform which converts object)S 0 -1038 M 0 -13 R (coordinates into world coordinates. The modeling transform is also applied to light direction vectors to transform)S 0 -1057 M 0 -13 R (them to world coordinates. The view transform is an affine transform that converts world coordinates into eye)S 0 -1076 M 0 -13 R (coordinates. In eye coordinates the viewer is looking down the -Z axis. The view transform is typically used to)S 0 -1095 M 0 -13 R (specify the position of the viewer in the world coordinate system. The projection transform converts eye coordinates)S 0 -1114 M 0 -13 R (into clip coordinates. This transform may specify a perspective or a parallel projection, although perspective)S 0 -1133 M 0 -13 R (rendering is not yet supported. Finally, the viewport transform converts the clip coordinate system into image)S 0 -1152 M 0 -13 R (coordinates. )S 0 -1171 M 0 -1188 M 0 -13 R (VolPack provides a number of routines to change the modeling matrix, viewing matrix and the projection matrix.)S 0 -1207 M 0 -13 R (First, use )S FF 17 SF (vpCurrentMatrix\(\))S RF 17 SF ( to select the matrix you wish to modify: )S showpage restore %%Page: 9 9 save NP RF 17 SF 0 0 M 0 -17 M FF 14 SF 0 -10 R ( vpResult)S 0 -32 M 0 -10 R ( vpCurrentMatrix\(vpContext *vpc, int option\);)S 0 -47 M 0 -64 M FF 17 SF 0 -13 R (Option)S RF 17 SF ( is one of the constants )S FF 17 SF (VP_MODEL)S RF 17 SF (, )S FF 17 SF (VP_VIEW)S RF 17 SF ( or )S FF 17 SF (VP_PROJECT)S RF 17 SF (. Now use the following functions to)S 0 -83 M 0 -13 R (modify the matrix contents \(see the man pages for specifics\): )S 0 -102 M 0 -119 M FF 17 SF 0 -13 R (vpIdentityMatrix\(vpContext *vpc\))S RF 17 SF ( )S 48 -138 M 0 -13 R (Load the identity matrix into the current transformation matrix. )S 0 -157 M FF 17 SF 0 -13 R (vpTranslate\(vpContext *vpc, double tx, double ty, double tz\))S RF 17 SF ( )S 48 -176 M 0 -13 R (Multiply the current transformation matrix by a translation matrix. )S 0 -195 M FF 17 SF 0 -13 R (vpRotate\(vpContext *vpc, int axis, double degrees\))S RF 17 SF ( )S 48 -214 M 0 -13 R (Multiply the current transformation matrix by a rotation matrix. )S FF 17 SF (Axis)S RF 17 SF ( is one of the constants )S FF 17 SF (VP_X_AXIS)S RF 17 SF (, )S 48 -233 M FF 17 SF 0 -13 R (VP_Y_AXIS)S RF 17 SF ( or )S FF 17 SF (VP_Z_AXIS)S RF 17 SF (. )S 0 -252 M FF 17 SF 0 -13 R (vpScale\(vpContext *vpc, double sx, double sy, double sz\))S RF 17 SF ( )S 48 -271 M 0 -13 R (Multiply the current transformation matrix by a scaling matrix. )S 0 -290 M FF 17 SF 0 -13 R (vpMultMatrix\(vpContext *vpc, vpMatrix4 m\))S RF 17 SF ( )S 48 -309 M 0 -13 R (Multiply the current transformation matrix by the given matrix. )S 0 -328 M FF 17 SF 0 -13 R (vpSetMatrix\(vpContext *vpc, vpMatrix4 m\))S RF 17 SF ( )S 48 -347 M 0 -13 R (Load the given matrix into the current transformation matrix. )S 48 -366 M 0 -383 M 0 -13 R (By default, all of the routines use post-multiplication. For instance, if the current modeling matrix is M and a)S 0 -402 M 0 -13 R (rotation matrix R is applied, then the new transformation is M*R. If a light direction vector v is now specified)S 0 -421 M 0 -13 R (\(using commands discussed in the section on shading\), it is transformed into M*R*v before it is stored in the current)S 0 -440 M 0 -13 R (rendering context. If you prefer pre-multiplication of matrices then call )S FF 17 SF (vpSeti)S RF 17 SF ( with the )S FF 17 SF (CONCAT_MODE)S 0 -459 M RF 17 SF 0 -13 R (argument. Note that vectors are always post-multiplied. )S 0 -478 M 0 -495 M 0 -13 R (Two special routines are provided for creating projection matrices. These routines always store their result in the)S 0 -514 M 0 -13 R (projection matrix, not the current matrix. The first is )S FF 17 SF (vpWindow\(\))S RF 17 SF (: )S 0 -533 M 0 -550 M FF 14 SF 0 -10 R ( vpResult)S 0 -565 M 0 -10 R ( vpWindow\(vpContext *vpc, int type, double left, double right,)S 0 -580 M 0 -10 R ( double bottom, double top, double near, double far\);)S 0 -595 M 0 -612 M FF 17 SF 0 -13 R (Type)S RF 17 SF ( must be the constant )S FF 17 SF (VP_PARALLEL)S RF 17 SF ( to specify a parallel projection. In a future release perspective)S 0 -631 M 0 -13 R (projections will be allowed. The remaining arguments specify the left, right, bottom, top, near, and far coordinates)S 0 -650 M 0 -13 R (of the planes bounding the view volume in eye coordinates. This routine works just like the )S FF 17 SF (glFrustum\(\))S RF 17 SF ( and )S 0 -669 M FF 17 SF 0 -13 R (glOrtho\(\))S RF 17 SF ( routines in OpenGL. )S 0 -688 M 0 -705 M 0 -13 R (The second routine for creating a projection matrix uses the PHIGS viewing model: )S 0 -724 M 0 -741 M FF 14 SF 0 -10 R ( vpResult)S 0 -756 M 0 -10 R ( vpWindowPHIGS\(vpContext *vpc, vpVector3 vrp, vpVector3 vpn,)S 0 -771 M 0 -10 R ( vpVector3 vup, vpVector3 prp, double viewport_umin,)S 0 -786 M 0 -10 R ( double viewport_umax, double viewport_vmin,)S 0 -801 M 0 -10 R ( double viewport_vmax, double viewport_front,)S 0 -816 M 0 -10 R ( double viewport_back, int type\);)S 0 -831 M 0 -848 M FF 17 SF 0 -13 R (Vrp)S RF 17 SF ( is the view reference point, )S FF 17 SF (vpn)S RF 17 SF ( is the view plane normal, )S FF 17 SF (vup)S RF 17 SF ( is the view up vector, )S FF 17 SF (prp)S RF 17 SF ( is the projection)S 0 -867 M 0 -13 R (reference point, the next six arguments are the bounds of the viewing volume in view reference coordinates, and )S 0 -886 M FF 17 SF 0 -13 R (type)S RF 17 SF ( is the constant )S FF 17 SF (VP_PARALLEL)S RF 17 SF ( to specify a parallel projection. Since these parameters specify a viewpoint as)S 0 -905 M 0 -13 R (well as a viewing volume, typically the view matrix contains the identity. See )S IF 17 SF (Computer Graphics: Principles and)S 0 -924 M 0 -13 R (Practice)S RF 17 SF ( \(Chapter 6, 2nd ed.\), by Foley, van Dam, Feiner and Hughes for a complete discussion of the PHIGS)S 0 -943 M 0 -13 R (viewing model. )S 0 -962 M 0 -979 M 0 -13 R (The viewport transform is set automatically when you set the size of the image, which is discussed in the next)S 0 -998 M 0 -13 R (subsection. )S 0 -1017 M 0 -1034 M 0 -13 R (Here is an example showing all the steps to set the view transformation: )S 0 -1053 M 0 -1070 M FF 14 SF 0 -10 R ( vpCurrentMatrix\(vpc, VP_MODEL\);)S 0 -1085 M 0 -10 R ( vpIdentityMatrix\(vpc\);)S 0 -1100 M 0 -10 R ( vpRotate\(vpc, VP_X_AXIS, 90.0\);)S 0 -1115 M 0 -10 R ( vpRotate\(vpc, VP_Y_AXIS, 23.0\);)S 0 -1130 M 0 -10 R ( vpCurrentMatrix\(vpc, VP_VIEW\);)S 0 -1145 M 0 -10 R ( vpIdentityMatrix\(vpc\);)S 0 -1160 M 0 -10 R ( vpTranslate\(vpc, 0.1, 0.0, 0.0\);)S 0 -1175 M 0 -10 R ( vpCurrentMatrix\(vpc, VP_PROJECT\);)S 0 -1190 M 0 -10 R ( vpWindow\(vpc, VP_PARALLEL, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5\);)S 0 -1205 M showpage restore %%Page: 10 10 save NP FF 14 SF 0 0 M RF 17 SF 0 -13 R (Note that light direction vectors are transformed according to the modeling matrix in effect at the time of the call to )S 0 -19 M FF 17 SF 0 -13 R (vpSetLight)S RF 17 SF (, and volumes are transformed according to the modeling matrix in effect at the time of rendering.)S 0 -38 M 0 -13 R (The same viewing, projection and viewport transforms are applied to everything at the time of rendering. )S 0 -57 M 0 -74 M BF 17 SF 0 -14 R (Shading and Lighting )S 0 -94 M 0 -111 M RF 17 SF 0 -13 R (VolPack supports two shading methods: shading via lookup tables, and shading via callback functions. In addition,)S 0 -130 M 0 -13 R (routines are provided to initialize shading tables for the Phong illumination model. )S 0 -149 M 0 -166 M 0 -13 R (The built-in routines are designed to support the multiple-material voxel model described in )S IF 17 SF (Volume Rendering)S RF 17 SF ( by)S 0 -185 M 0 -13 R (Drebin, Carpenter and Hanrahan in Proceedings of SIGGRAPH 88. Each voxel is assumed to contain a mixture of)S 0 -204 M 0 -13 R (basic material types. Each material type has its own shading parameters, such as color and shinyness. The color of a)S 0 -223 M 0 -13 R (voxel is found by computing a color for each material type and then combining the colors in proportion to the)S 0 -242 M 0 -13 R (fraction of each material in the voxel. )S 0 -261 M 0 -278 M 0 -13 R (This functionality is implemented by storing two table indices in each voxel and using two lookup tables. One voxel)S 0 -297 M 0 -13 R (field must contain an encoded surface normal vector as computed by )S FF 17 SF (vpNormalIndex\(\))S RF 17 SF (. This field is used to)S 0 -316 M 0 -13 R (index a table which contains a color for each of the material types. The actual colors retrieved from the table depend)S 0 -335 M 0 -13 R (on the surface normal, so directional lights can be implemented by storing appropriate values in the table. The)S 0 -354 M 0 -13 R (second voxel field contains a value which is used to index the second table. Each row of the second table contains a)S 0 -373 M 0 -13 R (fractional occupancy for each material type. These fractional occupancies are used as weights to determine the)S 0 -392 M 0 -13 R (relative strength of each color retrieved from the first table. )S 0 -411 M 0 -428 M 0 -13 R (To declare a lookup-table shader, use )S FF 17 SF (vpSetLookupShader\(\))S RF 17 SF (: )S 0 -447 M 0 -464 M FF 14 SF 0 -10 R ( vpResult)S 0 -479 M 0 -10 R ( vpSetLookupShader\(vpContext *vpc, int color_channels,)S 0 -494 M 0 -10 R ( int num_materials, int color_field,)S 0 -509 M 0 -10 R ( float *color_table, int color_table_size,)S 0 -524 M 0 -10 R ( int weight_field,)S 0 -539 M 0 -10 R ( float *weight_table, int weight_table_size\);)S 0 -554 M 0 -571 M FF 17 SF 0 -13 R (Color_channels)S RF 17 SF ( is 1 for grayscale renderings or 3 for color \(RGB\) renderings. )S FF 17 SF (Num_materials)S RF 17 SF ( is the)S 0 -590 M 0 -13 R (number of material types. )S FF 17 SF (Color_field)S RF 17 SF ( is the voxel field number for the color lookup table index. )S 0 -609 M FF 17 SF 0 -13 R (Color_table)S RF 17 SF ( is the corresponding lookup table, and )S FF 17 SF (color_table_size)S RF 17 SF ( is the size of the table in bytes. )S 0 -628 M FF 17 SF 0 -13 R (Weight_field)S RF 17 SF (, )S FF 17 SF (weight_table)S RF 17 SF ( and )S FF 17 SF (weight_table_size)S RF 17 SF ( are the field number, lookup table and table)S 0 -647 M 0 -13 R (size for the second table which contains weights for each material type. The color table must be an array with the)S 0 -666 M 0 -13 R (following dimensions: )S 0 -685 M 0 -702 M FF 14 SF 0 -10 R ( float color_table[n][num_materials][color_channels];)S 0 -717 M 0 -734 M RF 17 SF 0 -13 R (where )S FF 17 SF (n)S RF 17 SF ( is the number of possible values for the color field. The colors are values in the range 0.0-1.0 \(zero)S 0 -753 M 0 -13 R (intensity to full intensity\). The weight table must be an array with the following dimensions: )S 0 -772 M 0 -789 M FF 14 SF 0 -10 R ( float weight_table[m][num_materials];)S 0 -804 M 0 -821 M RF 17 SF 0 -13 R (where )S FF 17 SF (m)S RF 17 SF ( is the number of possible values for the weight field. Weights are in the range 0.0-1.0. If there is only one)S 0 -840 M 0 -13 R (material type then the weight table is not used and the corresponding parameters may be set to 0. )S 0 -859 M 0 -876 M 0 -13 R (Returning to our example, the following code declares an RGB shader with two material types: )S 0 -895 M 0 -912 M FF 14 SF 0 -10 R ( #define COLOR_CHANNELS 3)S 0 -927 M 0 -10 R ( #define MATERIALS 2)S 0 -942 M 0 -10 R ( float color_table[NORM_MAX+1][MATERIALS][COLOR_CHANNELS];)S 0 -957 M 0 -10 R ( float weight_table[SCALAR_MAX+1][MATERIALS];)S 0 -972 M 0 -10 R ( vpSetLookupShader\(vpc, COLOR_CHANNELS, MATERIALS,)S 0 -987 M 0 -10 R ( NORM_FIELD, color_table, sizeof\(color_table\),)S 0 -1002 M 0 -10 R ( SCALAR_FIELD, weight_table, sizeof\(weight_table\)\);)S 0 -1017 M 0 -1034 M RF 17 SF 0 -13 R (The weight table can be initialized using the )S FF 17 SF (vpRamp\(\))S RF 17 SF ( function previously described, or using a loop which fills)S 0 -1053 M 0 -13 R (in values in whatever way you choose. To initialize the color table, VolPack provides a routine called )S 0 -1072 M FF 17 SF 0 -13 R (vpShadeTable\(\))S RF 17 SF (. Before calling the routine you must set the lighting and shading parameters as follows. )S 0 -1091 M 0 -1108 M 0 -13 R (To set the lighting parameters, use )S FF 17 SF (vpSetLight\(\))S RF 17 SF (: )S 0 -1127 M 0 -1144 M FF 14 SF 0 -10 R ( vpResult)S 0 -1159 M 0 -10 R ( vpSetLight\(vpContext *vpc, int light_num, int property,)S 0 -1174 M 0 -10 R ( double n0, double n1, double n2\);)S 0 -1189 M 0 -1206 M FF 17 SF 0 -13 R (Light_num)S RF 17 SF ( is one of the constants )S FF 17 SF (VP_LIGHT0)S RF 17 SF (, )S FF 17 SF (VP_LIGHT1)S RF 17 SF (, ..., )S FF 17 SF (VP_LIGHT5)S RF 17 SF ( and indicates which of the six)S showpage restore %%Page: 11 11 save NP RF 17 SF 0 0 M 0 -13 R (light sources you wish to adjust. )S FF 17 SF (Property)S RF 17 SF ( is either )S FF 17 SF (VP_COLOR)S RF 17 SF ( or )S FF 17 SF (VP_DIRECTION)S RF 17 SF (. For )S FF 17 SF (VP_COLOR)S RF 17 SF ( the)S 0 -19 M 0 -13 R (remaining three arguments are the RGB components of the light color, in the range 0.0-1.0. For )S FF 17 SF (VP_DIRECTION)S 0 -38 M RF 17 SF 0 -13 R (the remaining three arguments are the x, y and z components of the direction of the light source. This vector is)S 0 -57 M 0 -13 R (transformed by the current modeling matrix before it is stored in the rendering context \(see )S (View Transformations)S (\).)S 0 -76 M 0 -13 R (You must also call )S FF 17 SF (vpEnable\(\))S RF 17 SF ( to enable the light. By default, light 0 is enabled and all others are disabled. )S 0 -95 M 0 -112 M 0 -13 R (For example, to create a cyan light coming from above the viewer's right shoulder, use the following: )S 0 -131 M 0 -148 M FF 14 SF 0 -10 R ( vpSetLight\(vpc, VP_LIGHT1, VP_COLOR, 0.0, 1.0, 1.0\);)S 0 -163 M 0 -10 R ( vpSetLight\(vpc, VP_LIGHT1, VP_DIRECTION, -0.6, 0.6, 1.0\);)S 0 -178 M 0 -10 R ( vpEnable\(vpc, VP_LIGHT1, 1\);)S 0 -193 M 0 -210 M RF 17 SF 0 -13 R (You can also select "two-sided" lights using )S FF 17 SF (vpEnable\(\))S RF 17 SF ( with the )S FF 17 SF (VP_LIGHT_BOTH_SIDES)S RF 17 SF ( option. Under)S 0 -229 M 0 -13 R (this lighting model each directional light shines in two directions, both in the specified direction and in the opposite)S 0 -248 M 0 -13 R (direction. )S 0 -267 M 0 -284 M 0 -13 R (To set the material parameters for a particular material type, call )S FF 17 SF (vpSetMaterial\(\))S RF 17 SF (: )S 0 -303 M 0 -320 M FF 14 SF 0 -10 R ( vpResult)S 0 -335 M 0 -10 R ( vpSetMaterial\(vpContext *vpc, int material_num, int property,)S 0 -350 M 0 -10 R ( int surface_side, double r, double g, double b\);)S 0 -365 M 0 -382 M FF 17 SF 0 -13 R (Material_num)S RF 17 SF ( is one of the constants )S FF 17 SF (VP_MATERIAL0)S RF 17 SF (, )S FF 17 SF (VP_MATERIAL1)S RF 17 SF (, ..., )S FF 17 SF (VP_MATERIAL5)S RF 17 SF ( and indicates)S 0 -401 M 0 -13 R (which material you wish to adjust. )S FF 17 SF (Property)S RF 17 SF ( is one of the following: )S 0 -420 M 0 -437 M FF 17 SF 0 -13 R (VP_AMBIENT)S RF 17 SF ( )S 48 -456 M 0 -13 R (Set the R, G and B ambient light reflection coefficients. )S 0 -475 M FF 17 SF 0 -13 R (VP_DIFFUSE)S RF 17 SF ( )S 48 -494 M 0 -13 R (Set the R, G and B diffuse light reflection coefficients. )S 0 -513 M FF 17 SF 0 -13 R (VP_SPECULAR)S RF 17 SF ( )S 48 -532 M 0 -13 R (Set the R, G and B specular light reflection coefficients. )S 0 -551 M FF 17 SF 0 -13 R (VP_SHINYNESS)S RF 17 SF ( )S 48 -570 M 0 -13 R (Set the specular exponent. The )S FF 17 SF (g)S RF 17 SF ( and )S FF 17 SF (b)S RF 17 SF ( arguments are not used. )S 48 -589 M 0 -606 M FF 17 SF 0 -13 R (Surface_side)S RF 17 SF ( is either )S FF 17 SF (VP_EXTERIOR)S RF 17 SF (, )S FF 17 SF (VP_INTERIOR)S RF 17 SF (, or )S FF 17 SF (VP_BOTH_SIDES)S RF 17 SF (. In the first case the)S 0 -625 M 0 -13 R (parameters will only affect voxels on the "exterior" side of a surface, which by default means that the voxel's)S 0 -644 M 0 -13 R (gradient points towards the viewer \(you can use )S FF 17 SF (vpEnable\(\))S RF 17 SF ( with the )S FF 17 SF (VP_REVERSE_SURFACE_SIDES)S RF 17 SF ( option)S 0 -663 M 0 -13 R (to reverse the meaning of exterior and interior\). In the second case the parameters will only affect voxels whose)S 0 -682 M 0 -13 R (gradient points away from the viewer. In the third case, all voxels are affected. )S 0 -701 M 0 -718 M 0 -13 R (Here is an example which sets surface 0 to reflect red and green ambient and diffuse light, and to have fairly strong)S 0 -737 M 0 -13 R (specular highlights which retain the color of the light source: )S 0 -756 M 0 -773 M FF 14 SF 0 -10 R ( vpSetMaterial\(vpc, VP_MATERIAL0, VP_AMBIENT,)S 0 -788 M 0 -10 R ( VP_BOTHSIDES, 0.1, 0.1, 0.0\);)S 0 -803 M 0 -10 R ( vpSetMaterial\(vpc, VP_MATERIAL0, VP_DIFFUSE,)S 0 -818 M 0 -10 R ( VP_BOTHSIDES, 0.4, 0.4, 0.0\);)S 0 -833 M 0 -10 R ( vpSetMaterial\(vpc, VP_MATERIAL0, VP_SPECULAR,)S 0 -848 M 0 -10 R ( VP_BOTHSIDES, 0.5, 0.5, 0.5\);)S 0 -863 M 0 -10 R ( vpSetMaterial\(vpc, VP_MATERIAL0, VP_SHINYNESS,)S 0 -878 M 0 -10 R ( VP_BOTHSIDES, 10.0, 0.0, 0.0\);)S 0 -893 M 0 -910 M RF 17 SF 0 -13 R (Now that all of the lighting and shading parameters have been set, the color lookup table has been declared with )S 0 -929 M FF 17 SF 0 -13 R (vpSetLookupShader\(\))S RF 17 SF (, and the viewing parameters have been set, you can call )S FF 17 SF (vpShadeTable\(\))S RF 17 SF ( to)S 0 -948 M 0 -13 R (recompute the entries of the lookup table: )S 0 -967 M 0 -984 M FF 14 SF 0 -10 R ( vpResult)S 0 -999 M 0 -10 R ( vpShadeTable\(vpContext *vpc\);)S 0 -1014 M 0 -1031 M RF 17 SF 0 -13 R (This routine computes all of the entries in the currently-defined color table using the current lighting and material)S 0 -1050 M 0 -13 R (parameters and the current view transformation. You should call )S FF 17 SF (vpShadeTable\(\))S RF 17 SF ( after any changes to the)S 0 -1069 M 0 -13 R (shading or viewing parameters, but before calling any of the rendering routines. )S 0 -1088 M 0 -1105 M 0 -13 R (If you wish to use some other shading model you have two options. One approach is to create your own routine to)S 0 -1124 M 0 -13 R (initialize the shading lookup tables. If you take this approach then you may define tables of any size \(there is no need)S 0 -1143 M 0 -13 R (to use VolPack's encoded normal vectors\). For example, you could use a color transfer function which assigns a)S 0 -1162 M 0 -13 R (unique color to each possible value of the scalar field in your volume. The second option is to define a callback)S 0 -1181 M 0 -13 R (routine which will be called to shade each voxel during rendering. You do so by calling )S FF 17 SF (vpSetCallback\(\))S 0 -1200 M RF 17 SF 0 -13 R (instead of )S FF 17 SF (vpSetLookupShader\(\))S RF 17 SF (. For example, to declare a grayscale shading callback function use the)S showpage restore %%Page: 12 12 save NP RF 17 SF 0 0 M 0 -13 R (following call: )S 0 -19 M 0 -36 M FF 14 SF 0 -10 R ( void myshader\(\);)S 0 -51 M 0 -10 R ( vpSetCallback\(vpc, VP_GRAY_SHADE_FUNC, myshader\);)S 0 -66 M 0 -83 M RF 17 SF 0 -13 R (The function )S FF 17 SF (myshader\(\))S RF 17 SF ( can do whatever you like to compute a color. See the man page for )S 0 -102 M FF 17 SF 0 -13 R (vpSetCallback\(\))S RF 17 SF ( for more details. Using callback functions can lead to significant performance degradation)S 0 -121 M 0 -13 R (during rendering. )S 0 -140 M 0 -157 M 0 -13 R (There is one more shading option which is independent of the shading model you choose: depth cueing. Depth cueing)S 0 -176 M 0 -13 R (allows you to introduce black "fog" which makes more distant voxels appear darker then voxels which are close to)S 0 -195 M 0 -13 R (the viewer, thereby making it easier to distinguish foreground objects from background objects. To enable depth)S 0 -214 M 0 -13 R (cueing call )S FF 17 SF (vpEnable\(\))S RF 17 SF (: )S 0 -233 M 0 -250 M FF 14 SF 0 -10 R ( vpEnable\(vpc, VP_DEPTH_CUE, 1\);)S 0 -265 M 0 -282 M RF 17 SF 0 -13 R (You can use )S FF 17 SF (vpSetDepthCueing\(\))S RF 17 SF ( to change the depth cueing parameters: )S 0 -301 M 0 -318 M FF 14 SF 0 -10 R ( vpResult)S 0 -333 M 0 -10 R ( vpSetDepthCueing\(vpContext *vpc, double front_factor,)S 0 -348 M 0 -10 R ( double density\);)S 0 -363 M 0 -380 M FF 17 SF 0 -13 R (Front_factor)S RF 17 SF ( is the transparency of the fog at the front plane of the viewing volume. It must be a positive)S 0 -399 M 0 -13 R (number and it is usually less than 1.0 \(although larger numbers can be used to brighten the foreground\). )S FF 17 SF (Density)S 0 -418 M RF 17 SF 0 -13 R (controls the "density" of the fog, or how rapidly objects recede into darkness. The equation for the transparency of)S 0 -437 M 0 -13 R (the fog is: )S 0 -456 M 20 -473 M 0 -13 R (T = front_factor * exp\(-density * depth\) )S 20 -492 M 0 -509 M 0 -13 R (where "depth" is 0 at the front plane of the viewing volume and 1 at the back plane. Each voxel color component is)S 0 -528 M 0 -13 R (multiplied by the fog transparency during rendering. )S 0 -547 M 0 -564 M 0 -13 R (VolPack also supports a fast one-pass shadow algorithm implemented with lookup tables \(in a similar fashion to the)S 0 -583 M 0 -13 R (procedure described above\). See the man page for )S FF 17 SF (vpSetShadowLookupShader)S RF 17 SF (. )S 0 -602 M 0 -619 M BF 17 SF 0 -14 R (Images )S 0 -639 M 0 -656 M RF 17 SF 0 -13 R (The last step before rendering is to declare the array that VolPack should store the image into. Use )S FF 17 SF (vpSetImage)S RF 17 SF (: )S 0 -675 M 0 -692 M FF 14 SF 0 -10 R ( vpResult)S 0 -707 M 0 -10 R ( vpSetImage\(vpContext *vpc, unsigned char *image, int width,)S 0 -722 M 0 -10 R ( int height, int bytes_per_scan, int pixel_type\);)S 0 -737 M 0 -754 M FF 17 SF 0 -13 R (Image)S RF 17 SF ( is a pointer to the array for the image. The next two arguments are the size of the image. These arguments)S 0 -773 M 0 -13 R (also implicitly determine the viewport transformation: the clip coordinates are scaled to make the left, right, top and)S 0 -792 M 0 -13 R (bottom planes of the viewing volume align with the sides of the image. The next argument is the number of bytes in)S 0 -811 M 0 -13 R (one scanline of the image. This argument can be used to add padding to the end of each scanline in case the image)S 0 -830 M 0 -13 R (display routines on your system impose alignment restrictions on the beginning of each scanline. Finally, the last)S 0 -849 M 0 -13 R (argument is a code that specifies the format of the pixels in the image. The following formats are allowed: )S 0 -868 M 0 -885 M FF 17 SF 0 -13 R (VP_ALPHA)S RF 17 SF ( )S 48 -904 M 0 -13 R (opacity \(1 byte/pixel\) )S 0 -923 M FF 17 SF 0 -13 R (VP_LUMINANCE)S RF 17 SF ( )S 48 -942 M 0 -13 R (grayscale color \(1 byte/pixel\) )S 0 -961 M FF 17 SF 0 -13 R (VP_LUMINANCEA)S RF 17 SF ( )S 48 -980 M 0 -13 R (grayscale color plus opacity \(2 bytes/pixel\) )S 0 -999 M FF 17 SF 0 -13 R (VP_RGB)S RF 17 SF ( )S 48 -1018 M 0 -13 R (RGB color \(3 bytes/pixel\) )S 0 -1037 M FF 17 SF 0 -13 R (VP_RGBA)S RF 17 SF ( )S 48 -1056 M 0 -13 R (RGB color plus opacity \(4 bytes/pixel\) )S 0 -1075 M FF 17 SF 0 -13 R (VP_BGR)S RF 17 SF ( )S 48 -1094 M 0 -13 R (RGB color, byte-swapped \(3 bytes/pixel\) )S 0 -1113 M FF 17 SF 0 -13 R (VP_ABGR)S RF 17 SF ( )S 48 -1132 M 0 -13 R (RGB color plus opacity, bytes-swapped \(4 bytes/pixel\) )S 48 -1151 M 0 -1168 M 0 -13 R (Use the luminance formats only with grayscale shaders, and the RGB formats only with color shaders. The image)S 0 -1187 M 0 -13 R (should have dimensions: )S 0 -1206 M showpage restore %%Page: 13 13 save NP RF 17 SF 0 0 M FF 14 SF 0 -10 R ( unsigned char image[bytes_per_scan][height][bytes_per_pixel];)S 0 -15 M 0 -32 M RF 17 SF 0 -13 R (where )S FF 17 SF (bytes_per_pixel)S RF 17 SF ( is the size of the pixel as determined by the pixel format. )S 0 -51 M 0 -68 M BF 17 SF 0 -14 R (Rendering )S 0 -88 M 0 -105 M RF 17 SF 0 -13 R (VolPack provides two rendering routines. The first routine is used to render pre-classified volumes which are)S 0 -124 M 0 -13 R (created with the routines in the )S (Classified Volumes)S ( subsection: )S 0 -143 M 0 -160 M FF 14 SF 0 -10 R ( vpResult)S 0 -175 M 0 -10 R ( vpRenderClassifiedVolume\(vpContext *vpc\);)S 0 -190 M 0 -207 M RF 17 SF 0 -13 R (This routine uses the current viewing and shading parameters to render the classified volume stored in the rendering)S 0 -226 M 0 -13 R (context. The result is placed in the image buffer declared with )S FF 17 SF (vpSetImage\(\))S RF 17 SF (. )S 0 -245 M 0 -262 M 0 -13 R (The second routine is used to render unclassified volumes which are created with the routines in the )S (Volumes)S 0 -281 M 0 -13 R (subsection: )S 0 -300 M 0 -317 M FF 14 SF 0 -10 R ( vpResult)S 0 -332 M 0 -10 R ( vpRenderRawVolume\(vpContext *vpc\);)S 0 -347 M 0 -364 M RF 17 SF 0 -13 R (This routine is identical to )S FF 17 SF (vpRenderClassifiedVolume\(\))S RF 17 SF ( except that the source of the volume data is the)S 0 -383 M 0 -13 R (raw volume data stored in the rendering context, and the volume data is classified on-the-fly during rendering. If a)S 0 -402 M 0 -13 R (min-max octree data structure is present in the rendering context then it is used to accelerate rendering. However,)S 0 -421 M 0 -13 R (even with the octree this routine is slower than )S FF 17 SF (vpRenderClassifiedVolume\(\))S RF 17 SF ( because of the additional)S 0 -440 M 0 -13 R (work which must be performed. )S 0 -459 M 0 -476 M 0 -13 R (There is one important state variable which can be used to improve rendering performance: the maximum ray)S 0 -495 M 0 -13 R (opacity threshold. During compositing, if the opacity of an image pixel reaches this threshold then no more voxel)S 0 -514 M 0 -13 R (data is composited into the pixel. The threshold should be a number slightly less than one \(0.95 is a good value\), so)S 0 -533 M 0 -13 R (that there is very little image degradation but voxels which do not make a significant contribution to the image can)S 0 -552 M 0 -13 R (be skipped. You set the threshold with )S FF 17 SF (vpSetd\(\))S RF 17 SF ( and the )S FF 17 SF (VP_MAX_RAY_OPACITY)S RF 17 SF ( option. For example: )S 0 -571 M 0 -588 M FF 14 SF 0 -10 R ( vpSetd\(vpc, VP_MAX_RAY_OPACITY, 0.95\);)S 0 -603 M 0 -620 M BF 17 SF 0 -14 R (State Variables )S 0 -640 M 0 -657 M RF 17 SF 0 -13 R (The previous subsections have described many routines which set state variables in a rendering context. This)S 0 -676 M 0 -13 R (subsection briefly mentions the routines available to retrieve the values of these variables. )S 0 -695 M 0 -712 M 0 -13 R (The function )S FF 17 SF (vpGeti\(\))S RF 17 SF ( is used to retrieve integer state variables: )S 0 -731 M 0 -748 M FF 14 SF 0 -10 R ( vpResult)S 0 -763 M 0 -10 R ( vpGeti\(vpContext *vpc, int option, int *iptr\);)S 0 -778 M 0 -795 M FF 17 SF 0 -13 R (Option)S RF 17 SF ( is a constant indicating the particular value you wish to get. The man page for )S FF 17 SF (vpGeti)S RF 17 SF ( lists all of the)S 0 -814 M 0 -13 R (options. The value is stored in the integer pointed to by )S FF 17 SF (iptr)S RF 17 SF (. As always, the return value of the routine is a result)S 0 -833 M 0 -13 R (code \(not the state variable value\). )S 0 -852 M 0 -869 M 0 -13 R (To retrieve floating-point state variables used )S FF 17 SF (vpGetd\(\))S RF 17 SF (: )S 0 -888 M 0 -905 M FF 14 SF 0 -10 R ( vpResult)S 0 -920 M 0 -10 R ( vpGetd\(vpContext *vpc, int option, double *dptr\);)S 0 -935 M 0 -952 M RF 17 SF 0 -13 R (This routine stores its result in the double pointed to by )S FF 17 SF (dptr)S RF 17 SF (. To retrieve pointers \(e.g. the current raw volume data)S 0 -971 M 0 -13 R (pointer\) use )S FF 17 SF (vpGetp)S RF 17 SF (: )S 0 -990 M 0 -1007 M FF 14 SF 0 -10 R ( vpResult)S 0 -1022 M 0 -10 R ( vpGetp\(vpContext *vpc, int option, void **pptr\);)S 0 -1037 M 0 -1054 M FF 17 SF 0 -13 R (Pptr)S RF 17 SF ( is a pointer to a pointer, so the value of the state variable is stored in )S FF 17 SF (*ptr)S RF 17 SF (. Transformation matrices can be)S 0 -1073 M 0 -13 R (retrieved with )S FF 17 SF (vpGetMatrix\(\))S RF 17 SF (: )S 0 -1092 M 0 -1109 M FF 14 SF 0 -10 R ( vpResult)S 0 -1124 M 0 -10 R ( vpGetMatrix\(vpContext *vpc, int option, vpMatrix4 m\);)S 0 -1139 M 0 -1156 M RF 17 SF 0 -13 R (The matrix values are stored in )S FF 17 SF (m)S RF 17 SF (. )S 0 -1175 M 0 -1192 M 0 -13 R (Lighting and material parameters can be retrieved with )S FF 17 SF (vpGetLight\(\))S RF 17 SF ( and )S FF 17 SF (vpGetMaterial\(\))S RF 17 SF ( which have)S 0 -1211 M 0 -13 R (arguments which are similar to the corresponding functions to set these parameters. )S showpage restore %%Page: 14 14 save NP RF 17 SF 0 0 M 0 -17 M BF 17 SF 0 -14 R (Utility Functions )S 0 -37 M 0 -54 M RF 17 SF 0 -13 R (VolPack provides a small collection of convenient utility functions. First, there are routines to store volume data)S 0 -73 M 0 -13 R (structures in files and load them back into a rendering context. They allow you to perform all of the)S 0 -92 M 0 -13 R (time-consuming preprocessing steps once and save the results in a file. See the man pages for the following routines:)S 0 -111 M 48 -128 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpStoreRawVolume\(\))S RF 17 SF ( )S 48 -147 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpLoadRawVolume\(\))S RF 17 SF ( )S 48 -166 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpStoreClassifiedVolume\(\))S RF 17 SF ( )S 48 -185 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpLoadClassifiedVolume\(\))S RF 17 SF ( )S 48 -204 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpStoreMinMaxOctree\(\))S RF 17 SF ( )S 48 -223 M 0 -10 R 3.454545 B FF 17 SF 0 -3 R (vpLoadMinMaxOctree\(\))S RF 17 SF ( )S 48 -242 M 0 -259 M 0 -13 R (The routine )S FF 17 SF (vpExtract\(\))S RF 17 SF ( allows you to extract a rectangular solid region from either the raw volume data or the)S 0 -278 M 0 -13 R (classified volume data. You can extract individual fields of the volume \(e.g. just the scalar data\), or computed values)S 0 -297 M 0 -13 R (\(e.g. opacity computed with the current classification function\). )S 0 -316 M 0 -333 M 0 -13 R (The routine )S FF 17 SF (vpTranspose\(\))S RF 17 SF ( allows you to transpose the raw volume data. This can be useful to improve)S 0 -352 M 0 -13 R (rendering performance for very large volumes. You can use )S FF 17 SF (vpGeti)S RF 17 SF ( with the )S FF 17 SF (VP_VIEW_AXIS)S RF 17 SF ( option to)S 0 -371 M 0 -13 R (determine how the volume should be transposed for optimum performance given the current viewing parameters. )S 0 -390 M 0 -407 M 0 -13 R (The routine )S FF 17 SF (vpResample\(\))S RF 17 SF ( allows you to scale a volume to a different resolution using a variety of resampling)S 0 -426 M 0 -13 R (filters. It is useful for scaling very large volumes down to a smaller size for fast previewing, or to filter)S 0 -445 M 0 -13 R (low-resolution data sets to a higher resolution with a high-quality filter before rendering. )S 0 -464 M 0 -481 M BF 17 SF 0 -14 R (Result Codes and Error Handling )S 0 -501 M 0 -518 M RF 17 SF 0 -13 R (Almost all of the routines in VolPack return a result of type )S FF 17 SF (vpResult)S RF 17 SF ( which is an integer. Routines return the)S 0 -537 M 0 -13 R (value )S FF 17 SF (VP_OK)S RF 17 SF ( to indicate success. Any other value indicates an error. See the man page for each function for the)S 0 -556 M 0 -13 R (possible error codes and their specific meanings. )S 0 -575 M 0 -592 M 0 -13 R (When an error occurs VolPack also records the error code in the rendering context. You can retrieve the error code)S 0 -611 M 0 -13 R (later by calling )S FF 17 SF (vpGetError\(\))S RF 17 SF (. If another error occurs before you call )S FF 17 SF (vpGetError\(\))S RF 17 SF ( then only the first one)S 0 -630 M 0 -13 R (is returned. The recorded value is then reset. )S 0 -649 M 0 -666 M 0 -13 R (The routine )S FF 17 SF (vpGetErrorString\(\))S RF 17 SF ( can be used to convert an error code into a printable string. )S 0 -685 M 0 -702 M BF 18 SF 0 -15 R (Section 3: Tips and Pointers )S 0 -723 M 0 -740 M BF 17 SF 0 -14 R (Maximizing Rendering Speed )S 0 -760 M 0 -777 M RF 17 SF 0 -13 R (There are several techniques to keep in mind to get the maximum possible performance out of VolPack. First of all,)S 0 -796 M 0 -13 R (use the appropriate rendering algorithm for the task at hand. If you want to render a volume from several viewpoints)S 0 -815 M 0 -13 R (without changing the classification function then it is well worth the time to preprocess the volume into the)S 0 -834 M 0 -13 R (run-length encoded format before rendering. Use the min-max octree data structure if the classification function)S 0 -853 M 0 -13 R (does change for every rendering but the volume data remains fixed. )S 0 -872 M 0 -889 M 0 -13 R (Second, choose the various thresholds carefully. Changing the minimum opacity threshold for classification and the)S 0 -908 M 0 -13 R (maximum ray opacity for rendering can have a big impact on rendering speed. Changing the parameter range)S 0 -927 M 0 -13 R (thresholds for the min-max octree can also improve performance. )S 0 -946 M 0 -963 M 0 -13 R (Third, minimize the need for reallocating internal data structures by predeclaring their sizes. Internal buffers are)S 0 -982 M 0 -13 R (used to store an intermediate image during rendering and a depth cueing lookup table. The sizes of these tables can)S 0 -1001 M 0 -13 R (change as the viewing parameters change, so the tables may have to be reallocated over the course of a multi-frame)S 0 -1020 M 0 -13 R (rendering loop. You can give VolPack "hints" for the sizes of these data structures using )S FF 17 SF (vpSeti\(\))S RF 17 SF ( with the )S 0 -1039 M FF 17 SF 0 -13 R (VP_INT_WIDTH_HINT)S RF 17 SF (, )S FF 17 SF (VP_INT_HEIGHT_HINT)S RF 17 SF ( and )S FF 17 SF (VP_DEPTH_CUE_SIZE_HINT)S RF 17 SF ( options. )S 0 -1058 M 0 -1075 M 0 -13 R (Finally, if you are using )S FF 17 SF (vpRenderRawVolume\(\))S RF 17 SF ( with a large volume then you may need to transpose the)S 0 -1094 M 0 -13 R (volume as the viewing direction changes from one principal axis to another. )S 0 -1113 M 0 -1130 M BF 17 SF 0 -14 R (Maximizing Image Quality )S 0 -1150 M 0 -1167 M RF 17 SF 0 -13 R (There are two important techniques which will help you to produce images free from distracting aliasing artifacts.)S 0 -1186 M 0 -13 R (The first is to choose classification functions that are fairly smooth. Functions with discontinuities or very abrupt)S 0 -1205 M 0 -13 R (transitions introduce very sharp transitions in the classified volume, and these transitions may be too sharp to be)S showpage restore %%Page: 15 15 save NP RF 17 SF 0 0 M 0 -13 R (properly sampled. The result can be jagged boundaries and spurious patterns in the rendered image. These artifacts)S 0 -19 M 0 -13 R (may be difficult to distinguish from the information in the data set. To diagnose this problem, try extracting slices)S 0 -38 M 0 -13 R (of classified volume data with )S FF 17 SF (vpExtract\(\))S RF 17 SF ( and check if the opacity images contain a lot of aliasing. Smooth)S 0 -57 M 0 -13 R (transitions will produce the best images. )S 0 -76 M 0 -93 M 0 -13 R (The second technique is to prefilter the volume data with a high-quality filter before scaling or zooming, rather than)S 0 -112 M 0 -13 R (using the viewing transformation to do the scaling. There are two reasons that prefiltering may help. The rendering)S 0 -131 M 0 -13 R (routines use a simple bilinear reconstruction filter, but if you prefilter you can use a higher-quality filter which does)S 0 -150 M 0 -13 R (a better job of reconstruction. Furthermore, the resolution of the rendered image is limited by the number of samples)S 0 -169 M 0 -13 R (in the volume, so very large magnification factors produce visible aliasing artifacts. Upscaling the volume with a)S 0 -188 M 0 -13 R (high-quality filter before rendering can solve this problem. Several utility routines, described in the )S 0 -207 M FF 17 SF 0 -13 R (vpResample\(\))S RF 17 SF ( man page, are provided for prefiltering a volume. )S 0 -226 M 0 -243 M BF 17 SF 0 -14 R (Software Support )S 0 -263 M 0 -280 M RF 17 SF 0 -13 R (If you have problems, bug reports or bug fixes, please send mail to: )S 0 -299 M 20 -316 M IF 17 SF 0 -13 R (volpack@graphics.stanford.edu )S 20 -335 M 0 -352 M RF 17 SF 0 -13 R (The author makes no commitment to fix bugs or provide support. However, future releases with fixes and)S 0 -371 M 0 -13 R (enhancements are planned. )S 0 -390 M 0 -407 M 0 -13 R (If you wish to be informed of future updates to the software then you should subscribe to the volpack-announce)S 0 -426 M 0 -13 R (mailing list. To do so, send an email message to )S 0 -445 M 20 -462 M IF 17 SF 0 -13 R (majordomo@lists.stanford.edu )S 20 -481 M 0 -498 M RF 17 SF 0 -13 R (with the following message body: )S 0 -517 M 20 -534 M 0 -13 R (subscribe volpack-announce )S 20 -553 M 0 -570 M 0 -13 R (To be removed from the list, send the message: )S 0 -589 M 20 -606 M 0 -13 R (unsubscribe volpack-announce )S 20 -625 M 0 -642 M 0 -13 R (Mail will be sent to the list only to announce bug fixes and new releases. )S 0 -661 M 0 -678 M 0 -13 R (If you like the library then drop us a note describing what you use it for! )S 0 -697 M 0 -714 M BF 17 SF 0 -14 R (Obtaining the Software )S 0 -734 M 0 -751 M RF 17 SF 0 -13 R (VolPack is available from the Stanford Computer Graphics Laboratory's Web page )S 0 -770 M 0 -13 R (\(http://www-graphics.stanford.edu/software/volpack/#Distribution\) )S (or via anonymous ftp)S 0 -789 M 0 -13 R (\(ftp://www-graphics.stanford.edu/pub/volpack/\). )S 0 -808 M 805 HR 0 -827 M 0 -13 R (Last update: 16 December 1994 )S 0 -846 M IF 17 SF 0 -13 R (volpack@graphics.stanford.edu )S showpage restore %%Trailer restore %%Pages: 15 volpack-1.0b3/doc/Makefile.in0000644000265600020320000002105710727044632013003 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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@ # Makefile.am for volpack/doc # Andreas Tille # GPL VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ 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@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBVOLPACK_VERSION_INFO = @LIBVOLPACK_VERSION_INFO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ MFLAGS = @MFLAGS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OFLAGS = @OFLAGS@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = vp_userguide.html vp_userguide.ps 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) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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 tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 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 installdirs: 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 dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am 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: .MAKE: install-am install-strip .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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am 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 # 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: volpack-1.0b3/doc/vp_userguide.html0000644000265600020320000017304505674442573014345 00000000000000 VolPack User's Guide

VolPack User's Guide

Version 2.0beta1

Table of Contents

Section 1: Overview

Introduction to VolPack

VolPack is a portable software library for volume rendering. It is based on a new family of fast volume rendering algorithms (see Philippe Lacroute and Marc Levoy , Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transformation, Proc. SIGGRAPH '94 (Orlando, Florida, July 24-29, 1994). In Computer Graphics Proceedings, Annual Conference Series, 1994, ACM SIGGRAPH, pp. 451-458). The library has the following features:
  • Renders data sampled on a regular, three-dimensional grid.
  • Supports user-specified transfer functions for both opacity and color.
  • Provides a shading model with directional light sources, multiple material types with different reflective properties, depth cueing, and shadows.
  • Produces color (24 bits/pixel) or grayscale (8 bits/pixel) renderings, with or without an alpha channel.
  • Supports arbitrary affine view transformations.
  • Supports a flexible data format that allows an arbitrary C structure to be associated with each grid point.
  • Achieves very fast rendering times without specialized hardware.
The library is intended for use in C or C++ programs but may be useful with other programming languages. The current implementation does not support perspective projections or clipping planes. These features will be added in a future release.

The remainder of this section contains a brief introduction to the conceptual volume rendering pipeline used by VolPack, followed by a high-level description of the data structures and algorithms used by the library. This background material lays the foundation for Section 2 which describes each of the routines provided by VolPack. The routines are grouped by function and are presented roughly in the order that they would be called in a typical application. More detailed descriptions of each command can be found by consulting the man pages for VolPack. Finally, Section 3 covers some tips for maximizing rendering performance and image quality, and describes how to obtain the VolPack software.

The Volume Rendering Pipeline

The input to the volume renderer is a three-dimensional array of data. Each element of the array is a C structure containing any number of fields of data, such as tissue density or temperature. Each element is called a "voxel." The first stage in the volume rendering pipeline is to classify the volume data, which means to assign an opacity to each voxel. Opacity is the inverse of transparency: an opacity of 0.0 indicates a fully-transparent voxel, while an opacity of 1.0 indicates a voxel which completely occludes anything behind it. Intermediate values between 0.0 and 1.0 indicate semi-transparent voxels. The purpose of classification is to assign low opacities to regions of the data set which are uninteresting or distracting and high opacities to regions of the data set which should be visible in the rendering. Intermediate opacity values are used for smooth transitions from transparent to opaque regions, and for effects such as semi-transparent voxels which should not completely occlude objects behind them.

VolPack provides a classification method based on lookup tables. To use this method you specify a transfer function which maps the scalar data in a particular array element into the opacity for that element. Alternatively you can implement other classification techniques such as context-sensitive segmentation and then provide VolPack with a pre-classified volume.

The second rendering stage is to assign a color to each voxel, an operation which is called shading (or more precisely, lighting). VolPack includes support for the standard Phong shading equation. To use this shading technique, the volume data is preprocessed before rendering in order to compute a gradient vector for each voxel. The gradient vector can then be used as a pseudo surface normal to compute how light reflects off of each voxel. The user specifies the position and color of one or more light sources, and the reflective properties of the volume data. See Computer Graphics: Principles and Practice (Chapter 16, 2nd ed.), by Foley, van Dam, Feiner and Hughes, for a detailed discussion of the Phong shading equation. Alternative shading models can be implemented through a callback function.

The third rendering stage is to specify a view transformation and to transform the volume accordingly. This step can be as simple as choosing the position from which to look at the volume, or it can include an arbitrary affine transformation of the volume including non-uniform scaling and shearing. The view transformation also specifies how the volume is projected onto a 2D image plane.

The fourth and final rendering stage is to composite the voxels into an image. Digital compositing is analogous to the compositing process used in the film industry: several layers of semi-transparent film are merged together into a final image. VolPack provides several rendering algorithms that use different techniques to accelerate the compositing stage. The next subsection briefly describes the available algorithms.

Data Structures and Rendering Algorithms

VolPack includes three rendering algorithms which are useful in different situations. The algorithms differ in the degree to which they trade flexibility for speed and in the type of preprocessing required before rendering.

The fastest algorithm allows the user to rapidly render a volume with any view transformation and with any shading parameters while keeping the classification fixed. This algorithm relies on a special data structure which contains run-length encoded, classified volume data. Depending on the volume size it can take several minutes to precompute the run-length encoded volume, so this algorithm is most suitable when many renderings will be made from the same volume without changing the classification.

The steps when using this algorithm to render a classified volume are:

  • load the volume data
  • choose the classification function
  • precompute the classified volume
  • repeat:
    • set the view and shading parameters
    • render with vpRenderClassifiedVolume()

The second algorithm is useful in situations where the classification will be adjusted frequently. It also relies on a special data structure: a min-max octree which contains the minimum and maximum values of each voxel field. This data structure must be computed once when a new volume is acquired. The volume can then be rendered multiple times with any opacity transfer function, any view transformation and any shading parameters.

The steps when using this algorithm to render an unclassified volume are:

  • load the volume data
  • precompute the min-max octree with vpCreateMinMaxOctree()
  • repeat:
    • choose the classification function
    • set the view and shading parameters
    • render with vpRenderRawVolume()

Finally, the third algorithm does not use any precomputed data structures. In most cases it is significantly slower than the other two algorithms and is useful only if you wish to make a single rendering from a volume. The steps for using this algorithm are identical to the previous algorithm except that there is no need to compute the min-max octree.

Section 2: Using VolPack

This section describes how to use the routines provided by VolPack. For more specific information about a particular routine, consult the man pages provided with the library.

Include Files and Libraries

All of the definitions needed by a program which uses VolPack are included in the header file volpack.h. The program must be compiled with the VolPack library by including the switch -lvolpack on the compilation command line. Other useful free libraries you may wish to use are John Ousterhout's Tcl/Tk libraries to build a graphical user interface, and Jef Poskanzer's pbmplus library or Sam Leffler's TIFF library to store images.

The header file defines the following data types:

  • vpContext: a rendering context.
  • vpResult: a result code.
  • vpVector3: a three-element double-precision vector.
  • vpVector4: a four-element double-precision vector.
  • vpMatrix3: a three-by-three double-precision matrix.
  • vpMatrix4: a four-by-four double-precision matrix.

Rendering Contexts

The first argument of most of the routines in the VolPack library is a rendering context, declared as a variable of type vpContext. A rendering context contains all of the information required to render a volume, including the classification and shading parameters, the view transformation, a description of the format of the volume, and private data structures used by the rendering routines. The contents of a rendering context are not directly accessible to the application programmer; instead, you use the routines provided by the library to set, modify and query the state in a context. A program can have multiple active contexts, for instance to render different volumes or to render the same volume with different parameters simultaneously.

To create a new context, use vpCreateContext():

    vpContext *vpCreateContext();
The return value is a pointer to the new context. It contains default values for most of the rendering parameters, but you can change all of them with the routines described later in this section.

To destroy a context and free the memory associated with it, use vpDestroyContext():

    void vpDestroyContext(vpContext *vpc);

Volumes

A volume is simply a 3D array of data. The type of data can be almost anything, but if you choose to use the classification and shading routines provided by VolPack then you must supply the fields these routines require. You may also wish to precompute information required by your shader or classifier and store it in the voxel. Here is an example layout for a voxel:
    typedef unsigned char Scalar;
    typedef unsigned short Normal;
    typedef unsigned char Gradient;
    typedef struct {
        Normal normal;
        Scalar scalar;
        Gradient gradient;
    } Voxel;
In this example the data stored in a voxel includes an 8-bit scalar value and two precomputed fields. The first precomputed field is a surface normal vector encoded in a 16-bit field; this field is used by VolPack's shading routines. The second precomputed field is the gradient-magnitude of the scalar value; this field can be used for detecting surface boundaries during classification, for instance.

Note that the structure fields have been specified in the voxel structure in a very particular order. Many machines have alignment restrictions which require two-byte quantities to be aligned to two-byte boundaries, four-byte quantities to be aligned to four-byte boundaries, and so on. The compiler may have to insert wasted space in between fields to satisfy these requirements if you are not careful. Use the sizeof() operator to make sure the size of the voxel matches your expectations.

You should also place the fields which are required for shading first, followed by any other fields used only for classification. Ordering the fields this way makes it possible to store just the fields for shading when a classified volume is created for the fast rendering algorithm. This saves memory and improves cache performance.

Once you have decided on the format of your volume you must describe it to VolPack. To set the dimensions of the volume use vpSetVolumeSize:

    vpResult
    vpSetVolumeSize(vpContext *vpc, int xlen, int ylen, int zlen);
The first argument is the context whose state you wish to modify, and the remaining arguments are the number of elements in each dimension of the 3D volume array. The return value is a result code (type vpResult, which is an integer). The value VP_OK means the arguments are valid and the routine completed successfully. Other values indicate the type of error which occurred. See the man pages for the specific types of errors which can occur for each routine, or see the list of error codes in the Result Codes and Error Handling section.

Use vpSetVoxelSize() to declare the size of the voxel and the number of fields it contains:

    vpResult
    vpSetVoxelSize(vpContext *vpc, int bytes_per_voxel,
                   int num_voxel_fields, int num_shade_fields,
                   int num_classify_fields);
Bytes_per_voxel is the total size of a voxel in bytes. Num_voxel_fields is the number of fields in the voxel. Num_shade_fields is the number of fields required for shading. Num_classify_fields is the number of fields required for classification. The return value is a result code.

Continuing the earlier example, use the following call:

    #define NUM_FIELDS          3
    #define NUM_SHADE_FIELDS    2
    #define NUM_CLASSIFY_FIELDS 2
    vpSetVoxelSize(vpc, sizeof(Voxel), NUM_FIELDS, NUM_SHADE_FIELDS,
                   NUM_CLASSIFY_FIELDS);

Now call vpSetVoxelField() and the vpFieldOffset() macro once for each field to declare its size and position in the voxel:

    int
    vpFieldOffset(void *voxel_ptr, field_name);

    vpResult
    vpSetVoxelField(vpContext *vpc, int field_num, int field_size,
                    int field_offset, int field_max);
Voxel_ptr is a pointer to a dummy variable of the same type as your voxel, and field_name is the name of the voxel field. The return value of the macro is the byte offset of the field from the beginning of the voxel. Field_num is the ordinal index of the voxel field you are declaring, starting with 0 for the first field. Field_size is the size of the field in bytes. Use the sizeof() operator (e.g. sizeof(voxel_ptr->field_name)). Field_offset is the byte offset returned by vpFieldOffset(). Field_max is the maximum value of the quantity stored in the field. The return value is a result code.

Strictly speaking, the vpSetVoxelField() procedure must be called only for voxel fields which will be used by the VolPack classifier and shader. However, if you declare the other fields too then VolPack can automatically convert volumes that were created on machines with a different byte ordering. Only fields with size 1, 2 or 4 bytes can be declared with vpSetVoxelField().

For the example voxel layout, make the following calls:

    #define NORM_FIELD  0
    #define NORM_MAX    VP_NORM_MAX
    #define SCALAR_FIELD  1
    #define SCALAR_MAX    255
    #define GRAD_FIELD    2
    #define GRAD_MAX      VP_GRAD_MAX
    Voxel *dummy_voxel;
    vpSetVoxelField(vpc, NORM_FIELD, sizeof(dummy_voxel->normal),
                    vpFieldOffset(dummy_voxel, normal), NORM_MAX);
    vpSetVoxelField(vpc, SCALAR_FIELD, sizeof(dummy_voxel->scalar),
                    vpFieldOffset(dummy_voxel, scalar), SCALAR_MAX);
    vpSetVoxelField(vpc, GRAD_FIELD, sizeof(dummy_voxel->gradient),
                    vpFieldOffset(dummy_voxel, gradient), GRAD_MAX);
The constants VP_NORM_MAX and VP_GRAD_MAX are predefined by VolPack. In this example these fields will be computed using standard routines provided by the library.

To specify the volume data itself, use SetRawVoxels():

    vpResult
    vpSetRawVoxels(vpContext *vpc, void *voxels, int size,
                   int xstride, int ystride, int zstride);
Voxels is a pointer to the voxel data. Size is the number of bytes of voxel data. The remaining arguments are the strides in bytes for each of the three dimensions of the volume. For instance, xstride is the byte offset from the beginning of one voxel to the beginning of the next voxel along the x axis. Some of the VolPack routines operate faster if the volume is stored in z-major order (xstride < ystride < zstride), but it is not strictly necessary. If voxels is a pointer to dynamically allocated storage then the caller is responsible for freeing the memory at the appropriate time. VolPack does not free the voxel array when a context is destroyed. The data in the voxel array may be initialized or modified at any time, before or after calling vpSetRawVoxels.

Our running example continues as follows:

    Voxel *volume;
    unsigned size;
    #define VOLUME_XLEN    256
    #define VOLUME_YLEN    256
    #define VOLUME_ZLEN    256
    size = VOLUME_XLEN * VOLUME_YLEN * VOLUME_ZLEN * sizeof(Voxel);
    volume = malloc(size);
    vpSetRawVoxels(vpc, volume, size, sizeof(Voxel),
                   VOLUME_XLEN * sizeof(Voxel),
                   VOLUME_YLEN * VOLUME_XLEN * sizeof(Voxel));

VolPack provides a number of routines to help initialize some of the fields of the volume. If your input data consists of a three-dimensional array of 8-bit values and you wish to compute gradient-magnitude data or encoded normal vectors, then you can use vpVolumeNormals():

    vpResult
    vpVolumeNormals(vpContext *vpc, unsigned char *scalars,
                    int size, int scalar_field,
                    int gradient_field, int normal_field);
Scalars is a pointer to the array of 8-bit values. Size is the size of the array in bytes. It must equal the number of voxels in the volume as previously specified with vpSetVolumeSize(). Scalar_field, gradient_field and normal_field are the voxel field numbers in which to store the scalar values from the array, the gradient-magnitudes of the scalar values, and the encoded surface normals respectively. Any of these field numbers may be equal to the constant VP_SKIP_FIELD if that item should not be stored in the volume. This function computes the specified fields and loads them into the volume array last specified with vpSetRawVolume().

In our example, we can initialize the volume array as follows:

    unsigned char *scalars;
    scalars = LoadScalarData();
    vpVolumeNormals(vpc, scalars, VOLUME_XLEN*VOLUME_YLEN*VOLUME_ZLEN,
                    SCALAR_FIELD, GRAD_FIELD, NORM_FIELD);
LoadScalarData() might be a routine to load volume data from a file.

If your volume is large it may be inefficient to load all of the scalar data into one array and then copy it to the volume array. If this is the case then you can use vpScanlineNormals() to compute one scanline of the volume at a time:

    vpResult
    vpScanlineNormals(vpContext *vpc, int size,
                      unsigned char *scalars,
                      unsigned char *scalars_minus_y,
                      unsigned char *scalars_plus_y,
                      unsigned char *scalars_minus_z,
                      unsigned char *scalars_plus_z,
                      void *voxel_scan, int scalar_field,
                      int gradient_field, int normal_field);
Size is the length in bytes of one scanline of scalar data (which should equal the x dimension of the volume). Scalars points to the beginning of one scanline of scalars. Scalars_minus_y and scalars_plus_y point to the beginning of the previous and next scanlines in the y dimension, respectively. Similarly, scalars_minus_z and scalars_plus_z point to the beginning of the previous and next scanlines in the z dimension. These last four scanlines are the immediately-adjacent neighbors of the first scanline and are used to compute the gradient and surface normal vector. The next argument, voxel_scan, points to the scanline of the voxel array to write the result data into. The last three arguments are the voxel fields to write each type of data into and are identical to the corresponding arguments to vpVolumeNormals(). You can use vpScanlineNormals() in a loop which reads in the scalar data slice-by-slice, keeping at most three slices of data in memory at a time (in addition to the entire volume).

If you wish to compute normal vectors yourself but you still want to use the shading routines provided by VolPack, you can use vpNormalIndex() to encode a vector into the form expected by the shaders:

    int vpNormalIndex(double nx, double ny, double nz);
The arguments are the components of the normal vector, which must be normalized (nx*nx + ny*ny + nz*nz == 1), and the return value is the 16-bit encoded normal. A routine is also provided to decode normals:
    vpResult
    vpNormal(int n, double *nx, double *ny, double *nz);
The encoded normal given by n is decoded, and the normal vector components are stored in the locations specified by the remaining arguments.

Classification

The classification routines provided by VolPack allow you to customize the opacity transfer function by specifying a collection of lookup tables. Each lookup table is associated with one voxel field. To classify a voxel, VolPack uses the value in each of the specified fields of the voxel to index the corresponding tables. The table values are then multiplied together to get the opacity of the voxel. The tables should contain numbers in the range 0.0-1.0 so that the final opacity is also in that range.

A lookup table is specified with vpSetClassifierTable():

    vpResult
    vpSetClassifierTable(vpContext *vpc, int param_num, int param_field,
                         float *table, int table_size);
Param_num is the parameter number associated with the table you are declaring. The total number of tables must equal the num_classify_fields argument to vpSetVoxelSize(). The first table is numbered 0. Param_field is the number of the voxel field which should be used to index the table. Table is a pointer to the lookup table itself, and table_size is the size of the table in bytes (not the number of entries!) Note that even if table is dynamically allocated it is never deallocated by VolPack, even if the rendering context is destroyed. The data in the table may be initialized or modified at any time, before or after calling vpSetClassifierTable.

We could declare a two-parameter classifier for our example using the following calls:

    float scalar_table[SCALAR_MAX+1];
    float gradient_table[GRAD_MAX+1];
    vpSetClassifierTable(vpc, 0, SCALAR_FIELD, scalar_table,
                         sizeof(scalar_table));
    vpSetClassifierTable(vpc, 0, GRAD_FIELD, gradient_table,
                         sizeof(gradient_table));

VolPack provides a useful utility routine for initializing classification tables with piecewise linear ramps:

    vpResult
    vpRamp(float array[], int stride, int num_points,
           int ramp_x[], float ramp_y[]);
Array is the table to be initialized. Stride is the number of bytes from the start of one array element to the start of the next (useful if there are other fields in the array which you want to skip over). Num_points is the number of endpoints of the piecewise linear segments. Ramp_x is an array of x coordinates (table indices), and ramp_y is an array of y coordinates (values to store in the array). vpRamp linearly-interpolates values for the table entries in between the specified x coordinates.

For example, we can initialize our two classification tables as follows:

    #define SCALAR_RAMP_POINTS 3
    int scalar_ramp_x[] =    {  0,  24, 255};
    float scalar_ramp_y[] =  {0.0, 1.0, 1.0};
    vpRamp(scalar_table, sizeof(float), SCALAR_RAMP_POINTS,
           scalar_ramp_x, scalar_ramp_y);

    #define GRAD_RAMP_POINTS 4
    int grad_ramp_x[] =   {  0,   5,  20, 221};
    float grad_ramp_y[] = {0.0, 0.0, 1.0, 1.0};
    vpRamp(gradient_table, sizeof(float), GRAD_RAMP_POINTS,
           grad_ramp_x, grad_ramp_y);

If you wish to use an alternative classification algorithm instead of the lookup-table classifier then you should store the voxel opacities you compute in one of the fields of the voxel and define a lookup table which converts the values in that field into floating-point numbers. For instance, define a 1-byte opacity field which contains values in the range 0-255, and declare a lookup table with a linear ramp mapping those numbers to the range 0.0-1.0.

In addition to setting the classification function, you should also set the minimum opacity threshold with vpSeti. This threshold is used to discard voxels which are so transparent that they do not contribute significantly to the image. The higher the threshold, the faster the rendering algorithms. For example, to discard voxels which are at most 5% opaque, use the following:

    vpSeti(vpc, VP_MIN_VOXEL_OPACITY, 0.05);

Classified Volumes

The fastest rendering algorithm provided by VolPack uses a run-length encoded volume data structure which must be computed before rendering. Three routines are provided to compute this data structure. Remember to set the opacity transfer function and the minimum voxel opacity before calling the functions in this subsection.

If you have already constructed an unclassified volume and defined the classification function as described in the previous subsections then use vpClassifyVolume():

    vpResult
    vpClassifyVolume(vpContext *vpc);
This routine reads data from the currently-defined volume array, classifies it using the current classifier, and then stores it in run-length encoded form in the rendering context. The volume array is not modified or deallocated.

If you wish to load an array of 8-bit scalars and compute a classified volume directly without building an unclassified volume, then use vpClassifyScalars():

    vpResult
    vpClassifyScalars(vpContext *vpc, unsigned char *scalars,
                      int size, int scalar_field,
                      int gradient_field, int normal_field);
The arguments to this routine are identical to those for vpVolumeNormals() described above. The difference between the two routines is that vpClassifyScalars() stores the result as a classified, run-length encoded volume instead of as an unclassified volume. The volume size, voxel size, voxel fields, and classifier must all be declared before calling this routine, but there is no need to call vpSetRawVoxels().

If you wish to classify one scanline of voxel data at a time instead of loading the entire array of scalar data at once then use vpClassifyScanline():

    vpResult
    vpClassifyScanline(vpContext *vpc, void *voxel_scan);
Voxel_scan is a pointer to one scanline of voxel data, in the same format as the full unclassified volume. You could, for instance, use vpScanlineNormals() to compute the fields of the scanline before passing it to vpClassifyScanline(). Each call to this routine appends one new scanline to the current classified volume. Out-of-order calls are not possible, and the volume cannot be rendered until all of the scanlines have been loaded.

Only one classified volume may be stored in a rendering context at a time. If you start classifying a new volume, any old classified volume data is deallocated. You can also force the current classified volume to be deallocated with vpDestroyClassifiedVolume():

    vpResult
    vpDestroyClassifiedVolume(vpContext *vpc);
Note that if you change the contents of the unclassified volume array and you wish the classified volume to reflect those changes then you must call one of the routines in this section to recompute the classified volume.

Min-Max Octrees

A min-max octree is a hierarchical data structure which contains minimum and maximum values for each field used to index the classification tables. This data structure can be used to accelerate rendering unclassified volumes, and it can also accelerate the computation of a classified volume from an unclassified volume.

To compute a min-max octree, first define an unclassified volume with vpSetVolumeSize(), vpSetVoxelSize(), vpSetVoxelField(), and vpSetRawVoxels(). Also be sure to initialize the volume data. Now for each classification table make one call to vpMinMaxOctreeThreshold():

    vpResult
    vpMinMaxOctreeThreshold(vpContext *vpc, int param_num, int range);
Param_num is the same parameter number you passed to vpSetClassifierTable(). Range is a range of table indices for this parameter which you consider to be "small". The opacity of a voxel should not vary much if the table index is changed by the amount specified in range. Choosing a value which is too small or too large may result in a reduced performance benefit during rendering. You may wish to experiment, but the octree should improve performance even if you don't use the optimum range value. You can use the routine vpOctreeMask() to visualize the effectiveness of the octree (see the man pages).

To compute the octree, call vpCreateMinMaxOctree():

    vpResult
    vpCreateMinMaxOctree(vpContext *vpc, int root_node_size,
                         int base_node_size);
Root_node_size is currently not used but is reserved for future use. Base_node_size specifies the size in voxels of one side of the smallest node in the octree. The smaller the value, the better the resolution of the data structure at the expense of an increase in size. A value of 4 is a good starting point. This routine reads the data in the unclassified volume array, computes an octree, and stores it in the rendering context.

Once the octree has been computed it will be used automatically whenever you call vpClassifyVolume() or vpRenderRawVolume(). If you change the data in the volume array you MUST call vpCreateMinMaxOctree to recompute the octree, or else your renderings will be incorrect. You can also destroy the octree by calling vpDestroyMinMaxOctree():

    vpResult
    vpDestroyMinMaxOctree(vpContext *vpc);

View Transformations

VolPack maintains four transformation matrices: a modeling transform, a viewing transform, a projection transform, and a viewport transform. The primary use of these matrices is to specify a transformation from the volume data's coordinate system to the image coordinate system. However, they also affect light direction vectors (and in future releases of the library they will affect the positioning of clipping planes and polygon primitives).

There are five coordinate systems implied by the transformation matrices: object coordinates, world coordinates, eye coordinates, clip coordinates, and image coordinates. In the object coordinate system the volume is entirely contained in a unit cube centered at the origin. The modeling transform is an affine transform which converts object coordinates into world coordinates. The modeling transform is also applied to light direction vectors to transform them to world coordinates. The view transform is an affine transform that converts world coordinates into eye coordinates. In eye coordinates the viewer is looking down the -Z axis. The view transform is typically used to specify the position of the viewer in the world coordinate system. The projection transform converts eye coordinates into clip coordinates. This transform may specify a perspective or a parallel projection, although perspective rendering is not yet supported. Finally, the viewport transform converts the clip coordinate system into image coordinates.

VolPack provides a number of routines to change the modeling matrix, viewing matrix and the projection matrix. First, use vpCurrentMatrix() to select the matrix you wish to modify:

    vpResult
    vpCurrentMatrix(vpContext *vpc, int option);
Option is one of the constants VP_MODEL, VP_VIEW or VP_PROJECT. Now use the following functions to modify the matrix contents (see the man pages for specifics):
vpIdentityMatrix(vpContext *vpc)
Load the identity matrix into the current transformation matrix.
vpTranslate(vpContext *vpc, double tx, double ty, double tz)
Multiply the current transformation matrix by a translation matrix.
vpRotate(vpContext *vpc, int axis, double degrees)
Multiply the current transformation matrix by a rotation matrix. Axis is one of the constants VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS.
vpScale(vpContext *vpc, double sx, double sy, double sz)
Multiply the current transformation matrix by a scaling matrix.
vpMultMatrix(vpContext *vpc, vpMatrix4 m)
Multiply the current transformation matrix by the given matrix.
vpSetMatrix(vpContext *vpc, vpMatrix4 m)
Load the given matrix into the current transformation matrix.
By default, all of the routines use post-multiplication. For instance, if the current modeling matrix is M and a rotation matrix R is applied, then the new transformation is M*R. If a light direction vector v is now specified (using commands discussed in the section on shading), it is transformed into M*R*v before it is stored in the current rendering context. If you prefer pre-multiplication of matrices then call vpSeti with the CONCAT_MODE argument. Note that vectors are always post-multiplied.

Two special routines are provided for creating projection matrices. These routines always store their result in the projection matrix, not the current matrix. The first is vpWindow():

    vpResult
    vpWindow(vpContext *vpc, int type, double left, double right,
             double bottom, double top, double near, double far);
Type must be the constant VP_PARALLEL to specify a parallel projection. In a future release perspective projections will be allowed. The remaining arguments specify the left, right, bottom, top, near, and far coordinates of the planes bounding the view volume in eye coordinates. This routine works just like the glFrustum() and glOrtho() routines in OpenGL.

The second routine for creating a projection matrix uses the PHIGS viewing model:

    vpResult
    vpWindowPHIGS(vpContext *vpc, vpVector3 vrp, vpVector3 vpn,
             vpVector3 vup, vpVector3 prp, double viewport_umin,
             double viewport_umax, double viewport_vmin,
             double viewport_vmax, double viewport_front,
             double viewport_back, int type);
Vrp is the view reference point, vpn is the view plane normal, vup is the view up vector, prp is the projection reference point, the next six arguments are the bounds of the viewing volume in view reference coordinates, and type is the constant VP_PARALLEL to specify a parallel projection. Since these parameters specify a viewpoint as well as a viewing volume, typically the view matrix contains the identity. See Computer Graphics: Principles and Practice (Chapter 6, 2nd ed.), by Foley, van Dam, Feiner and Hughes for a complete discussion of the PHIGS viewing model.

The viewport transform is set automatically when you set the size of the image, which is discussed in the next subsection.

Here is an example showing all the steps to set the view transformation:

    vpCurrentMatrix(vpc, VP_MODEL);
    vpIdentityMatrix(vpc);
    vpRotate(vpc, VP_X_AXIS, 90.0);
    vpRotate(vpc, VP_Y_AXIS, 23.0);
    vpCurrentMatrix(vpc, VP_VIEW);
    vpIdentityMatrix(vpc);
    vpTranslate(vpc, 0.1, 0.0, 0.0);
    vpCurrentMatrix(vpc, VP_PROJECT);
    vpWindow(vpc, VP_PARALLEL, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5);

Note that light direction vectors are transformed according to the modeling matrix in effect at the time of the call to vpSetLight, and volumes are transformed according to the modeling matrix in effect at the time of rendering. The same viewing, projection and viewport transforms are applied to everything at the time of rendering.

Shading and Lighting

VolPack supports two shading methods: shading via lookup tables, and shading via callback functions. In addition, routines are provided to initialize shading tables for the Phong illumination model.

The built-in routines are designed to support the multiple-material voxel model described in Volume Rendering by Drebin, Carpenter and Hanrahan in Proceedings of SIGGRAPH 88. Each voxel is assumed to contain a mixture of basic material types. Each material type has its own shading parameters, such as color and shinyness. The color of a voxel is found by computing a color for each material type and then combining the colors in proportion to the fraction of each material in the voxel.

This functionality is implemented by storing two table indices in each voxel and using two lookup tables. One voxel field must contain an encoded surface normal vector as computed by vpNormalIndex(). This field is used to index a table which contains a color for each of the material types. The actual colors retrieved from the table depend on the surface normal, so directional lights can be implemented by storing appropriate values in the table. The second voxel field contains a value which is used to index the second table. Each row of the second table contains a fractional occupancy for each material type. These fractional occupancies are used as weights to determine the relative strength of each color retrieved from the first table.

To declare a lookup-table shader, use vpSetLookupShader():

    vpResult
    vpSetLookupShader(vpContext *vpc, int color_channels,
                      int num_materials, int color_field,
                      float *color_table, int color_table_size,
                      int weight_field,
                      float *weight_table, int weight_table_size);
Color_channels is 1 for grayscale renderings or 3 for color (RGB) renderings. Num_materials is the number of material types. Color_field is the voxel field number for the color lookup table index. Color_table is the corresponding lookup table, and color_table_size is the size of the table in bytes. Weight_field, weight_table and weight_table_size are the field number, lookup table and table size for the second table which contains weights for each material type. The color table must be an array with the following dimensions:
    float color_table[n][num_materials][color_channels];
where n is the number of possible values for the color field. The colors are values in the range 0.0-1.0 (zero intensity to full intensity). The weight table must be an array with the following dimensions:
    float weight_table[m][num_materials];
where m is the number of possible values for the weight field. Weights are in the range 0.0-1.0. If there is only one material type then the weight table is not used and the corresponding parameters may be set to 0.

Returning to our example, the following code declares an RGB shader with two material types:

    #define COLOR_CHANNELS   3
    #define MATERIALS        2
    float color_table[NORM_MAX+1][MATERIALS][COLOR_CHANNELS];
    float weight_table[SCALAR_MAX+1][MATERIALS];
    vpSetLookupShader(vpc, COLOR_CHANNELS, MATERIALS,
                      NORM_FIELD, color_table, sizeof(color_table),
                      SCALAR_FIELD, weight_table, sizeof(weight_table));

The weight table can be initialized using the vpRamp() function previously described, or using a loop which fills in values in whatever way you choose. To initialize the color table, VolPack provides a routine called vpShadeTable(). Before calling the routine you must set the lighting and shading parameters as follows.

To set the lighting parameters, use vpSetLight():

    vpResult
    vpSetLight(vpContext *vpc, int light_num, int property,
               double n0, double n1, double n2);
Light_num is one of the constants VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5 and indicates which of the six light sources you wish to adjust. Property is either VP_COLOR or VP_DIRECTION. For VP_COLOR the remaining three arguments are the RGB components of the light color, in the range 0.0-1.0. For VP_DIRECTION the remaining three arguments are the x, y and z components of the direction of the light source. This vector is transformed by the current modeling matrix before it is stored in the rendering context (see View Transformations). You must also call vpEnable() to enable the light. By default, light 0 is enabled and all others are disabled.

For example, to create a cyan light coming from above the viewer's right shoulder, use the following:

    vpSetLight(vpc, VP_LIGHT1, VP_COLOR,      0.0,  1.0,  1.0);
    vpSetLight(vpc, VP_LIGHT1, VP_DIRECTION, -0.6,  0.6,  1.0);
    vpEnable(vpc, VP_LIGHT1, 1);

You can also select "two-sided" lights using vpEnable() with the VP_LIGHT_BOTH_SIDES option. Under this lighting model each directional light shines in two directions, both in the specified direction and in the opposite direction.

To set the material parameters for a particular material type, call vpSetMaterial():

    vpResult
    vpSetMaterial(vpContext *vpc, int material_num, int property,
                  int surface_side, double r, double g, double b);
Material_num is one of the constants VP_MATERIAL0, VP_MATERIAL1, ..., VP_MATERIAL5 and indicates which material you wish to adjust. Property is one of the following:
VP_AMBIENT
Set the R, G and B ambient light reflection coefficients.
VP_DIFFUSE
Set the R, G and B diffuse light reflection coefficients.
VP_SPECULAR
Set the R, G and B specular light reflection coefficients.
VP_SHINYNESS
Set the specular exponent. The g and b arguments are not used.
Surface_side is either VP_EXTERIOR, VP_INTERIOR, or VP_BOTH_SIDES. In the first case the parameters will only affect voxels on the "exterior" side of a surface, which by default means that the voxel's gradient points towards the viewer (you can use vpEnable() with the VP_REVERSE_SURFACE_SIDES option to reverse the meaning of exterior and interior). In the second case the parameters will only affect voxels whose gradient points away from the viewer. In the third case, all voxels are affected.

Here is an example which sets surface 0 to reflect red and green ambient and diffuse light, and to have fairly strong specular highlights which retain the color of the light source:

    vpSetMaterial(vpc, VP_MATERIAL0, VP_AMBIENT,
                  VP_BOTHSIDES, 0.1, 0.1, 0.0);
    vpSetMaterial(vpc, VP_MATERIAL0, VP_DIFFUSE,
                  VP_BOTHSIDES, 0.4, 0.4, 0.0);
    vpSetMaterial(vpc, VP_MATERIAL0, VP_SPECULAR,
                  VP_BOTHSIDES, 0.5, 0.5, 0.5);
    vpSetMaterial(vpc, VP_MATERIAL0, VP_SHINYNESS,
                  VP_BOTHSIDES, 10.0, 0.0, 0.0);

Now that all of the lighting and shading parameters have been set, the color lookup table has been declared with vpSetLookupShader(), and the viewing parameters have been set, you can call vpShadeTable() to recompute the entries of the lookup table:

    vpResult
    vpShadeTable(vpContext *vpc);
This routine computes all of the entries in the currently-defined color table using the current lighting and material parameters and the current view transformation. You should call vpShadeTable() after any changes to the shading or viewing parameters, but before calling any of the rendering routines.

If you wish to use some other shading model you have two options. One approach is to create your own routine to initialize the shading lookup tables. If you take this approach then you may define tables of any size (there is no need to use VolPack's encoded normal vectors). For example, you could use a color transfer function which assigns a unique color to each possible value of the scalar field in your volume. The second option is to define a callback routine which will be called to shade each voxel during rendering. You do so by calling vpSetCallback() instead of vpSetLookupShader(). For example, to declare a grayscale shading callback function use the following call:

    void myshader();
    vpSetCallback(vpc, VP_GRAY_SHADE_FUNC, myshader);
The function myshader() can do whatever you like to compute a color. See the man page for vpSetCallback() for more details. Using callback functions can lead to significant performance degradation during rendering.

There is one more shading option which is independent of the shading model you choose: depth cueing. Depth cueing allows you to introduce black "fog" which makes more distant voxels appear darker then voxels which are close to the viewer, thereby making it easier to distinguish foreground objects from background objects. To enable depth cueing call vpEnable():

    vpEnable(vpc, VP_DEPTH_CUE, 1);
You can use vpSetDepthCueing() to change the depth cueing parameters:
    vpResult
    vpSetDepthCueing(vpContext *vpc, double front_factor,
                     double density);
Front_factor is the transparency of the fog at the front plane of the viewing volume. It must be a positive number and it is usually less than 1.0 (although larger numbers can be used to brighten the foreground). Density controls the "density" of the fog, or how rapidly objects recede into darkness. The equation for the transparency of the fog is:
T = front_factor * exp(-density * depth)
where "depth" is 0 at the front plane of the viewing volume and 1 at the back plane. Each voxel color component is multiplied by the fog transparency during rendering.

VolPack also supports a fast one-pass shadow algorithm implemented with lookup tables (in a similar fashion to the procedure described above). See the man page for vpSetShadowLookupShader.

Images

The last step before rendering is to declare the array that VolPack should store the image into. Use vpSetImage:
    vpResult
    vpSetImage(vpContext *vpc, unsigned char *image, int width,
               int height, int bytes_per_scan, int pixel_type);
Image is a pointer to the array for the image. The next two arguments are the size of the image. These arguments also implicitly determine the viewport transformation: the clip coordinates are scaled to make the left, right, top and bottom planes of the viewing volume align with the sides of the image. The next argument is the number of bytes in one scanline of the image. This argument can be used to add padding to the end of each scanline in case the image display routines on your system impose alignment restrictions on the beginning of each scanline. Finally, the last argument is a code that specifies the format of the pixels in the image. The following formats are allowed:
VP_ALPHA
opacity (1 byte/pixel)
VP_LUMINANCE
grayscale color (1 byte/pixel)
VP_LUMINANCEA
grayscale color plus opacity (2 bytes/pixel)
VP_RGB
RGB color (3 bytes/pixel)
VP_RGBA
RGB color plus opacity (4 bytes/pixel)
VP_BGR
RGB color, byte-swapped (3 bytes/pixel)
VP_ABGR
RGB color plus opacity, bytes-swapped (4 bytes/pixel)
Use the luminance formats only with grayscale shaders, and the RGB formats only with color shaders. The image should have dimensions:
    unsigned char image[bytes_per_scan][height][bytes_per_pixel];
where bytes_per_pixel is the size of the pixel as determined by the pixel format.

Rendering

VolPack provides two rendering routines. The first routine is used to render pre-classified volumes which are created with the routines in the Classified Volumes subsection:
    vpResult
    vpRenderClassifiedVolume(vpContext *vpc);
This routine uses the current viewing and shading parameters to render the classified volume stored in the rendering context. The result is placed in the image buffer declared with vpSetImage().

The second routine is used to render unclassified volumes which are created with the routines in the Volumes subsection:

    vpResult
    vpRenderRawVolume(vpContext *vpc);
This routine is identical to vpRenderClassifiedVolume() except that the source of the volume data is the raw volume data stored in the rendering context, and the volume data is classified on-the-fly during rendering. If a min-max octree data structure is present in the rendering context then it is used to accelerate rendering. However, even with the octree this routine is slower than vpRenderClassifiedVolume() because of the additional work which must be performed.

There is one important state variable which can be used to improve rendering performance: the maximum ray opacity threshold. During compositing, if the opacity of an image pixel reaches this threshold then no more voxel data is composited into the pixel. The threshold should be a number slightly less than one (0.95 is a good value), so that there is very little image degradation but voxels which do not make a significant contribution to the image can be skipped. You set the threshold with vpSetd() and the VP_MAX_RAY_OPACITY option. For example:

    vpSetd(vpc, VP_MAX_RAY_OPACITY, 0.95);

State Variables

The previous subsections have described many routines which set state variables in a rendering context. This subsection briefly mentions the routines available to retrieve the values of these variables.

The function vpGeti() is used to retrieve integer state variables:

    vpResult
    vpGeti(vpContext *vpc, int option, int *iptr);
Option is a constant indicating the particular value you wish to get. The man page for vpGeti lists all of the options. The value is stored in the integer pointed to by iptr. As always, the return value of the routine is a result code (not the state variable value).

To retrieve floating-point state variables used vpGetd():

    vpResult
    vpGetd(vpContext *vpc, int option, double *dptr);
This routine stores its result in the double pointed to by dptr. To retrieve pointers (e.g. the current raw volume data pointer) use vpGetp:
    vpResult
    vpGetp(vpContext *vpc, int option, void **pptr);
Pptr is a pointer to a pointer, so the value of the state variable is stored in *ptr. Transformation matrices can be retrieved with vpGetMatrix():
    vpResult
    vpGetMatrix(vpContext *vpc, int option, vpMatrix4 m);
The matrix values are stored in m.

Lighting and material parameters can be retrieved with vpGetLight() and vpGetMaterial() which have arguments which are similar to the corresponding functions to set these parameters.

Utility Functions

VolPack provides a small collection of convenient utility functions. First, there are routines to store volume data structures in files and load them back into a rendering context. They allow you to perform all of the time-consuming preprocessing steps once and save the results in a file. See the man pages for the following routines:
  • vpStoreRawVolume()
  • vpLoadRawVolume()
  • vpStoreClassifiedVolume()
  • vpLoadClassifiedVolume()
  • vpStoreMinMaxOctree()
  • vpLoadMinMaxOctree()

The routine vpExtract() allows you to extract a rectangular solid region from either the raw volume data or the classified volume data. You can extract individual fields of the volume (e.g. just the scalar data), or computed values (e.g. opacity computed with the current classification function).

The routine vpTranspose() allows you to transpose the raw volume data. This can be useful to improve rendering performance for very large volumes. You can use vpGeti with the VP_VIEW_AXIS option to determine how the volume should be transposed for optimum performance given the current viewing parameters.

The routine vpResample() allows you to scale a volume to a different resolution using a variety of resampling filters. It is useful for scaling very large volumes down to a smaller size for fast previewing, or to filter low-resolution data sets to a higher resolution with a high-quality filter before rendering.

Result Codes and Error Handling

Almost all of the routines in VolPack return a result of type vpResult which is an integer. Routines return the value VP_OK to indicate success. Any other value indicates an error. See the man page for each function for the possible error codes and their specific meanings.

When an error occurs VolPack also records the error code in the rendering context. You can retrieve the error code later by calling vpGetError(). If another error occurs before you call vpGetError() then only the first one is returned. The recorded value is then reset.

The routine vpGetErrorString() can be used to convert an error code into a printable string.

Section 3: Tips and Pointers

Maximizing Rendering Speed

There are several techniques to keep in mind to get the maximum possible performance out of VolPack. First of all, use the appropriate rendering algorithm for the task at hand. If you want to render a volume from several viewpoints without changing the classification function then it is well worth the time to preprocess the volume into the run-length encoded format before rendering. Use the min-max octree data structure if the classification function does change for every rendering but the volume data remains fixed.

Second, choose the various thresholds carefully. Changing the minimum opacity threshold for classification and the maximum ray opacity for rendering can have a big impact on rendering speed. Changing the parameter range thresholds for the min-max octree can also improve performance.

Third, minimize the need for reallocating internal data structures by predeclaring their sizes. Internal buffers are used to store an intermediate image during rendering and a depth cueing lookup table. The sizes of these tables can change as the viewing parameters change, so the tables may have to be reallocated over the course of a multi-frame rendering loop. You can give VolPack "hints" for the sizes of these data structures using vpSeti() with the VP_INT_WIDTH_HINT, VP_INT_HEIGHT_HINT and VP_DEPTH_CUE_SIZE_HINT options.

Finally, if you are using vpRenderRawVolume() with a large volume then you may need to transpose the volume as the viewing direction changes from one principal axis to another.

Maximizing Image Quality

There are two important techniques which will help you to produce images free from distracting aliasing artifacts. The first is to choose classification functions that are fairly smooth. Functions with discontinuities or very abrupt transitions introduce very sharp transitions in the classified volume, and these transitions may be too sharp to be properly sampled. The result can be jagged boundaries and spurious patterns in the rendered image. These artifacts may be difficult to distinguish from the information in the data set. To diagnose this problem, try extracting slices of classified volume data with vpExtract() and check if the opacity images contain a lot of aliasing. Smooth transitions will produce the best images.

The second technique is to prefilter the volume data with a high-quality filter before scaling or zooming, rather than using the viewing transformation to do the scaling. There are two reasons that prefiltering may help. The rendering routines use a simple bilinear reconstruction filter, but if you prefilter you can use a higher-quality filter which does a better job of reconstruction. Furthermore, the resolution of the rendered image is limited by the number of samples in the volume, so very large magnification factors produce visible aliasing artifacts. Upscaling the volume with a high-quality filter before rendering can solve this problem. Several utility routines, described in the vpResample() man page, are provided for prefiltering a volume.

Software Support

If you have problems, bug reports or bug fixes, please send mail to:
volpack@graphics.stanford.edu
The author makes no commitment to fix bugs or provide support. However, future releases with fixes and enhancements are planned.

If you wish to be informed of future updates to the software then you should subscribe to the volpack-announce mailing list. To do so, send an email message to

majordomo@lists.stanford.edu
with the following message body:
subscribe volpack-announce
To be removed from the list, send the message:
unsubscribe volpack-announce
Mail will be sent to the list only to announce bug fixes and new releases.

If you like the library then drop us a note describing what you use it for!

Obtaining the Software

VolPack is available from the Stanford Computer Graphics Laboratory's Web page (http://www-graphics.stanford.edu/software/volpack/#Distribution) or via anonymous ftp (ftp://www-graphics.stanford.edu/pub/volpack/).
Last update: 16 December 1994
volpack@graphics.stanford.edu
volpack-1.0b3/doc/Makefile.am0000644000265600020320000000026110727044625012766 00000000000000## Process this file with automake to produce Makefile.in # Makefile.am for volpack/doc # Andreas Tille # GPL EXTRA_DIST = vp_userguide.html vp_userguide.ps volpack-1.0b3/INSTALL0000644000265600020320000002231010515602102011176 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. volpack-1.0b3/man/0000777000265600020320000000000010727044642011024 500000000000000volpack-1.0b3/man/Makefile.in0000644000265600020320000003372410727044632013015 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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@ # man/Makefile.am for volpack # Andreas Tille # GPL VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = man 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 = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ 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@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBVOLPACK_VERSION_INFO = @LIBVOLPACK_VERSION_INFO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ MFLAGS = @MFLAGS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OFLAGS = @OFLAGS@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src all: all-recursive .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) --gnu man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(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 # 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" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 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" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-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: volpack-1.0b3/man/src/0000777000265600020320000000000010727044642011613 500000000000000volpack-1.0b3/man/src/GetLight.30000644000265600020320000000510205701332753013317 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetLight 3 "" VolPack .SH NAME vpGetLight \- get lighting properties .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetLight(\fIvpc, light_num, property, n0_ptr, n1_ptr, n2_ptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIlight_num;\fR .FA int \fIproperty;\fR .FA double *\fIn0_ptr,\fR *\fIn1_ptr,\fR *\fIn2_ptr;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIlight_num\fR A constant specifying a particular light source (VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5). .IP \fIproperty\fR A constant specifying one lighting property (VP_COLOR or VP_DIRECTION). .IP "\fIn0_ptr, n1_ptr, n2_ptr\fR" Locations for storing the result: components of an RGB color (for VP_COLOR) or a direction vector (for VP_DIRECTION). .SH DESCRIPTION \fBvpGetLight\fR is used to get the properties of a light source. The arguments are exactly analogous to \fBvpSetLight\fR except that the final three arguments are pointers to locations for storing the lighting properties. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_LIMIT_EXCEEDED The light number is invalid or exceeds an implementation limit. .IP VPERROR_BAD_OPTION The \fIproperty\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetLight(3) volpack-1.0b3/man/src/Get.30000644000265600020320000003017005701332752012331 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGeti 3 "" VolPack .SH NAME vpGeti, vpGetd, vpGetp \- get the value of an option .SH SYNOPSIS #include .sp .FS vpResult \fBvpGeti(\fIvpc, option, iptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA int *\fIiptr;\fR .FE .sp .FS vpResult \fBvpGetd(\fIvpc, option, dptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA double *\fIdptr;\fR .FE .sp .FS vpResult \fBvpGetp(\fIvpc, option, pptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA void *\fIpptr;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR Constant that specifies the option to be retrieved. .IP \fIiptr\fR Location to store an integer result. .IP \fIdptr\fR Location to store a double result. .IP \fIpptr\fR Location to store a pointer result. .SH DESCRIPTION These functions are used the get the values of integer-, double- or pointer-valued state variables in a rendering context. The following list summarizes the integer-valued options that can be retrieved with \fBvpGeti\fR. The value of the option is stored in the location given by \fIiptr;\fR the return value of \fBvpGeti\fR is not the value of the option. Unless otherwise noted, the result is a single integer and \fIiptr\fR should point to a single integer location. .IP VP_XLEN Get the length of the X dimension of the volume in voxels. .IP VP_YLEN Get the length of the Y dimension of the volume in voxels. .IP VP_ZLEN Get the length of the Y dimension of the volume in voxels. .IP VP_BYTES_PER_VOXEL Get the size of a voxel in bytes. .IP VP_VOXEL_FIELD_COUNT Get the number of fields in a voxel. .IP VP_SHADE_FIELD_COUNT Get the number of fields in a voxel used as parameters for shading the voxel. .IP VP_FIELD_SIZES Get the size of each voxel field in bytes. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_FIELD_OFFSETS Get the byte offset from the beginning of a voxel for each voxel field. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_FIELD_MAXES Get the maximum value of the quantity stored in each voxel field. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_VOXEL_DATA_SIZE Get the size (in bytes) of the 3D voxel array. .IP VP_VOXEL_XSTRIDE Get the stride (in bytes) for the X dimension of the 3D voxel array. .IP VP_VOXEL_YSTRIDE Get the stride (in bytes) for the Y dimension of the 3D voxel array. .IP VP_VOXEL_ZSTRIDE Get the stride (in bytes) for the Z dimension of the 3D voxel array. .IP VP_CLASSIFY_FIELD_COUNT Get the number of fields in a voxel used as parameters for classifying the voxel (the number of arguments to the opacity transfer function). .IP VP_CLASSIFY_FIELDS Get the field numbers for the arguments to the opacity transfer function. \fIiptr\fR must point to an array of integers containing one entry for each argument (use VP_CLASSIFY_FIELD_COUNT to determine the number of arguments). .IP VP_CLASSIFY_TABLE_SIZES Get the size (in bytes) of each lookup table used for the opacity transfer function. \fIiptr\fR must point to an array of integers containing one entry for each lookup table (use VP_CLASSIFY_FIELD_COUNT to determine the number of lookup tables, which equals the number of arguments to the opacity transfer function). .IP VP_COLOR_CHANNELS Get the number of color channels that the current shading lookup tables or shading callback function will produce. .IP VP_SHADE_COLOR_SIZE Get the size of the shading lookup table for color values (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_SIZE Get the size of the shading lookup table for weight values (see vpSetLookupShader(3)). .IP VP_MATERIAL_COUNT Get the number of material types used by the current lookup shader (see vpSetLookupShader(3)). .IP VP_SHADE_COLOR_FIELD Get the field number used for indexing the shading lookup table for color values (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_FIELD Get the field number used for indexing the shading lookup table for weight values (see vpSetLookupShader(3)). .IP VP_LIGHT0 .PD 0 .IP VP_LIGHT1 .IP VP_LIGHT2 .IP VP_LIGHT3 .IP VP_LIGHT4 .IP VP_LIGHT5 The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled. .PD .IP VP_LIGHT_BOTH_SIDES The retrieved value is nonzero if two-sided lighting is enabled (see vpSetLight(3)), or 0 if it is disabled. .IP VP_REVERSE_SURFACE_SIDES The retrieved value is nonzero if the definitions of interior and exterior surfaces have been reversed (see vpSetMaterial(3)), or 0 if they have not. .IP VP_DEPTH_CUE The retrieved value is nonzero if depth cueing is enabled, or 0 if it is disabled. .IP VP_DEPTH_CUE_TABLE_SIZE Get the current number of entries in the depth cueing table (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_SIZE_HINT Get the current hint for the number of entries in the depth cueing table (see vpSetDepthCueing(3)). .IP VP_CURRENT_MATRIX Get the identifier for the current transformation matrix (VP_MODEL, VP_VIEW or VP_PROJECT). .IP VP_CONCAT_MODE Get the identifier for the current matrix concatenation mode (VP_CONCAT_LEFT or VP_CONCAT_RIGHT). .IP VP_IMAGE_WIDTH Get the width (in pixels) of the output image array. .IP VP_IMAGE_HEIGHT Get the height (in pixels) of the output image array. .IP VP_IMAGE_SCAN_SIZE Get the number bytes per scanline in the output image array. .IP VP_VIEW_AXIS Get the identifier for the current major viewing axis in the object coordinate system (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS). The axis depends on the viewing transformation. .IP VP_INTERMEDIATE_WIDTH Get the width (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)). .IP VP_INTERMEDIATE_HEIGHT Get the height (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)). .IP VP_INTERMEDIATE_COLOR Get the number of color channels in the intermediate image (see vpRenderRawVolume(3)). .IP VP_INT_WIDTH_HINT Get the current hint for the width (in pixels) of the intermediate image (see vpRenderRawVolume(3)). .IP VP_INT_HEIGHT_HINT Get the current hint for the height (in pixels) of the intermediate image (see vpRenderRawVolume(3)). .IP VP_VIEW_X_AXIS .PD 0 .IP VP_VIEW_Y_AXIS .IP VP_VIEW_Z_AXIS The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (see vpClassifyVolume(3)). .PD .IP VP_VIEW_X_SIZE .PD 0 .IP VP_VIEW_Y_SIZE .IP VP_VIEW_Z_SIZE Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis. .PD .IP VP_MMOCTREE_THRESHOLDS Get the current min-max octree range thresholds. \fIiptr\fR must point to an array of integers containing one entry for each threshold (use VP_CLASSIFY_FIELD_COUNT to determine the number of thresholds, which equals the number of arguments to the opacity transfer function). .IP VP_MMOCTREE_SIZE Get the size (in bytes) of the min-max octree. .IP VP_SHADOW The retrieved value is nonzero if shadows are enabled (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_LIGHT Get the constant (e.g. VP_LIGHT0) associated with the current shadow light (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_WIDTH_HINT Get the current hint for the width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_HEIGHT_HINT Get the current hint for the height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_COLOR_SIZE Get the size of the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_BIAS Get the current shadow bias value (see vpSetShadowLookupShader(3)). .IP VP_PIXEL_TYPE Get the current image pixel type (see vpSetImage(3)). .IP VP_CLAMP_SHADE_TABLE The retrieved value is nonzero if clamping is enabled for shade table entries, or 0 if it is disabled (see vpShadeTable(3)). .IP VP_COMPOSITE_ORDER This value is used for debugging only. It returns 1 if the current major viewing axis (VP_VIEW_AXIS) points in the same direction as the viewing direction, or -1 if they point in opposite directions. .PP The following list summarizes the double-valued options that can be retrieved with \fBvpGetd\fR. The result is always a single double and \fIdptr\fR should point to a single double location. .IP VP_MIN_VOXEL_OPACITY Get the minimum opacity threshold (see vpSeti(3)). .IP VP_DEPTH_CUE_FRONT Get the front depth cueing factor (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_DENSITY Get the depth cueing density (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_QUANTIZATION Get the depth cueing quantization (see vpSetDepthCueing(3)). .IP VP_MAX_RAY_OPACITY Get the maximum opacity threshold (see vpSeti(3)). .PP The following list summarizes the pointer-valued options that can be retrieved with \fBvpGetp\fR. Unless otherwise noted, the result is a single pointer and \fIpptr\fR should point to a single pointer location. .IP VP_VOXEL_DATA Get a pointer to the 3D voxel array. .IP VP_CLASSIFY_TABLES Get pointers to each of the lookup tables for the opacity transfer function. \fIpptr\fR must point to an array of pointers containing one entry for each table (use VP_CLASSIFY_FIELD_COUNT to determine the number of tables, which is equal to the number of arguments to the opacity transfer function). .IP VP_SHADE_FUNC Get the shading callback function (see vpSetLookupShader(3)). .IP VP_SHADE_COLOR_TABLE Get a pointer to the shading lookup table for colors (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_TABLE Get a pointer to the shading lookup table for weights (see vpSetLookupShader(3)). .IP VP_IMAGE Get a pointer to the output image array (see vpSetImage(3)). .IP VP_LOG_ALLOC_FUNC Get a pointer to the memory allocator logging function (see vpSetCallback(3)). .IP VP_LOG_FREE_FUNC Get a pointer to the memory deallocator logging function (see vpSetCallback(3)). .IP VP_STATUS_FUNC Get a pointer to the status reporting function (see vpSetCallback(3)). .IP VP_READ_FUNC Get a pointer to the file I/O read function (see vpSetCallback(3)). .IP VP_WRITE_FUNC Get a pointer to the file I/O write function (see vpSetCallback(3)). .IP VP_MMAP_FUNC Get a pointer to the file I/O memory mapping function (see vpSetCallback(3)). .IP VP_CLIENT_DATA Get a pointer to the client data (see vpSetClientData(3)). .IP VP_SHADOW_COLOR_TABLE Get a pointer to the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .IP VPERROR_SINGULAR One of the current view transformation matrices is singular. (Only possible for options that depend on the current view transformation). .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSeti(3) volpack-1.0b3/man/src/Error.30000644000265600020320000000441005701332750012677 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetError 3 "" VolPack .SH NAME vpGetError, vpGetErrorString \- retrieve error codes .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetError(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .sp .FS "char *" \fBvpGetErrorString(\fIcode\fB)\fR .FA vpResult \fIcode;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIcode\fR A VolPack error result code. .SH DESCRIPTION These routines are used for error handling. \fBvpGetError\fR return the error code from the first function call that failed since the last call to \fBvpGetError\fR. \fBvpGetErrorString\fR returns a descriptive string corresponding to an error code. The string is stored in a global array so it does not need to be copied to separate memory. .SH ERRORS \fBvpGetError\fR cannot fail. A return value not equal to VP_OK means that some previous function call has failed. \fBvpGetErrorString\fR returns NULL if \fIcode\fB is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/ClsfyScalar.30000644000265600020320000001034705701332744014025 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpClassifyScalars 3 "" VolPack .SH NAME vpClassifyScalars \- create a preclassified volume from scalar data .SH SYNOPSIS #include .sp .FS vpResult \fBvpClassifyScalars(\fIvpc, scalar_data, length, scalar_field, gradient_field, norm_field\fB)\fR .FA vpContext *\fIvpc;\fR .FA unsigned char *\fIscalars;\fR .FA int \fIsize;\fR .FA int \fIscalar_field, gradient_field, norm_field;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIscalar_data\fR A 3D array containing one 8-bit scalar value for each voxel in the volume. .IP \fIlength\fR Size of \fIscalar_data\fR in bytes. .IP \fIscalar_field\fR Field number identifying a voxel field for storing the scalar value. .IP \fIgradient_field\fR Field number identifying a voxel field for storing the gradient magnitude of the scalar value. .IP \fInorm_field\fR Field number identifying a voxel field for storing the surface normal vector for the voxel. .SH DESCRIPTION \fBvpClassifyScalars\fR combines the functionality of \fBvpVolumeNormals\fR and \fBvpClassifyVolume\fR to produce a preclassified volume directly from a 3D array of scalar values without creating a 3D voxel array. This routine is useful for preparing large data sets for rendering with a fixed classification function, especially if the 3D voxel array would be too large to fit in main memory. The primary limitation is that the only fields each voxel may contain are the fields produced by \fBvpVolumeNormals\fR: an 8-bit scalar value, and 8-bit gradient and/or a 16-bit surface normal vector. See also \fBvpClassifyScanline\fR for processing one scanline of a scalar array at a time. .PP To use the function, first define the volume size, voxel size, and voxel fields as you would before calling \fBvpVolumeNormals\fR. However, there is no need to call \fBvpSetRawVoxels.\fR Also define the opacity transfer function (see vpSetClassifierTable(3)). Then call \fBvpClassifyScalars\fR with the same arguments you would use for \fBvpVolumeNormals;\fR see vpVolumeNormals(3) for more details. The result is a preclassified volume, as described in vpClassifyVolume(3). If a voxel array has been declared it is not used or modified. .PP Any existing preclassified volume data is destroyed. .SH "STATE VARIABLES" Information about the current preclassified volume can be retrieved with the following state variable codes (see vpGeti(3)): VP_VIEW_X_SIZE, VP_VIEW_Y_SIZE, VP_VIEW_Z_SIZE, VP_VIEW_X_AXIS, VP_VIEW_Y_AXIS, VP_VIEW_Z_AXIS. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpVolumeNormals(3), vpSetClassifierTable(3), vpClassifyVolume(3), vpClassifyScanline(3) volpack-1.0b3/man/src/DepthCueing.30000644000265600020320000001214405701332747014016 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetDepthCueing 3 "" VolPack .SH NAME vpSetDepthCueing \- set depth cueing parameters .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetDepthCueing(\fIvpc, front_factor, density\fB)\fR .FA vpContext *\fIvpc;\fR .FA double \fIfront_factor;\fR .FA double \fIdensity;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIfront_factor\fR Depth cueing factor at the front clipping plane. .IP \fIdensity\fR Fog density. .SH DESCRIPTION \fBvpSetDepthCueing\fR is used to set the parameters for depth cueing. Depth cueing is a simulated fog that makes objects in the distance appear darker than foreground objects. Depth cueing is independent of the shading method. It can be used with lookup-table shading or callback-function shading. Depth cueing is not stored in the shading lookup table; it is always applied to voxels at rendering time. .PP The \fIfront_factor\fR argument is the transparency of the fog at the front clipping plane (see vpWindow(3) or vpWindowPHIGS(3)). It must be a positive number and is usually less than 1.0 (although larger numbers can be used to brighten the foreground). The \fIdensity\fR argument controls the "density" of the fog. Increasing the density causes objects to recede into darkness over a shorter distance. The equation for the transparency of the fog at a particular voxel is: .DS T = front_factor * exp(-density * depth) .DE where \fIdepth\fR is 0 at the front clipping plane and 1 at the back clipping plane. Each voxel color component is multiplied by the fog transparency during rendering. .PP By default, depth cueing is not enabled. To enable it, call \fBvpEnable\fR with the VP_DEPTH_CUE option. .PP Depth cueing is implemented using an internal lookup table (unrelated to the shading lookup table). There are several VolPack state variables that affect the depth cueing table, although they should not usually be changed. The table contains depth cueing factors as a function of depth. The table must contain entries for depths in the range 0.0-1.0, and possibly for negative depths depending upon the current viewing parameters (the reason for this is beyond the scope of a man page). The VP_DEPTH_CUE_QUANTIZATION variable (which can be set by calling \fBvpSetd\fR) determines the depth difference between two adjacent entries in the depth cueing table. For instance, the default quantization of 1/255 specifies that each entry in the table represents 1/255 times the distance between the front and back clipping planes. Reducing the quantization increases the size and accuracy of the depth cueing table. .PP Normally the depth cueing table is resized and recomputed only when necessary. Recomputation may be required if the viewpoint changes, increasing the range of voxel depths that are encountered (recall that there is no lower bound on the depth). You can use \fBvpGeti\fR with the VP_DEPTH_CUE_TABLE_SIZE state variable code to get the current number of table entries. You can also set the value of VP_DEPTH_CUE_TABLE_SIZE_HINT (using \fBvpSeti\fR) to suggest a size for the table. This might be desirable if you plan to compute an animation loop and want to ensure that the depth cueing table does not need to be recomputed in the middle of the sequence. However, since recomputing the table is relatively inexpensive, it should not be necessary to use this option. .SH "STATE VARIABLES" Information about the current depth cueing properties can be retrieved with the following state variable codes (see vpGeti(3)): VP_DEPTH_CUE, VP_DEPTH_CUE_FRONT, VP_DEPTH_CUE_DENSITY, VP_DEPTH_CUE_TABLE_SIZE, VP_DEPTH_CUE_SIZE_HINT, VP_DEPTH_CUE_QUANTIZATION. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_VALUE The value of \fIfront_factor\fR is not positive. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetLookupShader(3) volpack-1.0b3/man/src/Timer.30000644000265600020320000001055605701332770012700 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetTimer 3 "" VolPack .SH NAME vpGetTimer, vpClearTimer \- interval timer facility .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetTimer(\fIvpc, option, iptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA int *\fIiptr;\fR; .FE .sp .FS vpResult \fBvpClearTimer(\fIvpc, option\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR Constant that specifies a particular timer. .IP \fIiptr\fR Location for storing the timer value. .SH DESCRIPTION These functions are used for measuring the performance of the VolPack library. To use them, the library must be compiled with a special flag: either -DHAVE_LORES_TIMER (for machine that support the gettimeofday C library call) or -DHAVE_HIRES_TIMER (for SGI machines that support high-resolution memory-mapped I/O timers; on a Challenge or ONYX, the -DHAVE_64BIT_TIMER must also be specified). If one of these flags is specified at compile time then VolPack maintains a table recording the accumulated time spent in various operations. Note that some of the operations can only be timed with a high-resolution timer; time values will not be recorded and will appear to be zero if a low resolution timer is specified at compile time. .PP \fBvpGetTimer\fR retrieves the accumulated time for a particular operation. The \fIoption\fR argument specifies which operation: .IP VPTIMER_SHADE Time the routine that computes the contents of the shading lookup table. .IP VPTIMER_RENDER Time the routine that renders a volume (includes VPTIMER_CLSFY_OCTREE, VPTIMER_COMPOSITE, VPTIMER_DEPTHCUE, and VPTIMER_WARP). .IP VPTIMER_COMPOSITE Time the routine that computes the intermediate image from the volume (includes VPTIMER_CLEAR, VPTIMER_TRAVERSE_OCTREE, VPTIMER_ERT, VPTIMER_TRAVERSE_RUNS, and VPTIMER_PROCESS_VOXELS). .IP VPTIMER_DEPTHCUE Time the routine that performs the depth cueing fixup on the intermediate image. .IP VPTIMER_WARP Time the routine that warps the intermediate image into the final image. .IP VPTIMER_TRAVERSE_RUNS Time the portion of the compositing routine devoted to traversing the volume data structures. .IP VPTIMER_PROCESS_VOXELS Time the portion of the compositing routine devoted to compositing voxels into the intermediate image. .IP VPTIMER_ERT Time the early-ray termination checks during compositing. .IP VPTIMER_CLSFY_OCTREE Time the octree classification stage. .IP VPTIMER_TRAVERSE_OCTREE Time the portion of the compositing routine devoted to traversing the octree. .IP VPTIMER_CLEAR Time the routine that clears the intermediate image at the beginning of compositing. .LP The routine stores the accumulated time since the last call to \fIvpClearTimer\fR (or since the beginning of the program) in the location specified by \fIiptr.\fR The units of the value are microseconds. .PP \fIvpClearTimer\fR sets the specified timer value back to zero. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/ClsfyVolume.30000644000265600020320000001200305701332745014057 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpClassifyVolume 3 "" VolPack .SH NAME vpClassifyVolume, vpDestroyClassifiedVolume \- create/destroy a preclassified volume for fast rendering .SH SYNOPSIS #include .sp .FS vpResult \fBvpClassifyVolume(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .sp .FS vpResult \fBvpDestroyClassifyVolume(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION \fBvpClassifyVolume\fR is used to compute a preclassified volume for the fast rendering algorithm. The preclassified volume is an internal data structure optimized for rendering speed. \fBvpClassifyVolume\fR should be called after a voxel array has been defined (with \fBvpSetVolumeSize, vpSetVoxelSize, vpSetVoxelField,\fR and \fBvpSetRawVoxels\fR) and initialized (with \fBvpVolumeNormals\fR or a user-defined routine). An opacity transfer function must also be defined with \fBvpSetClassifierTable,\fR and the minimum opacity threshold should be set with the VP_MIN_VOXEL_OPACITY parameter to \fBvpSeti\fR. Two alternative routines are provided to compute a preclassified volume directly from a 3D scalar array or a sequence of scalar scanlines in order to avoid allocating a large 3D voxel array (see vpClassifyScalars(3) and vpClassifyScanline(3)). .PP \fBvpClassifyVolume\fR classifies and processes the data in the voxel array and creates a separate preclassified volume. The preclassified data is stored in a run-length encoded format, and voxels that have opacities less than or equal to the minimum opacity threshold are discarded. Normally, three copies of the preclassified volume are created, one for each of the three principal viewing axis. If only one or two copies are necessary for the required range of viewpoints then \fBvpSeti\fR may be called with one or more of the following parameters to specify which copies are required: VP_VIEW_X_AXIS, VP_VIEW_Y_AXIS, VP_VIEW_Z_AXIS. Using these parameters is not recommended unless swap space is lacking. .PP If a min-max octree is present in the rendering context (see vpCreateMinMaxOctree(3)) then it is used to accelerate computation of the preclassified volume. It is advantageous to create a min-max octree if the same volume data will be classified multiple times (with different opacity transfer functions). .PP Once \fBvpClassifyVolume\fR is finished, the original voxel array is no longer necessary for rendering as long as the opacity transfer function and the volume data do not change. If any changes are made, then the preclassified volume must be explicitly recomputed by calling \fBvpClassifyVolume\fR again. Only one preclassified volume may be stored in a rendering context at a time. Calling \fBvpClassifyVolume\fR causes any existing preclassified volume to be destroyed. .PP \fBvpDestroyClassifiedVolume\fR destroys the current preclassified volume and frees the associated space. .SH "STATE VARIABLES" Information about the current preclassified volume can be retrieved with the following state variable codes (see vpGeti(3)): VP_VIEW_X_SIZE, VP_VIEW_Y_SIZE, VP_VIEW_Z_SIZE, VP_VIEW_X_AXIS, VP_VIEW_Y_AXIS, VP_VIEW_Z_AXIS. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_VOLUME The volume array or volume dimensions have not been specified, or the size of the volume array does not match the volume dimensions. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyScalars(3), vpClassifyScanline(3) volpack-1.0b3/man/src/Makefile.in0000644000265600020320000002605610727044632013604 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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@ # man/src/Makefile.am for volpack # Andreas Tille # GPL VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = man/src DIST_COMMON = $(dist_man_MANS) $(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 = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ 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@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBVOLPACK_VERSION_INFO = @LIBVOLPACK_VERSION_INFO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ MFLAGS = @MFLAGS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OFLAGS = @OFLAGS@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = \ BruteForce.3 Callback.3 ClientData.3 ClsfyScalar.3 ClsfyScan.3 \ ClsfyTable.3 ClsfyVolume.3 Context.3 CurrentMatrix.3 Debug.3 \ DepthCueing.3 Enable.3 Error.3 Extract.3 Filter.3 FilterTab.3 \ Get.3 GetImage.3 GetLight.3 GetMaterial.3 GetMatrix.3 Identity.3 \ Image.3 Light.3 LinAlgebra.3 Load.3 LookupShader.3 Material.3 \ MinMaxOctree.3 MultMatrix.3 NormalIndex.3 OctreeMask.3 Ramp.3 \ RawVoxels.3 Render.3 Resample.3 Rotate.3 Scale.3 ScanNormals.3 \ Set.3 SetMatrix.3 ShadeTable.3 Shadow.3 Store.3 Timer.3 \ TracePixel.3 Translate.3 Transpose.3 VolPack.3 VolumeNormals.3 \ VolumeSize.3 VoxelField.3 VoxelSize.3 Window.3 WindowPHIGS.3 EXTRA_DIST = makelinks 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) --gnu man/src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu man/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(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 install-man3: $(man3_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 3*) ;; \ *) ext='3' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ done uninstall-man3: @$(NORMAL_UNINSTALL) @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 3*) ;; \ *) ext='3' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man3dir)"; 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 dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man3 install-pdf: install-pdf-am install-ps: install-ps-am 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-man uninstall-man: uninstall-man3 .MAKE: install-am install-strip .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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man3 \ install-pdf install-pdf-am install-ps install-ps-am \ 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-man uninstall-man3 # 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: volpack-1.0b3/man/src/Callback.30000644000265600020320000001652005701332743013311 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetCallback 3 "" VolPack .SH NAME vpSetCallback \- define a callback function .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetCallback(\fIvpc, option, func\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA void \fI(*func)();\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR A code specifying which callback function to set. .IP \fIfunc\fR A pointer to the callback function. .SH DESCRIPTION \fBvpSetCallback\fR is used to set a callback function. The following list gives the possible values for \fIoption:\fR .IP VP_GRAY_SHADE_FUNC The \fIfunc\fR argument is a shading callback function that produces a floating point grayscale pixel intensity. The function should be declared: .RS .DS void \fIfunc\fR(\kxvoid *\fIvoxel_ptr,\fR float *\fIi_ptr\fR, .br \h'\nxu'void *\fIclient_data\fR); .DE .IP \fIvoxel_ptr\fR Pointer to the beginning of a voxel that must be shaded. .IP \fIi_ptr\fR Location into which the function should store the grayscale intensity result. It should be a single-precision floating point in the range 0.0 (black) to 1.0 (white). .IP \fIclient_data\fR Pointer to the application-defined client data (see vpSetClientData(3)). .PP The callback can be used to implement custom shading routines that cannot be implemented with a lookup table. See vpSetLookupShader(3) for more information. .RE .IP VP_RGB_SHADE_FUNC The \fIfunc\fR argument is a shading callback function that produces a floating point RGB pixel intensity. The function should be declared: .RS .DS void \fIfunc\fR(\kxvoid *\fIvoxel_ptr,\fR float *\fIr_ptr\fR, .br \h'\nxu'float *\fIr_ptr\fR, float *\fIr_ptr\fR, .br \h'\nxu'void *\fIclient_data\fR); .DE .IP \fIvoxel_ptr\fR Pointer to the beginning of a voxel that must be shaded. .IP "\fIr_ptr, g_ptr, b_ptr\fR" Location into which the function should store the RGB intensities of the result. Each intensity should be a single-precision floating point in the range 0.0 (no intensity) to 1.0 (full intensity). .IP \fIclient_data\fR Pointer to the application-defined client data (see vpSetClientData(3)). .PP The callback can be used to implement custom shading routines that cannot be implemented with a lookup table. See vpSetLookupShader(3) for more information. .RE .IP VP_READ_FUNC The \fIfunc\fR argument is a callback function that takes the same arguments and returns the same result as the \fBread\fR(2) system call. This function is used to read data from files (see vpLoadRawVolume(3)). By default, the \fBread\fR system call is used. The callback can be used to implement a custom I/O interface, for example a compression/decompression system. .IP VP_WRITE_FUNC The \fIfunc\fR argument is a callback function that takes the same arguments and returns the same result as the \fBwrite\fR(2) system call. This function is used to write data to files (see vpStoreRawVolume(3)). By default, the \fBwrite\fR system call is used. The callback can be used to implement a custom I/O interface, for example a compression/decompression system. .IP VP_MMAP_FUNC The \fIfunc\fR argument is a callback function that is called to memory map data from a file instead of copying the data into memory (see vpLoadRawVolume(3)). The function should be declared: .RS .DS void *\fIfunc\fR(\kxint \fIfd,\fR unsigned \fIoffset,\fR .br \h'\nxu'void *\fIclient_data\fR); .DE .IP \fIfd\fR File descriptor from \fBopen\fR(2) open for reading. .IP \fIoffset\fR Byte offset in the file to the beginning of the memory to be mapped. .IP \fIclient_data\fR Pointer to the application-defined client data (see vpSetClientData(3)). .PP The function should map the entire file into memory and return a pointer to the memory location that corresponds to the file offset. By default, memory mapping is disabled. .RE .IP VP_STATUS_FUNC The \fIfunc\fR argument is a callback function that is called periodically during long-running operations such as during preprocessing of a volume. The function should be declared: .RS .DS void \fIfunc\fR(double \fIfrac\fR, void *\fIclient_data\fR); .DE .IP \fIfrac\fR An estimate of the fraction of the current operation that is complete. .IP \fIclient_data\fR Pointer to the client data associated with the context. .PP The callback can be used to print a status report or to process time-critical events such as user input. However, the callback should not make any calls to VolPack functions since the internal VolPack state may be inconsistent. .RE .IP VP_LOG_ALLOC_FUNC The \fIfunc\fR argument is a callback function that is called whenever VolPack allocates memory. The function should be declared: .RS .DS void \fIfunc\fR(\kxvoid *\fIptr,\fR int \fIsize\fR, char *\fIuse\fR, .br \h'\nxu'int \fIline\fR, char *\fIfile\fR, void *\fIclient_data\fR); .DE .IP \fIptr\fR Address of the allocated memory. .IP \fIsize\fR Size (in bytes) of the allocated memory. .IP \fIuse\fR Short description of the use of the allocated memory. .IP \fIline\fR Source code line number for the call to the memory allocator. .IP \fIfile\fR Source code file name for the call to the memory allocator. .IP \fIclient_data\fR Pointer to the client data associated with the context. .PP The callback can be used to track memory allocations (primarily for debugging memory leaks). .RE .IP VP_LOG_FREE_FUNC The \fIfunc\fR argument is a callback function that is called whenever VolPack deallocates memory. The function should be declared: .RS .DS void \fIfunc\fR(void *\fIptr\fR, void *\fIclient_data\fR) .DE .IP \fIptr\fR Address of the deallocated memory. .IP \fIclient_data\fR Pointer to the client data associated with the context. .PP The callback can be used to track memory deallocations (primarily for debugging memory leaks). .RE .PP If the \fIfunc\fR argument is NULL then the corresponding callback function is reset to the default behavior or disabled if there is no default behavior. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetClientData(3), vpSetLookupShader(3), vpLoadRawVolume(3), vpStoreRawVolume(3) volpack-1.0b3/man/src/RawVoxels.30000644000265600020320000000704205701332762013547 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetRawVoxels 3 "" VolPack .SH NAME vpSetRawVoxels \- specify an array of volume data .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetRawVoxels(\fIvpc, voxels, size, xstride, ystride, zstride\fB)\fR .FA vpContext *\fIvpc;\fR .FA void *\fIvoxels;\fR .FA int \fIsize;\fR .FA int \fIxstride, ystride, zstride;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIvoxels\fR 3D array of voxels. .IP \fIsize\fR Size of the voxel array in bytes. .IP \fIxstride\fR Number of bytes from the beginning of one voxel to the beginning of the next voxel in the first array dimension. .IP \fIystride\fR Number of bytes from the beginning of one voxel to the beginning of the next voxel in the second array dimension. .IP \fIzstride\fR Number of bytes from the beginning of one voxel to the beginning of the next voxel in the third array dimension. .SH DESCRIPTION \fBvpSetRawVoxels\fR is used to specify a 3D array that contains the volume data. The array must be large enough for the volume dimensions specified with \fBvpSetVolumeSize\fR and the voxel size specified with \fBvpSetVoxelSize\fR. The data in the array may be initialized before or after calling \fBvpSetRawVoxels\fR. .PP Some of the VolPack routines operate faster if the volume is stored in z-major order (\fIxstride < ystride < zstride\fR) but it is not strictly necessary. .PP The voxel array is not automatically deallocated when the context is destroyed with \fBvpDestroyContext\fR. The application is responsible for managing the memory associated with the volume array. .PP The voxel array can be a very large data structure, possibly larger than available main memory. It is sometimes possible to precompute the optimized data structures required for the fast rendering algorithm without explicitly allocating a voxel array. See vpClassifyScalars(3). .PP During the call to \fBvpSetRawVoxels\fR, any existing precomputed volume data structures in the context are destroyed. .SH "STATE VARIABLES" The current voxel array parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_VOXEL_DATA, VP_VOXEL_DATA_SIZE, VP_VOXEL_XSTRIDE, VP_VOXEL_YSTRIDE, VP_VOXEL_ZSTRIDE. .SH ERRORS The routine always returns VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/ShadeTable.30000644000265600020320000000726005701332766013617 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpShadeTable 3 "" VolPack .SH NAME vpShadeTable \- compute the contents of the shading lookup table .SH SYNOPSIS #include .sp .FS vpResult \fBvpShadeTable(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION \fBvpShadeTable\fR computes the contents of the shading lookup table previously specified with \fBvpLookupShader\fR. For each entry in the table, the Phong shading equation is evaluated using the current lighting properties (as specified with \fBvpSetLight\fR), material properties (as specified with \fBvpSetMaterial\fR), and viewing parameters (as specified with the view transformation commands). See vpSetMaterial(3) for a description of the shading calculation. .PP This function should be called before rendering a volume if any of the lighting or material properties have changed or if the viewpoint has changed since the last call to \fBvpShadeTable\fR. It should not be called if shading is performed using a callback function or if the shading lookup tables are initialized by a user-defined routine. .PP There is one state variable that affects the operation of \fBvpShadeTable\fR. If VP_CLAMP_SHADE_TABLE is enabled (see vpEnable(3)), then values are clamped to the range 0.0-255.0 before they are stored in the table. If this option is not enabled then no clamping is performed. Clamping is enabled by default, but can be turned off to achieve special effects. For example, if all of the voxels in a data set have very low opacity then the rendered image may be very dark. To brighten it, multiply all of the material parameter coefficients by a constant, possibly making the values exceed 1.0, and turn off clamping. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_SINGULAR One of the current view transformation matrices is singular. .IP VPERROR_BAD_SHADER The shading lookup tables are sized incorrectly, or one of the voxel fields used to index the tables is invalid, or the number of material types is invalid. .IP VPERROR_BAD_SHADOW The angle between the shadow light vector and the viewing direction is too large (must be less than 45 degrees). Either change the light direction or disable shadows (see vpSetShadowLookupShader). .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpSetLookupShader(3), vpSetLight(3), vpSetMaterial(3) volpack-1.0b3/man/src/VolumeNormals.30000644000265600020320000001173205701332773014423 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpVolumeNormals 3 "" VolPack .SH NAME vpVolumeNormals \- compute surface normal vectors and gradient magnitudes for a volume .SH SYNOPSIS #include .sp .FS vpResult \fBvpVolumeNormals(\fIvpc, scalar_data, length, scalar_field, grad_field, norm_field\fB)\fR .FA vpContext *\fIvpc;\fR .FA unsigned char *\fIscalar_data;\fR .FA int \fIlength;\fR .FA int \fIscalar_field;\fR .FA int \fIgrad_field;\fR .FA int \fInorm_field;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIscalar_data\fR 3D array of scalar samples. .IP \fIlength\fR Size of \fIscalar_data\fR array in bytes. .IP \fIscalar_field\fR Voxel field number indicating the field in which to store the scalar samples. .IP \fIgrad_field\fR Voxel field number indicating the field in which to store the gradient magnitudes of the scalar samples. .IP \fInorm_field\fR Voxel field number indicating the field in which to store encoded surface normal vectors. .SH DESCRIPTION \fBvpVolumeNormals\fR is used to precompute values for voxel fields used in classification and shading algorithms. The input is a 3D array of scalar values; a separate routine is provided for processing scanlines of voxel data (see vpScanlineNormals(3)). For each voxel, the routine computes an approximation for the gradient of the scalar field (using a central-difference operator). From this vector the routine can compute the magnitude of the gradient, which is useful for some classification schemes (see vpSetClassifierTable(3)), and a surface normal vector in the direction of the gradient vector, which is used to implement lighting models (see vpShadeTable(3)). The scalar value, gradient magnitude and surface normal vector are then stored into the fields of the voxel array, which is separate from the array of scalar values. .PP The scalar array must be an array of 8-bit values (other sizes are not currently supported). The dimensions of the array must match the volume dimensions previously specified with \fBvpSetVolumeSize\fR. The \fIsize\fR argument is used to make sure the array has the correct size. The voxel array must also be initialized by calling \fBvpSetRawVoxels\fR prior to calling \fBvpVolumeNormals\fR. .PP The three voxel field number arguments indicate which voxel fields the computed information should be stored into, and which field the scalar samples should be copied to. The field numbers must correspond to appropriately-sized voxel fields previously specified with \fBvpSetVoxelField\fR. Any of these arguments can be the constant VP_SKIP_FIELD, in which case the corresponding quantity is not computed or copied. The voxel fields for the scalar value and the gradient magnitude must be one-byte fields, and the field for the surface normal vector must be a two-byte field. The constants VP_SCALAR_MAX, VP_GRAD_MAX and VP_NORM_MAX give the maximum value that might be stored in each field, respectively. The value stored in the surface normal vector field is actually an encoded surface normal; see vpNormalIndex(3). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SIZE The size of the scalar array does not match the volume dimensions. .IP VPERROR_BAD_VALUE One or more of the voxel fields specified is invalid, or the corresponding voxel field has the wrong size. .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_VOLUME The volume array or volume dimensions have not been specified, or the size of the volume array does not match the volume dimensions. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpNormalIndex(3), vpScanlineNormals(3), vpSetClassifierTable(3), vpSetLookupShader(3) volpack-1.0b3/man/src/Load.30000644000265600020320000001524205701332756012500 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpLoadRawVolume 3 "" VolPack .SH NAME vpLoadRawVolume, vpLoadMinMaxOctree, vpLoadClassifiedVolume, vpLoadContext \- load volume data structures from a file .SH SYNOPSIS #include .sp .FS vpResult \fBvpLoadRawVolume(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpLoadMinMaxOctree(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpLoadClassifiedVolume(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpLoadContext(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIfd\fR File descriptor from \fBopen\fR(2), open for reading. .SH DESCRIPTION These functions are used to load volume data structures into a rendering context from files in the format written by the VolPack file storing routines (see vpStoreRawVolume(3)). .PP \fBvpLoadRawVolume\fR loads a 3D voxel array file. The file includes information about the size of the volume and the layout of the voxels as well as the volume data itself. A new voxel array is allocated, the data is read into the array, and the array is stored in the rendering context. Note that the array will not be freed automatically when the context is destroyed; the application is responsible for freeing the array when appropriate (by using \fBvpGetp\fR with the VP_VOXEL_DATA state variable code to retrieve the array pointer), or for unmapping the voxel array if it has been memory mapped (see below). .PP Any existing min-max octree or preclassified volume data is destroyed when \fBvpLoadRawVolume\fR is called. The information loaded from the file includes all of the parameters set with \fBvpSetVolumeSize\fR, \fBvpSetVoxelSize\fR, \fBvpSetVoxelField\fR and \fBvpSetRawVoxels\fR. The data in the file is automatically byte-swapped if the file was written on an architecture with different byte ordering than the current architecture. A magic constant in the file is used to determine if byte-swapping is necessary. Volume fields that have not been explicitly declared (by calling \fBvpSetVoxelField\fR before storing the voxel array file) cannot be byte-swapped. .PP \fBvpLoadMinMaxOctree\fR loads a min-max octree file. The current 3D voxel array size and voxel layout must match the data in the octree file before the file is loaded; consistency checks are performed. Any existing octree is destroyed and the new octree is stored in the rendering context. Byte-swapping is performed if necessary. .PP \fBvpLoadClassifiedVolume\fR loads a preclassified volume data file. The file includes information about the size of the volume and the layout of the voxels as well as the volume data itself. If the volume matches the size and layout of any existing volume data in the rendering context then the data in the file replaces only the current preclassified volume; otherwise, the old octree is destroyed, the 3D voxel array parameters are zeroed out, and the new size and layout parameters are loaded. The information loaded from the file includes all of the parameters set with \fBvpSetVolumeSize\fR, \fBvpSetVoxelSize\fR and \fBvpSetVoxelField\fR. Byte-swapping is performed if necessary. .PP \fBvpLoadContext\fR loads a rendering context file. The file includes all rendering parameters except volume data and callback functions. The contents of any lookup tables for shading and classification are also loaded. Any existing preclassified volume data or octree are destroyed and the 3D voxel array parameters pointer is zeroed out. The lookup tables are loaded into dynamically allocated arrays, and the application is responsible for freeing those array when necessary; the arrays are not automatically freed when \fBvpDestroyContext\fR is called. In the current implementation byte swapping is not performed so context files from other architectures cannot be read. .PP The function used to read data from the files can be set by calling \fBvpSetCallback\fR with the VP_READ_FUNC option. This could be used to implement a file-compression system, for example. It is also possible to memory-map data from files by setting the VP_MMAP_FUNC option. If this function is set then large data structures are memory mapped from files instead of being copied into memory, when possible. Data that must be byte-swapped cannot be memory mapped. Memory mapping has the advantages that less swap space is required and data is loaded into memory only as it is used. .SH "STATE VARIABLES" The current file I/O parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_READ_FUNC, VP_MMAP_FUNC. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_IO The file reading or memory mapping function returned an error value (in which case the external variable \fBerrno\fR should contain an operating-system specific error code), or the end of the file was reached prematurely. .IP VPERROR_BAD_FILE The data in the file is invalid, usually meaning that it isn't a file written by the appropriate VolPack function. .IP VPERROR_BAD_VOLUME The data in a min-max octree file does not match the current volume size (\fBvpLoadMinMaxOctree\fR only). .IP VPERROR_BAD_VOXEL The data in a min-max octree file does not match the current voxel layout parameters (\fBvpLoadMinMaxOctree\fR only). .SH SEE ALSO VolPack(3), vpCreateContext(3), vpStoreRawVolume(3) volpack-1.0b3/man/src/Rotate.30000644000265600020320000000650505701332764013060 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpRotate 3 "" VolPack .SH NAME vpRotate \- multiply the current transformation matrix by a rotation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpRotate(\fIvpc, axis, degrees\fB)\fR .FA vpContext \fI*vpc;\fR .FA int \fIaxis;\fR .FA double \fIdegrees;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIaxis\fR Rotation axis code (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS). .IP \fIdegrees\fR Number of degrees to rotate. .SH DESCRIPTION \fBvpRotate\fR is used to multiply the current transformation matrix by a 4-by-4 rotation matrix. The rotation axis must be one of the three principal viewing axes and is specified with one of the following codes: .DA .ta 15 VP_X_AXIS X axis .br VP_Y_AXIS Y axis .br VP_Z_AXIS Z axis .DE The rotation angle is specified in degrees. A positive angle indicates a clockwise rotation when looking towards the positive direction along the axis. For an X-axis rotation, the rotation matrix is: .DS .ta 4C 12C 20C 28C 1 0 0 0 .br 0 cos(d) sin(d) 0 .br 0 -sin(d) cos(d) 0 .br 0 0 0 1 .DE where d stands for the \fIdegrees\fR argument. For a Y-axis rotation, the rotation matrix is: .DS .ta 4C 12C 20C 28C cos(d) 0 -sin(d) 0 .br 0 1 0 0 .br sin(d) 0 cos(d) 0 .br 0 0 0 1 .DE For a Z-axis rotation, the rotation matrix is: .DS .ta 4C 12C 20C 28C cos(d) sin(d) 0 0 .br -sin(d) cos(d) 0 0 .br 0 0 1 0 .br 0 0 0 1 .DE .PP Use \fBvpCurrentMatrix\fR to set the current transformation matrix. By default, the rotation matrix is post-multiplied (M = M*R where M is the current matrix and R is the rotation matrix). The VP_CONCAT_MODE option to \fBvpSeti\fR can be used to select pre-multiplication. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX, VP_CONCAT_MODE. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fIaxis\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3) volpack-1.0b3/man/src/Image.30000644000265600020320000001207605701332755012644 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetImage 3 "" VolPack .SH NAME vpSetImage \- specify an image array .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetImage(\fIvpc, image, width, height, scan_bytes, pixel_type\fB)\fR .FA vpContext *\fIvpc;\fR .FA unsigned char *\fIimage;\fR .FA int \fIwidth, height;\fR .FA int \fIscan_bytes;\fR .FA int \fIpixel_type;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIimage\fR 2D array for storing result images. .IP \fIwidth\fR Width of image in pixels. .IP \fIheight\fR Height of image in pixels. .IP \fIscan_bytes\fR Number of bytes per scanline in image array. .IP \fIpixel_type\fR Code indicating the format of each pixel in the array. .SH DESCRIPTION \fBvpSetImage\fR is used to specify a buffer for storing the result image during rendering. The \fIwidth\fR and \fIheight\fR parameters specify the size of the result image. The clipping window (see vpWindow(3) or vpWindowPHIGS(3)) is scaled to exactly match the specified size. The \fIscan_bytes\fR argument specifies the size of a scanline in the image array, in bytes. This argument can be used to add padding to the end of each scanline to satisfy alignment restrictions (e.g.\ raster operations sometimes require the beginning of each scanline to lie on a word boundary). The \fIpixel_type\fR argument specifies the format of a pixel. The following formats are supported: .IP VP_ALPHA Each pixel is one byte and contains an 8-bit alpha channel (containing an opacity or coverage value for the pixel). .IP VP_LUMINANCE Each pixel is one byte and contains an 8-bit grayscale intensity. .IP VP_LUMINANCEA Each pixel is two bytes and contains an 8-bit grayscale intensity followed by an 8-bit alpha channel. .IP VP_RGB Each pixel is three bytes and contains an RGB color (8 bits/channel). The R channel is stored first, followed by G and then B. .IP VP_RGBA Each pixel is four bytes and contains an RGBA color with an alpha channel (8 bits/channel). The R channel is stored first, followed by G, B and A. .IP VP_BGR Each pixel is three bytes and contains an RGB color (8 bits/channel). The B channel is stored first, follow by G and then R. .IP VP_ABGR Each pixel is four bytes and contains an RGBA color with an alpha channel (8 bits/channel). The A channel is stored first, followed by B, G and R. .PP The formats VP_LUMINANCE and VP_LUMINANCEA may only be used with grayscale shaders (the \fIcolor_channels\fR argument to \fBvpSetLookupShader\fR must be 1, or if you are using a callback function for shading you must use the VP_GRAY_SHADE_FUNC argument to \fBvpSetCallback\fR). The formats VP_RGB, VP_RGBA, VP_BGR and VP_ABGR may only be used with color shaders. The format VP_ALPHA may be used with either type of shader. .PP The size of the \fIimage\fR array must be: .DS unsigned char \fIimage[height][scan_bytes];\fR .DE The \fIscan_bytes\fR argument must be at least \fIwidth\fR times the number of bytes per pixel. Pixels in a horizontal scanline are packed next to each other, regardless of the size of the pixel. Any extra padding bytes at the end of a scanline are not modified. .PP The alpha channel may be used to composite the rendered image against a background image. Alpha gives the fraction of the background that is visible through the rendered image (0 for fully visible, 255 for fully obscured). As an example, to change the background color of the image to a solid color C, modify the color of each pixel in the image according to the formula: .DS color(x,y) += C * (1 - alpha(x,y)/255) .DE .SH "STATE VARIABLES" The current image array properties can be retrieved with the following state variable codes (see vpGeti(3)): VP_IMAGE, VP_IMAGE_WIDTH, VP_IMAGE_HEIGHT, VP_IMAGE_SCAN_SIZE, VP_PIXEL_TYPE. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpRenderRawVolume(3) volpack-1.0b3/man/src/MinMaxOctree.30000644000265600020320000001455305701332760014153 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpCreateMinMaxOctree 3 "" VolPack .SH NAME vpCreateMinMaxOctree, vpMinMaxOctreeThreshold, vpDestroyMinMaxOctree \- create/destroy a min-max octree for optimized rendering .SH SYNOPSIS #include .sp .FS vpResult \fBvpCreateMinMaxOctree(\fIvpc, root_node_size, base_node_size\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIroot_node_size, base_node_size;\fR .FE .sp .FS vpResult \fBvpMinMaxOctreeThreshold(\fIvpc, param_num, range\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIparam_num, range;\fR .FE .sp .FS vpResult \fBvpDestroyMinMaxOctree(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIroot_node_size\fR Number of voxels per side in the top level (largest nodes) of the octree. Not currently used. .IP \fIbase_node_size\fR Number of voxels per side in the bottom level (smallest nodes) of the octree. Must be a power of 2. .IP \fIparam_num\fR Identifying number of one parameter of the opacity transfer function. .IP \fIrange\fR Range threshold for one parameter of the opacity transfer function. If an octree node spans a larger range then it is subdivided. .SH DESCRIPTION These routines are used to create and destroy a min-max octree, an internal data structure that is used to accelerate classifying and rendering volume data in a 3D voxel array. The octree is a hierarchical data structure that contains minimum and maximum values for each voxel field. It does not duplicate the data in the voxel array. The octree is not used with preclassified volumes (see vpClassifyVolume(3)). .PP Before creating an octree, declare a 3D voxel array using \fBvpSetVolumeSize, vpSetVoxelSize, vpSetVoxelField\fR and \fBvpSetRawVoxels,\fR and initialize parameters for the opacity transfer function by calling \fBvpSetClassifierTable\fR. Then initialize the voxel data in the array. The lookup tables for the opacity transfer function do not need to be initialized. .PP Now call \fBvpMinMaxOctreeThreshold\fR once for each parameter to the opacity transfer function. The parameter number is the same number as the parameter number you would pass to \fBvpClassifierTable.\fR The \fIrange\fR argument specifies a "small" range of values for the corresponding parameter. The opacity of a voxel should not vary much for voxels within this range of parameter space. Choosing a value which is too small or too large may result in a reduced performance benefit during rendering. The function \fBvpOctreeMask\fR can be used to visualize the effectiveness of various parameter ranges. Note that you must choose the voxel field associated with each opacity transfer function parameter in advance of creating the octree (by calling \fBvpSetClassiferTable\fR), but the opacity transfer function itself does not need to be known since the lookup tables do not need to be initialized. In the current implementation all of the parameters must be one or two-byte voxel fields; four-byte fields are not allowed. .PP Finally, call \fBvpCreateMinMaxOctree\fR to actually compute the octree. The arguments specify the largest and smallest node size. These values can be used to trade off storage size of the octree for increased resolution. The octree is stored in the rendering context and is used automatically in subsequent calls to \fBvpClassifyVolume\fR and \fBvpRenderRawVolume.\fR Only one octree may be stored in a context at a time. If an octree already exists when \fBvpCreateMinMaxOctree\fR is called then the old octree is destroyed. .PP If the data in the voxel array changes then the min-max octree must be explicitly recomputed by calling \fBvpCreateMinMaxOctree\fR again before the next call to \fBvpClassifyVolume\fR or \fBvpRenderRawVolume.\fR .PP \fBvpDestroyMinMaxOctree\fR destroys the current min-max octree and frees the associated storage. .SH "STATE VARIABLES" The current octree parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CLASSIFY_FIELD_COUNT, VP_CLASSIFY_FIELDS, VP_MMOCTREE_THRESHOLDS, VP_MMOCTREE_SIZE. .SH ERRORS The normal return value for all three functions is VP_OK. \fBvpMinMaxOctreeThreshold\fR can return the following error value: .IP VPERROR_BAD_VALUE The parameter number is invalid. .PP \fBvpCreateMinMaxOctree\fR can return the following error values: .IP VPERROR_BAD_VALUE The node size arguments are not a power of two. .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified, or the number of parameters to the opacity transfer function has been incorrectly specified. .IP VPERROR_BAD_VOLUME The volume array or volume dimensions have not been specified, or the size of the volume array does not match the volume dimensions. .IP VPERROR_BAD_CLASSIFIER The fields specified as parameters to the opacity transfer function are invalid or do not have valid sizes. .IP VPERROR_LIMIT_EXCEEDED The volume is too large, so the maximum size of the octree has been exceeded. Change the constant VP_MAX_OCTREE_LEVELS in volpack.h and recompile the VolPack library. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpClassifyVolume(3), vpOctreeMask(3), vpRenderRawVolume(3) volpack-1.0b3/man/src/makelinks0000755000265600020320000000426005673376216013446 00000000000000#!/bin/csh -f cd ../man3 ln -s ../src/BruteForce.3 vpBruteForceRender.3 ln -s ../src/Callback.3 vpSetCallback.3 ln -s ../src/ClientData.3 vpSetClientData.3 ln -s ../src/ClsfyScalar.3 vpClassifyScalars.3 ln -s ../src/ClsfyScan.3 vpClassifyScanline.3 ln -s ../src/ClsfyTable.3 vpSetClassifierTable.3 ln -s ../src/ClsfyVolume.3 vpClassifyVolume.3 ln -s ../src/Context.3 vpCreateContext.3 ln -s ../src/CurrentMatrix.3 vpCurrentMatrix.3 ln -s ../src/Debug.3 vpSetDebug.3 ln -s ../src/DepthCueing.3 vpSetDepthCueing.3 ln -s ../src/Enable.3 vpEnable.3 ln -s ../src/Error.3 vpGetError.3 ln -s ../src/Extract.3 vpExtract.3 ln -s ../src/Filter.3 vpSetFilter.3 ln -s ../src/FilterTab.3 vpBoxFilter.3 ln -s ../src/Get.3 vpGeti.3 ln -s ../src/GetImage.3 vpGetImage.3 ln -s ../src/GetLight.3 vpGetLight.3 ln -s ../src/GetMaterial.3 vpGetMaterial.3 ln -s ../src/GetMatrix.3 vpGetMatrix.3 ln -s ../src/Identity.3 vpIdentityMatrix.3 ln -s ../src/Image.3 vpSetImage.3 ln -s ../src/Light.3 vpSetLight.3 ln -s ../src/LinAlgebra.3 LinearAlgebra.3 ln -s ../src/Load.3 vpLoadRawVolume.3 ln -s ../src/LookupShader.3 vpSetLookupShader.3 ln -s ../src/Material.3 vpSetMaterial.3 ln -s ../src/MinMaxOctree.3 vpCreateMinMaxOctree.3 ln -s ../src/MultMatrix.3 vpMultMatrix.3 ln -s ../src/NormalIndex.3 vpNormalIndex.3 ln -s ../src/OctreeMask.3 vpOctreeMask.3 ln -s ../src/Ramp.3 vpRamp.3 ln -s ../src/RawVoxels.3 vpSetRawVoxels.3 ln -s ../src/Render.3 vpRenderRawVolume.3 ln -s ../src/Resample.3 vpResample.3 ln -s ../src/Rotate.3 vpRotate.3 ln -s ../src/Scale.3 vpScale.3 ln -s ../src/ScanNormals.3 vpScanlineNormals.3 ln -s ../src/Set.3 vpSeti.3 ln -s ../src/SetMatrix.3 vpSetMatrix.3 ln -s ../src/ShadeTable.3 vpShadeTable.3 ln -s ../src/Shadow.3 vpSetShadowLookupShader.3 ln -s ../src/Store.3 vpStoreRawVolume.3 ln -s ../src/Timer.3 vpGetTimer.3 ln -s ../src/TracePixel.3 vpTracePixel.3 ln -s ../src/Translate.3 vpTranslate.3 ln -s ../src/Transpose.3 vpTranspose.3 ln -s ../src/VolPack.3 VolPack.3 ln -s ../src/VolumeNormals.3 vpVolumeNormals.3 ln -s ../src/VolumeSize.3 vpSetVolumeSize.3 ln -s ../src/VoxelField.3 vpSetVoxelField.3 ln -s ../src/VoxelSize.3 vpSetVoxelSize.3 ln -s ../src/Window.3 vpWindow.3 ln -s ../src/WindowPHIGS.3 vpWindowPHIGS.3 volpack-1.0b3/man/src/NormalIndex.30000644000265600020320000000712505701332761014036 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpNormalIndex 3 "" VolPack .SH NAME vpNormalIndex, vpNormal \- encode/decode a surface normal vector .SH SYNOPSIS #include .sp .FS int \fBvpNormalIndex(\fInx, ny, nz\fB)\fR .FA double \fInx, ny, nz;\fR .FE .sp .FS vpResult \fBvpNormal(\fIn, nx_ptr, ny_ptr, nz_ptr\fB)\fR .FA int \fIn;\fR .FA double *\fInx_ptr,\fR *\fIny_ptr,\fR *\fInz_ptr;\fR .FE .SH ARGUMENTS .IP \fInx\fR X component of surface normal vector. .IP \fIny\fR Y component of surface normal vector. .IP \fInz\fR Z component of surface normal vector. .IP \fIn\fR Encoded surface normal vector. .IP \fInx_ptr\fR Pointer to storage for returning X component of surface normal vector. .IP \fIny_ptr\fR Pointer to storage for returning Y component of surface normal vector. .IP \fInz_ptr\fR Pointer to storage for returning Z component of surface normal vector. .SH DESCRIPTION These two routines are used to convert surface normal vectors between encoded and unencoded forms. An unencoded vector is described by its three components (stored as double-precision floating point numbers) in an orthogonal coordinate system. An encoded vector is described by a single integer that is suitable for use as an index in a shading lookup table. VolPack's built-in shading routines require the use of surface normal vectors encoded using \fBvpNormalIndex\fR (or one of the higher-level normal vector computation routines, \fBvpVolumeNormals\fR or \fBvpScanlineNormals\fR). User-defined shading routines or lookup tables are not required to use encoded normal vectors. .PP \fBvpNormalIndex\fR computes an encoded vector from the components of an unencoded vector. The vector must be normalized (\fInx*nx + ny*ny + nz*nz = 1\fR). The maximum possible value of an encoded normal is given by the constant VP_NORM_MAX. .PP \fBvpNormal\fR computes the components of a vector from the encoded integer form. The encoded normal has less resolution than the unencoded form, so the vector computed by \fBvpNormal\fR may not be equal to the original vector passed to \fBvpNormalIndex\fR. .SH ERRORS \fBvpNormalIndex\fR always returns a valid encoded normal vector. .PP \fBvpNormal\fR normally returns the value VP_OK. The following return value is possible: .IP VPERROR_BAD_VALUE The encoded normal vector is invalid. .SH SEE ALSO VolPack(3), vpVolumeNormals(3), vpScanlineNormals(3) volpack-1.0b3/man/src/GetImage.30000644000265600020320000001027605701332752013301 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetImage 3 "" VolPack .SH NAME vpGetImage \- get a field of the intermediate image .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetImage(\fIvpc, image, width, height, scan_bytes, pixel_type, image_type\fB)\fR .FA vpContext *\fIvpc;\fR .FA void *\fIimage;\fR .FA int \fIwidth, height;\fR .FA int \fIscan_bytes;\fR .FA int \fIpixel_type, image_type;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIimage\fR 2D array for storing result image. .IP \fIwidth\fR Width of array in pixels. .IP \fIheight\fR Height of array in pixels. .IP \fIscan_bytes\fR Number of bytes per scanline in array. .IP \fIpixel_type\fR Code indicating the format of each pixel in the array. .IP \fIimage_type\fR Code indicating the source of the image data (VP_IMAGE_BUFFER or VP_SHADOW_BUFFER). .SH DESCRIPTION This is a debugging function. It is used to retrieve the contents of one of the temporary rendering buffers used during rendering, namely the intermediate image or the shadow buffer. Rendering consists of two stages: the volume is resampled and composited into the intermediate image to produce a distorted volume rendering, and then the intermediate image is warped into the final image. If shadows are enabled then the shadow buffer is used during the first stage to incrementally compute which voxels are illuminated by the light source. This function returns images produced during the first stage, before the final warp. .PP This function may be called after a call to one of the rendering routines (see vpRenderRawVolume(3)). If the \fIimage_type\fR argument is VP_IMAGE_BUFFER then data will be copied from the intermediate image. The \fIpixel_type\fR argument specifies what information to copy and the format for storing the data in the output array. The possible values for \fIpixel_type\fR are the same as for the \fIpixel_type\fR argument to \fBvpSetImage.\fR For instance, use VP_LUMINANCE to extract the grayscale intensity (assuming the current shader produces grayscale pixels). .PP If the \fIimage_type\fR argument is VP_SHADOW_BUFFER then data will be copied from the shadow buffer. The only valid option for \fIpixel_type\fR is VP_ALPHA, since no color information is stored in the shadow buffer. .PP See \fBvpSetImage\fR for details on the pixel formats, the layout of the output array, and the remaining arguments. .PP To find the required size for the result array, use \fBvpGeti\fR with the VP_INTERMEDIATE_WIDTH and VP_INTERMEDIATE_HEIGHT options (when \fIimage_type\fR is VP_IMAGE_BUFFER) or the VP_SHADOW_WIDTH and VP_SHADOW_HEIGHT options (when \fIimage_type\fR is VP_SHADOW_BUFFER). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SIZE The destination array size is incorrect or there is no intermediate image. .IP VPERROR_BAD_OPTION The \fIfield\fR argument is invalid. .SH SEE ALSO VolPack(3), vpRenderRawVolume(3), vpGeti(3) volpack-1.0b3/man/src/SetMatrix.30000644000265600020320000000413105701332766013535 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetMatrix 3 "" VolPack .SH NAME vpSetMatrix \- load a matrix into the current transformation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetMatrix(\fIvpc, m\fB)\fR .FA vpContext *\fIvpc;\fR .FA vpMatrix4 \fIm;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIm\fR Input matrix. .SH DESCRIPTION \fBvpSetMatrix\fR is used to load a 4-by-4 transformation matrix into the current transformation matrix. Use \fBvpCurrentMatrix\fR to set the current transformation matrix. .SH "STATE VARIABLES" The current transformation matrix parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpGetMatrix(3) volpack-1.0b3/man/src/Translate.30000644000265600020320000000507505701332771013556 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpTranslate 3 "" VolPack .SH NAME vpTranslate \- multiply the current transformation matrix by a translation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpTranslate(\fIvpc, tx, ty, tz\fB)\fR .FA vpContext \fI*vpc;\fR .FA double *\fItx,\fR *\fIty,\fR *\fItz;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fItx\fR X component of translation vector. .IP \fIty\fR Y component of translation vector. .IP \fItz\fR Z component of translation vector. .SH DESCRIPTION \fBvpTranslate\fR is used to multiply the current transformation matrix by a 4-by-4 translation matrix. The translation matrix is: .DS .ta 2C 6C 10C 14C 1 0 0 tx .br 0 1 0 ty .br 0 0 1 tz .br 0 0 0 1 .DE .PP Use \fBvpCurrentMatrix\fR to set the current transformation matrix. By default, the transformation matrix is post-multiplied (M = M*T where M is the current matrix and T is the translation matrix). The VP_CONCAT_MODE option to \fBvpSeti\fR can be used to select pre-multiplication. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX, VP_CONCAT_MODE. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3) volpack-1.0b3/man/src/BruteForce.30000644000265600020320000000353705701332742013660 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpBruteForceRender 3 "" VolPack .SH NAME vpBruteForceRender \- render using a simple brute-force method .SH SYNOPSIS #include .sp .FS vpResult \fBvpBruteForceRender(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION This function is for debugging purposes only. It performs the same function as \fBvpRenderRawVolume\fR, but uses a simpler, very inefficient algorithm. The two functions should produce identical results. .SH SEE ALSO VolPack(3), vpRenderRawVolume(3) volpack-1.0b3/man/src/ScanNormals.30000644000265600020320000001302305701332765014034 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpScanlineNormals 3 "" VolPack .SH NAME vpScanlineNormals \- compute surface normal vectors and gradient magnitudes for a scanline .SH SYNOPSIS #include .sp .FS vpResult \fBvpScanlineNormals(\fIvpc, length, scalar_data, scalar_minus_y, scalar_plus_y, scalar_minus_z, scalar_plus_z, voxel_data, scalar_field, grad_field, norm_field\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIlength;\fR .FA unsigned char *\fIscalar_data;\fR .FA unsigned char *\fIscalar_minus_y,\fR *\fIscalar_plus_y;\fR .FA unsigned char *\fIscalar_minus_z,\fR *\fIscalar_plus_z;\fR .FA void *\fIvoxel_data;\fR .FA int \fIscalar_field;\fR .FA int \fIgrad_field;\fR .FA int \fInorm_field;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIlength\fR Size of \fIscalar_data\fR array in bytes. .IP \fIscalar_data\fR 1D array of scalar samples. .IP \fIscalar_minus_y\fR 1D array of scalar samples adjacent to \fIscalar_data\fR in the -Y direction. .IP \fIscalar_plus_y\fR 1D array of scalar samples adjacent to \fIscalar_data\fR in the +Y direction. .IP \fIscalar_minus_z\fR 1D array of scalar samples adjacent to \fIscalar_data\fR in the -Z direction. .IP \fIscalar_plus_z\fR 1D array of scalar samples adjacent to \fIscalar_data\fR in the +Z direction. .IP \fIvoxel_data\fR 1D array of voxels for storing results. .IP \fIscalar_field\fR Voxel field number indicating the field in which to store the scalar samples. .IP \fIgrad_field\fR Voxel field number indicating the field in which to store the gradient magnitudes of the scalar samples. .IP \fInorm_field\fR Voxel field number indicating the field in which to store encoded surface normal vectors. .SH DESCRIPTION \fBvpScanlineNormals\fR is used to precompute values for voxel fields used in classification and shading algorithms. The input is a collection of 5 adjacent 1D arrays of scalar values; a separate routine is provided for processing a full 3D array of voxel data (see vpVolumeNormals(3)). \fBvpScanlineNormals\fR is useful for loading large volumes into memory scanline-by-scanline and precomputing voxel fields incrementally, instead of loading a complete copy of the 3D scalar array in addition to the voxel array. In all other respects this routine is identical in function to \fBvpVolumeNormals\fR. .PP The 1D scalar arrays must be arrays of 8-bit values (other sizes are not currently supported). The \fIlength\fR parameter indicates both the size and the number of elements in each of the scalar arrays. \fBvpScanlineNormals\fR performs the computation described in vpVolumeNormals(3), but only for the single scanline specified by \fIscalar_data\fR. The other four scanline arguments must be the immediately adjacent scanlines and are used to compute the gradient. .PP The results are stored in the \fIvoxel_data\fR array which must have space for the same number of voxels as the length of one scalar scanline. The size of a voxel must be specified with \fBvpSetVoxelSize\fR before calling \fBvpScanlineNormals,\fR but it is not necessary to call \fBvpSetRawVoxels.\fR The arguments \fIscalar_field, grad_field\fR and \fInorm_field\fR specify which voxel fields the computed quantities should be stored into. The field numbers must correspond to appropriately-sized voxel fields previously specified with \fBvpSetVoxelField\fR. Any of these arguments can be the constant VP_SKIP_FIELD, in which case the corresponding quantity is not computed or copied. The voxel fields for the scalar value and the gradient magnitude must be one-byte fields, and the field for the surface normal vector must be a two-byte field. The constants VP_SCALAR_MAX, VP_GRAD_MAX and VP_NORM_MAX give the maximum value that might be stored in each field, respectively. The value stored in the surface normal vector field is actually an encoded surface normal; see vpNormalIndex(3). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE One or more of the voxel fields specified is invalid, or the corresponding voxel field has the wrong size. .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpNormalIndex(3), vpVolumeNormals(3), vpSetClassifierTable(3), vpSetLookupShader(3) volpack-1.0b3/man/src/GetMaterial.30000644000265600020320000000552605701332753014020 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetMaterial 3 "" VolPack .SH NAME vpGetMaterial \- get material properties .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetMaterial(\fIvpc, material, property, surface_side, r_ptr, g_ptr, b_ptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fImaterial;\fR .FA int \fIproperty;\fR .FA int \fIsurface_side;\fR .FA double *\fIr_ptr,\fR *\fIg_ptr,\fR *\fIb_ptr;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fImaterial\fR A constant specifying a particular material number (VP_MATERIAL0, VP_MATERIAL1, ..., VP_MATERIAL5). .IP \fIproperty\fR A constant specifying one material property (VP_AMBIENT, VP_DIFFUSE, VP_SPECULAR or VP_SHINYNESS). .IP \fIsurface_side\fR A constant specifying one side of the material surface (VP_EXTERIOR or VP_INTERIOR). .IP "\fIr_ptr, g_ptr, b_ptr\fR" Locations to store the RGB components of the color associated with the property. For VP_SHINYNESS, \fIg_ptr\fR and \fIb_ptr\fR are not used. .SH DESCRIPTION \fBvpGetMaterial\fR is used to get the properties of a material type. The arguments are exactly analogous to \fBvpSetMaterial\fR except that the \fIsurface_side\fR argument may not be VP_BOTH_SIDES, and the final three arguments are pointers to locations for storing the material properties. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE The material number is invalid. .IP VPERROR_BAD_OPTION Either the \fIsurface_side\fR or \fIproperty\fR arguments are invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetMaterial(3) volpack-1.0b3/man/src/Extract.30000644000265600020320000001501705701332750013225 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpExtract 3 "" VolPack .SH NAME vpExtract \- extract one field from a rectangular region of a volume .SH SYNOPSIS #include .sp .FS vpResult \fBvpExtract(\fIvpc, volume_type, x0, y0, z0, x1, y1, z1, field, dst, dst_size, dst_xstride, dst_ystride, dst_zstride\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIvolume_type;\fR .FA int \fIx0, y0, z0;\fR .FA int \fIx1, y1, z1;\fR .FA int \fIfield;\fR .FA void *\fIdst;\fR .FA int \fIdst_size;\fR .FA int \fIdst_xstride, dst_ystride, dst_zstride;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIvolume_type\fR A code indicating which volume data structure to extract the region from (VP_RAW_VOLUME, VP_CLASSIFIED_VOLUME, VP_CLX_VOLUME, VP_CLY_VOLUME or VP_CLZ_VOLUME) .IP "\fIx0, y0, z0\fR" Origin of the extracted region in the voxel array. .IP "\fIx1, y1, z1\fR" Opposite corner of the extracted region in the voxel array. .IP \fIfield\fR A voxel field number identifying the field to extract, or one of these special codes: VP_OPACITY_FIELD, VP_CORRECTED_OPAC_FIELD, VP_COLOR_FIELD. .IP \fIdst\fR Destination array. .IP \fIdst_size\fR Size of destination array in bytes. .IP "\fIdst_xstride, dst_ystride, dst_zstride\fR" Strides (in bytes) for the X, Y and Z dimensions of the destination array. .SH DESCRIPTION \fBvpExtract\fR is used to extract one field from a rectangular region of the 3D voxel array or the preclassified volume and store the result in a separate array. It is also possible to retrieve computed voxel opacities or colors. .PP The \fIvolume_type\fR argument is used to choose which data structure the region should be extracted from. The choices are: .IP VP_RAW_VOLUME Extract from the 3D voxel array (see vpSetRawVoxels(3)). .IP VP_CLASSIFIED_VOLUME Extract from the preclassified volume (see vpClassifyVolume(3)). The are three copies of the voxel data in the preclassified volume, one for each principal viewing axis. The copy which will result in the fastest access (best memory stride) is selected. .IP VP_CLX_VOLUME Extract from the preclassified volume used for X-axis viewing. .IP VP_CLY_VOLUME Extract from the preclassified volume used for Y-axis viewing. .IP VP_CLZ_VOLUME Extract from the preclassified volume used for Z-axis viewing. .PP The last three choices for the \fIvolume_type\fR argument are usually used only for debugging. .PP The next six arguments give the coordinates of the corners of the extracted region in the volume. The coordinates are indexes into the array. .PP The \fIfield\fR argument is used to select which voxel field to extract. Any of the voxel field numbers previously specified with \fBvpVoxelField\fR may be specified. The output array must be sized appropriately for the dimensions of the region and the size of the extracted field. The following special constants may also be used instead of a voxel field number: .IP VP_OPACITY_FIELD Return voxel opacities for voxels in the indicated region. If the 3D voxel array is selected then the opacities are computed on-the-fly using the current opacity transfer function. The minimum opacity threshold is ignored. If the preclassified volume is selected then the precomputed opacities are extracted. Opacities below the minimum opacity threshold at the time the volume was classified are set to 0. The output array should have type unsigned char, and the opacities are stored as number between 0 (transparent) and 255 (opaque). .IP VP_CORRECTED_OPAC_FIELD This option is the same as the VP_OPACITY_FIELD option, except that voxel opacities are corrected for the current view transformation. The opacity transfer function is assumed to produce the opacity of a voxel viewed perpendicular to one face of the volume with no scale factor. If the voxel has been scaled or rotated with respect to the viewer then the apparent opacity must be corrected. .IP VP_COLOR_FIELD Return voxel colors for voxels in the indicated region. The colors are computed on-the-fly using the current shading, lighting and material parameters. The output array should have type unsigned char, and each color channel is stored as number between 0 (off) and 255 (full intensity). The number of color channels per pixels is determined by the current shading parameters. (Not currently supported for preclassified volumes.) .PP The remaining arguments specify the output array, its size (for error checking), and the stride for each dimension (to allow padding the end of scanlines or storing the result in a higher-dimension array). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE The volume coordinates are out of bounds or invalid (x0 > x1, etc.), or the field number is invalid. .IP VPERROR_BAD_SIZE The destination array size is incorrect. .IP VPERROR_BAD_VOLUME The volume data does not exist. .IP VPERROR_BAD_OPTION The \fIvolume_type\fR argument is invalid. .IP VPERROR_BAD_VOLUME The volume size or data is missing or invalid. .IP VPERROR_BAD_VOXEL The voxel fields are incorrectly defined. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function is incorrectly specified. .IP VPERROR_BAD_SHADER The shading parameters have been incorrectly specified. .IP VPERROR_SINGULAR One or more of the view transformation matrices is singular. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/Resample.30000644000265600020320000001461205701332763013367 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpResample 3 "" VolPack .SH NAME vpResample, vpResample2D, vpResample3D \- resample an array .SH SYNOPSIS #include .sp .FS vpResult \fBvpResample(\fIvpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, element_type, src_array, dst_array\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fInum_dimens;\fR .FA int \fI*src_dimens, *dst_dimens;\fR .FA int \fI*src_strides, *dst_strides;\fR .FA int \fIelement_type;\fR .FA void \fI*src_array, *dst_array;\fR .FE .sp .FS vpResult \fBvpResample2D(\fIsrc_array, src_x, src_y, dst_array, dst_x, dst_y, element_type, filter_type\fB)\fR .FA void *\fIsrc_array;\fR .FA int \fIsrc_x, src_y;\fR .FA void *\fIdst_array;\fR .FA int \fIdst_x, dst_y;\fR .FA int \fIelement_type;\fR .FA int \fIfilter_type;\fR .FE .sp .FS vpResult \fBvpResample3D(\fIsrc_array, src_x, src_y, src_z, dst_array, dst_x, dst_y, dst_z, element_type, filter_type\fB)\fR .FA void *\fIsrc_array;\fR .FA int \fIsrc_x, src_y, src_z;\fR .FA void *\fIdst_array;\fR .FA int \fIdst_x, dst_y, dst_z;\fR .FA int \fIelement_type;\fR .FA int \fIfilter_type;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fInum_dimens\fR Number of dimensions in the input and output arrays. .IP \fIsrc_dimens\fR Array containing the dimensions of the input array. .IP \fIdst_dimens\fR Array containing the dimensions of the output array. .IP \fIsrc_strides\fR Array containing the strides for each dimension of the input array. .IP \fIdst_strides\fR Array containing the strides for each dimension of the output array. .IP \fIelement_type\fR Constant specifying the data type of the array elements (VP_UCHAR, VP_USHORT, VP_FLOAT). .IP \fIsrc_array\fR Input array containing input data. .IP \fIdst_array\fR Output array for result data. .IP "\fIsrc_x, src_y, src_z\fR" Dimensions of the input array. .IP "\fIdst_x, dst_y, dst_z\fR" Dimensions of the result array. .IP \fIfilter_type\fR Constant specifying one of the predefined filters (VP_BOX_FILTER, VP_LINEAR_FILTER, VP_GAUSSIAN_FILTER, VP_BSPLINE_FILTER, VP_MITCHELL_FILTER). .SH DESCRIPTION \fBvpResample\fR is used to resample an array to a new grid with a different resolution. It can be used to scale up or decimate an array of volume data, for instance. An arbitrary separable space-invariant resampling filter can be specified via a lookup table containing filter weights. The input array may have an arbitrary number of dimensions, but on each call to \fBvpResample\fR only one dimension of the array is resampled. To scale all dimensions call the routine once for each dimension. Transformations other than scales (e.g. rotations and shears) are not supported by these routines. .PP The routines \fBvpResample2D\fR and \fBvpResample3D\fR provide a simpler (but less flexible) interface to \fBvpResample\fR. They take as arguments an input array with its dimensions, an output array with its dimensions, and a constant specifying a filter. The input array is resampled once for each dimension and then stored in the output array. These two routines automatically create a filter weight table and arrays for temporary results. .PP The remainder of this man page describe \fBvpResample\fR. The \fIvpc\fR argument is a VolPack context that contains a description of the resampling filter. Use \fBvpSetFilter\fR to define the filter. The volume data and rendering parameters currently stored in the context are not affected by calls to \fBvpResample\fR. .PP The remaining arguments to \fBvpResample\fR describe the size and layout of the input and output arrays. The two arrays must have the same number of dimensions, specified by \fInum_dimens.\fR The sizes of the dimensions are specified by \fIsrc_dimens\fR and \fIdst_dimens\fR which are 1D arrays with \fInum_dimens\fR elements in each array. \fIsrc_dimens[0]\fR is the size of the input dimension to be resampled. \fIdst_dimens[0]\fR is the size of the output dimension after resampling, so the scale factor is dst_dimens[0] / src_dimens[0]. The remaining elements of \fIsrc_dimens\fR give the sizes of the other input array dimensions in any order (although some orderings result in faster execution due to lower memory overhead). The other output array dimensions are ignored (although they should be the same as the corresponding input array dimensions since only one dimensions is resampled). .PP The \fIsrc_strides\fR and \fIdst_stride\fR arguments are 1D arrays that contain a stride in bytes for each dimension of the input and output arrays, stored in the same order as the dimensions sizes in \fIsrc_dimens\fR. .PP The \fIelement_type\fR argument specifies the data type of each element of the input and output data arrays. The supported types are: .IP VP_UCHAR Unsigned character (1 byte per element). .IP VP_USHORT Unsigned short (2 bytes per element). .IP VP_FLOAT Single-precision floating point (4 bytes per element). .PP Finally, the last two arguments to \fBvpResample\fR are pointers to the first elements of the input and output arrays. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SIZE No filter weight table has been specified. .SH SEE ALSO VolPack(3), vpSetFilter(3) volpack-1.0b3/man/src/CurrentMatrix.30000644000265600020320000001041005701332746014417 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpCurrentMatrix 3 "" VolPack .SH NAME vpCurrentMatrix \- choose the current transformation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpCurrentMatrix(\fIvpc, option\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR A code specifying one of the VolPack transformation matrices (VP_MODEL, VP_VIEW or VP_PROJECT). .SH DESCRIPTION \fBvpCurrentMatrix\fR is used to choose the current transformation matrix. The \fIoption\fR parameter must be one of the following: .DS .ta 15 VP_MODEL modeling transformation .br VP_VIEW viewing transformation .br VP_PROJECT projection transformation .DE Subsequent calls to the matrix transformation functions (\fBvpIdentityMatrix, vpTranslate, vpRotate, vpScale, vpMultMatrix\fR and \fBvpSetMatrix\fR) are applied to the new current transformation matrix. .PP Typically the modeling transformation is used to specify a transformation from object coordinates to world coordinates. In object coordinates the volume data is located inside a unit cube centered at the origin (corners at (-0.5, -0.5, -0.5) and (0.5, 0.5, 0.5)). The default modeling transformation is the identity, so the volume is initially located inside the unit cube in world coordinates. By default, the current matrix is VP_MODEL. The modeling transformation is also applied to light direction vectors (see vpSetLight(3)). .PP The viewing transformation is used for transforming world coordinates into eye coordinates. In eye coordinates the viewer is looking down the Z axis in the negative direction. The default value of the matrix is also the identity, so the viewer is looking down the Z axis in world coordinates as well. Typically this transformation matrix is used to specify the location and direction of the viewer. It is also possible to combine the modeling and viewing matrices (as in the OpenGL viewing model), in which case you can store the composite transformation in either the model or the view matrix set the other matrix to the identity. .PP The projection transformation specifies the transformation from eye coordinates to clip coordinates. In the clip coordinate system the entire viewing frustum lies inside a cube defined by the planes X=1, X=-1, Y=1, Y=-1, Z=1 and Z=-1. This transformation also specifies the type of projection used to produce a 2D image. The 2D image is computed by projecting along the Z axis in the clip coordinate system and then scaling in the X and Y dimensions to the final image size. The routines \fBvpWindow\fR and \fBvpWindowPHIGS\fR are useful for computing projection transformations. .SH "STATE VARIABLES" The current transformation matrix code can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpGetMatrix(3) volpack-1.0b3/man/src/Filter.30000644000265600020320000001015405701332751013036 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetFilter 3 "" VolPack .SH NAME vpSetFilter \- define a resampling filter .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetFilter(\fIvpc, num_taps, num_phases, weights\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fInum_taps, num_phases;\fR .FA float *\fIweights;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fInum_taps\fR Number of filter taps. .IP \fInum_phases\fR Number of filter phases. .IP \fIweights\fR Array containing filter weights. .SH DESCRIPTION \fBvpSetFilter\fR is used to specify a table of filter weights before resampling an array with \fBvpResample\fR. The table can be used to specify an arbitrary separable space-invariant filter. .PP The \fIvpc\fR argument is a VolPack context for storing a description of the resampling filter. The volume data and rendering parameters currently stored in the context are not affected by calls to \fBvpSetFilter\fR or \fBvpResample\fR. .PP The \fInum_taps\fR argument specifies the number of filter taps. When an array is resampled, the number of filter taps is equal to the number of input array elements that contribute to one element of the output array. A filter weight is associated with each tap and determines the contribution of the corresponding input array element to the output array element. Note that when upsampling the number of taps depends only on the support of the filter kernel. When downsampling, the number of taps should also depend on the scale factor (since the filter kernel must also be scaled). .PP The \fInum_phases\fR argument specifies the number of filter phases, which is equal to the number of times the filter kernel is sampled. The more filter phases, the more accurate the filtering operation. However, there is a point of diminishing returns where increasing the number of phases results in very little increase in accuracy, and has the disadvantages of increased storage requirements and potentially poor cache performance. To allow for an efficient implementation, \fInum_phases\fR must be a power of two. .PP The \fIweights\fR array contains the filter weights themselves. The array should have dimensions: .DS float weights[num_phases][num_taps]; .DE Each element should normally be a number between 0.0 and 1.0 (negative values are also possible but can lead to ringing), and for any particular phase the entries for all of the taps should sum to 1.0 (or else ripple is introduced into constant regions of the filtered array). .PP The easiest way to initialize the weight table is to call one of the predefined routines described in the vpBoxFilter(3) man page. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE Either \fInum_taps\fR is non-positive or \fInum_phases\fR is not a positive power of two. .SH SEE ALSO VolPack(3), vpBoxFilter(3), vpResample(3) volpack-1.0b3/man/src/VolumeSize.30000644000265600020320000000443405701332774013724 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetVolumeSize 3 "" VolPack .SH NAME vpSetVolumeSize \- define the dimensions of a volume .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetVolumeSize(\fIvpc, xlen, ylen, zlen\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIxlen, ylen, zlen;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIxlen\fR Size of first dimension of the volume in voxels. .IP \fIylen\fR Size of the second dimension of the volume in voxels. .IP \fIzlen\fR Size of the third dimension of the volume in voxels. .SH DESCRIPTION \fBvpSetVolumeSize\fR is used to define the dimensions of a volume. It must be called before volume data is loaded into a rendering context. Any existing precomputed volume data structures in the context are destroyed. .SH "STATE VARIABLES" The current volume dimensions may be retrieved with the following state variable codes (see vpGeti(3)): VP_XLEN, VP_YLEN, VP_ZLEN. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3)volpack-1.0b3/man/src/Render.30000644000265600020320000001403505701332763013035 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpRenderRawVolume 3 "" VolPack .SH NAME vpRenderRawVolume, vpRenderClassifiedVolume \- render a volume .SH SYNOPSIS #include .sp .FS vpResult \fBvpRenderRawVolume(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .sp .FS vpResult \fBvpRenderClassifiedVolume(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION These routines are used to render a volume using the parameters in a rendering context. \fBvpRenderRawVolume\fR renders the data in the current voxel array and stores the result in the current image array. If an octree is present in the context (see vpCreateMinMaxOctree(3)) then it is used to accelerate rendering. \fBvpRenderClassifiedVolume\fR is identical in function except that it renders the current preclassified volume (see vpClassifyVolume(3)) instead of the voxel array, and the octree is not used. .PP \fBvpRenderClassifiedVolume\fR should be used when the same volume is rendered multiple times with the same opacity transfer function. This rendering mode is the fastest. The opacity transfer function must not change because the voxel opacities must be fixed to compute a preclassified volume. .PP \fBvpRenderRawVolume\fR should be used when the volume data or the opacity transfer function changes in between renderings. If the volume data remains fixed then a min-max octree should be computed to accelerate rendering. Rendering is significantly faster with an octree than without, although it is still slower than rendering with \fBvpRenderClassifiedVolume\fR. .PP Before the rendering routines are called the rendering context must be initialized to set the volume parameters, classification parameters (\fBvpRenderRawVolume\fR only), viewing parameters, shading and lighting parameters, and image array. See VolPack(3) for a list of relevant functions. .PP One important state variable should be adjusted before calling the rendering routines: the maximum opacity threshold. This number specifies a threshold value for the opacity of an image pixel. If the opacity of the pixel reaches the threshold then no more voxels are composited into the pixel. The threshold should be a number slightly less than one (0.95 is a good value); numbers closer to 1.0 result in longer rendering times, but less error. The value of the threshold is changed by calling \fBvpSetd\fR with the VP_MAX_RAY_OPACITY option. The default value is 1.0. .PP There are two additional state variables that can be adjusted to set the size of an internal data structure. During rendering, a work buffer called the intermediate image is used to hold temporary results. The size of this data structure depends on the size of the volume and the current view transformation matrix. Over the course of an animation sequence the intermediate image may have to be enlarged multiple times, resulting in many calls to the memory allocator. Normally the overhead of reallocating the data structure is negligible and can be ignored. However, this overhead can be eliminated by specifying hints for the maximum size of the intermediate image. The data structure will then be allocated once, and will never be reallocated unless an even larger intermediate image is required. To set the size hints, call \fBvpSeti\fR with the VP_INT_WIDTH_HINT and VP_INT_HEIGHT_HINT state variable codes. If the viewing transformation does not include any scaling, then the maximum possible size of each dimension of the intermediate image is twice the size of the largest dimension of the volume. To get a more precise bound, the intermediate image size required for rendering a volume with the current viewing parameters can be found by calling \fBvpGeti\fR with the VP_INTERMEDIATE_WIDTH and VP_INTERMEDIATE_HEIGHT state variable codes. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SHADER The shading lookup tables are sized incorrectly, or one of the voxel fields used to index the tables is invalid, or the number of material types is invalid. .IP VPERROR_SINGULAR One of the current view transformation matrices is singular. .IP VPERROR_BAD_VOLUME The volume size has not been set or is invalid, or there is no volume data. .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. (\fBvpRenderRawVolume\fR only) .IP VPERROR_BAD_SHADOW The angle between the shadow light vector and the viewing direction is too large (must be less than 45 degrees). Either change the light direction or disable shadows (see vpSetShadowLookupShader). .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/Context.30000644000265600020320000000432605701332746013245 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpCreateContext 3 "" VolPack .SH NAME vpCreateContext, vpDestroyContext \- create/destroy a rendering context .SH SYNOPSIS #include .sp .FS "vpContext *" \fBvpCreateContext()\fR .FE .sp .FS void \fBvpDestroyContext(vpc)\fR .FA vpContext *\fIvpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION \fBvpCreateContext\fR returns a handle for a new rendering context. It contains default values for most of the rendering parameters. .PP \fBvpDestroyContext\fR destroys a rendering context and frees the associated memory. Only data structures allocated by the library are freed; application-defined data structures that are referenced in the rendering context through a pointer are not freed (e.g.\ arrays of volume data and shading lookup tables). The application is responsible for keeping track of such data structures and freeing them when appropriate. .SH SEE ALSO VolPack(3) volpack-1.0b3/man/src/VoxelField.30000644000265600020320000001325605701332775013666 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetVoxelField 3 "" VolPack .SH NAME vpSetVoxelField, vpFieldOffset \- define the size and location of a voxel field .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetVoxelField(\fIvpc, field_num, field_size, field_offset, field_max\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfield_num;\fR .FA int \fIfield_size;\fR .FA int \fIfield_offset;\fR .FA int \fIfield_max;\fR .FE .sp .FS int \fBvpFieldOffset(\fIvoxel_ptr, field_name\fB)\fR .FA vpContext *\fIvpc;\fR .FA LITERAL \fIfield_name;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIfield_num\fR Field number for the field to define (first field is 0). .IP \fIfield_size\fR Size of the field in bytes. .IP \fIfield_offset\fR Number of bytes from the beginning of the voxel to the beginning of the field. .IP \fIfield_max\fR Maximum possible value of the field. .IP \fIvoxel_ptr\fR Pointer to a C structure defining the fields in the voxel. .IP \fIfield_name\fR Literal name of the voxel field in the C structure. .SH DESCRIPTION \fBvpSetVoxelField\fR is used to define the size and location of each field in a voxel. Once you have chosen the sizes and order for the voxel fields, call \fBvpSetVoxelSize\fR once and then call \fBvpSetVoxelField\fR once for each field. Each field has a unique field number (the \fIfield_num\fR argument); the first field is 0, the next is 1, and so on, up to one less than the total number of fields defined with \fIVpSetVoxelSize\fR. The \fIfield_max\fR argument is used to determine the required size for lookup tables indexed by the value in a particular field; the maximum field value may be any number from 0 to the maximum unsigned integer representable by the field size. .PP If you have declared the layout of a voxel using a C structure then you can use the \fIsizeof\fR operator and the \fBvpFieldOffset\fR macro to compute the field sizes and offsets. \fBvpFieldOffset\fR returns the number of bytes from the beginning of a C structure to the beginning of a particular field in the structure. For example, the following code shows how to declare the size and offset for one voxel field: .DS .ta 18 .nf struct voxel { char field0; char field1; short field2; } *dummy_voxel; #define SIZE_0 sizeof(char) #define OFFSET_0 vpFieldOffset(dummy_voxel, field0) #define MAX_0 127 vpSetVoxelField(vpc, 0, SIZE_0, OFFSET_0, MAX_0); .DE .PP The size of each field must be 1, 2 or 4 bytes. You must also obey any byte-alignment restrictions required by your hardware. On many machines, two-byte fields must begin on a two-byte boundary and four-byte fields must begin on a four-byte boundary. The total size of a voxel may also need to be padded so that voxels packed one after the other still obey the alignment restrictions. If you declare your voxel as a C structure and use the \fIsizeof\fR operator and the \fBvpFieldOffset\fR macro then you should always get correct results. However, if you do not consider alignment restrictions when choosing the voxel field ordering the compiler may have to insert padding for you, resulting in wasted memory. .PP Some of the VolPack routines require you to declare fields of a particular size in order to store their results. The functions to precompute surface normals and gradient magnitudes (see vpVolumeNormals(3), vpScanlineNormals(3), vpClassifyVolume(3), vpClassifyScalars(3) and vpClassifyScanline(3)) can optionally store a one-byte scalar value, a one-byte gradient magnitude, and a two-byte surface normal value in each voxel. The following constants defined in volpack.h give the corresponding maximum field values: VP_SCALAR_MAX, VP_GRAD_MAX, and VP_NORM_MAX. If you choose not to use these functions then there is no need to declare these fields. .PP It is usually not necessary to declare a field for the voxel opacity if the opacity can be computed from the other voxel fields. See vpSetClassifierTable(3) for further discussion. .PP If the call to \fBvpSetVoxelSize\fR succeeds, any existing precomputed volume data structures in the context are destroyed. .SH "STATE VARIABLES" The current voxel field parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_FIELD_SIZES, VP_FIELD_OFFSETS, VP_FIELD_MAXES. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_VALUE The field number, size or offset is out of range. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetVoxelSize(3) volpack-1.0b3/man/src/Material.30000644000265600020320000001434305701332757013361 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetMaterial 3 "" VolPack .SH NAME vpSetMaterial \- set material properties .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetMaterial(\fIvpc, material, property, surface_side, r, g, b\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fImaterial;\fR .FA int \fIproperty;\fR .FA int \fIsurface_side;\fR .FA double \fIr, g, b;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fImaterial\fR A constant specifying a particular material number (VP_MATERIAL0, VP_MATERIAL1, ..., VP_MATERIAL5). .IP \fIproperty\fR A constant specifying one material property (VP_AMBIENT, VP_DIFFUSE, VP_SPECULAR or VP_SHINYNESS). .IP \fIsurface_side\fR A constant specifying which side of the material surface the properties apply to (VP_EXTERIOR, VP_INTERIOR or VP_BOTH_SIDES). .IP "\fIr, g, b\fR" RGB components of the color associated with the property. For VP_SHINYNESS, \fIg\fR and \fIb\fR are not used. .SH DESCRIPTION \fBvpSetMaterial\fR is used to set the properties of a material type. Each voxel may be composed of a mixture of several different material types, as described in vpSetLookupShader(3). Each material type has its own color and light reflection properties. The properties are used as parameters to the Phong shading equation for computing the color of the material given a set of light sources and a viewing direction (see vpShadeTable(3)). .PP To initialize the material parameters, call \fBvpSetMaterial\fR for each property of each material type to be used. The total number of materials is specified as an argument to \fBvpSetLookupShader\fR. The first material is specified by the constant VP_MATERIAL0, the second is VP_MATERIAL1, and so on. .PP The VP_AMBIENT property specifies the RGB ambient light coefficients of the material. This term represents the intensity of background light reflected by the material. Each of the RGB components specifies the coefficient for the corresponding light basis function. The values of the coefficients should be in the range 0.0-1.0. Default: 0.1 .PP The VP_DIFFUSE property specifies the RGB diffuse light coefficients of the material. This term represents the fraction of incident light intensity that is reflected diffusely (with a dull, matte appearance). The values of the coefficients should be in the range 0.0-1.0. Default: 0.4 .PP The VP_SPECULAR property specifies the RGB specular light coefficients of the material. This term represents the fraction of incident light intensity that is reflected specularly (with a shiny, mirror-like appearance). The values of the coefficients should be in the range 0.0-1.0. Default: 0.5 .PP The VP_SHINYNESS property specifies a single exponent that modifies the spread of specular highlights. The higher the number, the smaller and more intense the specular highlights. The exponent is specified with the \fIr\fR argument and can have any value; the generally-useful range is 1.0 to 100.0. The \fIg\fR and \fIb\fR arguments are ignored for this property. Default: 10.0 .PP The \fIsurface_side\fR argument specifies which side of the material surface the properties apply to. By default, the "interior" side of a voxel is the side in the direction of the surface normal. During rendering, if the normal points closer to the direction of the viewer than the opposite of the normal then the viewer is looking at the exterior side of the voxel rather than the interior. Different material parameters can be applied to the two surface sides by calling \fBvpSetMaterial\fR separately for each side. The option VP_BOTH_SIDES allows the same property to be set for both sides with only one function call. It is possible to reverse the definition of interior and exterior sides by calling \fBvpEnable\fR with the VP_REVERSE_SURFACE_SIDES option. .PP Voxels are shaded using the following equation: .DS I = A + L * (D * n_dot_l + S * pow(n_dot_h, E)) .sp .ta 12 I intensity for one color channel .br A ambient intensity coefficient .br D diffuse reflection coefficient .br S specular reflection coefficient .br E shinyness .br L light intensity .br n_dot_l dot product of normal and light vectors .br n_dot_h dot product of normal and highlight vectors .DE This equation is evaluated separately for each color channel. If multiple light sources are enabled an additional term identical to the second term above is added for each light source (with different values for L, n_dot_l and n_dot_h corresponding to the particular light source). .SH "STATE VARIABLES" Information about the current material properties can be retrieved with the following state variable codes (see vpGeti(3)): VP_MATERIAL_COUNT, VP_REVERSE_SURFACE_SIDES .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE Either the material number or the RGB components are invalid. .IP VPERROR_BAD_OPTION Either the \fIsurface_side\fR or \fIproperty\fR arguments are invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetLookupShader(3), vpShadeTable(3), vpGetMaterial(3) volpack-1.0b3/man/src/MultMatrix.30000644000265600020320000000452205701332760013721 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpMultMatrix 3 "" VolPack .SH NAME vpMultMatrix \- multiply the current transformation matrix by another matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpMultMatrix(\fIvpc, m\fB)\fR .FA vpContext *\fIvpc;\fR .FA vpMatrix4 \fIm;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIm\fR Input matrix. .SH DESCRIPTION \fBvpMultMatrix\fR is used to multiply the current transformation matrix by an arbitrary 4-by-4 transformation matrix. Use \fBvpCurrentMatrix\fR to set the current transformation matrix. By default, the matrix is post-multiplied (N = N*\fIm\fR where N is the current matrix and \fIm\fR is the argument to \fBvpMultMatrix\fR). The VP_CONCAT_MODE option to \fBvpSeti\fR can be used to select pre-multiplication. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX, VP_CONCAT_MODE. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3) volpack-1.0b3/man/src/LinAlgebra.30000644000265600020320000001063405701332756013621 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH LinearAlgebra 3 "" VolPack .SH NAME vpIdentity3, vpIdentity4, vpNormalize3, vpMatrixVectorMult4, vpMatrixMult4, vpCrossProduct, vpSolveSystem4, vpSetVector3, vpSetVector4 \- linear algebra routines .SH SYNOPSIS #include .sp .FS void \fBvpIdentity3(\fIm_dst\fB)\fR .FA vpMatrix3 \fIm_dst;\fR .FE .sp .FS void \fBvpIdentity4(\fIm_dst\fB)\fR .FA vpMatrix4 \fIm_dst;\fR .FE .sp .FS vpResult \fBvpNormalize3(\fIv_src1\fB)\fR .FA vpVector3 \fIv_src1;\fR .FE .sp .FS void \fBvpMatrixVectorMult4(\fIv_dst, m_src1, v_src1\fB)\fR .FA vpVector4 \fIv_dst;\fR .FA vpMatrix4 \fIm_src1;\fR .FA vpVector4 \fIv_src1;\fR .FE .sp .FS void \fBvpMatrixMult4(\fIm_dst, m_src1, m_src2\fB)\fR .FA vpVector4 \fIm_dst, m_src1, m_src2;\fR .FE .sp .FS void \fBvpCrossProduct(\fIv_dst, v_src1, v_src2\fB)\fR .FA vpVector3 \fIv_dst, v_src1, v_src2;\fR .FE .sp .FS vpResult \fBvpSolveSystem4(\fIm_src1, b, count\fB)\fR .FA vpMatrix4 \fIm_src1;\fR .FA vpVector4 \fIb[];\fR .FA int \fIcount;\fR .FE .sp .FS void \fBvpSetVector3(\fIv_dst, x, y, z\fB)\fR .FA vpVector3 \fIv_dst;\fR .FA double \fIx, y, z;\fR .FE .sp .FS void \fBvpSetVector4(\fIv_dst, x, y, z, w\fB)\fR .FA vpVector4 \fIv_dst;\fR .FA double \fIx, y, z, w;\fR .FE .SH ARGUMENTS .IP "\fIm_src1, m_src2, m_dst\fR" Source and destination matrices. .IP "\fIv_src1, v_src2, v_dst\fR" Source and destination vectors. .IP \fIb\fR Array of right-hand-side vectors. .IP \fIcount\fR Number of right-hand-side vectors. .IP "\fIx, y, z, w\fR" Vector components. .SH DESCRIPTION These routines form a simple linear algebra package used internally by VolPack. The routines are also available as utility routines for use by the application. .PP \fBvpIdentity3\fR assigns the identity matrix to a 3-by-3 matrix. .PP \fBvpIdentity4\fR assigns the identity matrix to a 4-by-4 matrix. .PP \fBvpNormalize3\fR normalizes a 3-element vector (so the magnitude is 1.0). The result overwrites the source vector. .PP \fBvpMatrixVectorMult4\fR multiplies a 4-by-4 matrix by a 4-element column vector and stores the result in the destination vector \fI(v_dst = m . v_src)\fR. .PP \fBvpMatrixMult4\fR multiplies two 4-by-4 matrices and stores the result in the destination matrix \fI(m_dst = m_src1 . m_src2)\fR. .PP \fBvpCrossProduct\fR computes the cross product of two 3-element vectors and stores the result in the destination vector \fI(v_dst = v_src1 x v_src2)\fR. .PP \fBvpSolveSystem4\fR solves the linear system \fIm . x = b\fR for each right-hand-side vector in the \fIb\fR array. The solution vectors overwrite the vectors in the \fIb\fR array. The solution is computed using Gauss-Jordan elimination with partial pivoting and implicit scaling. .PP \fBvpSetVector3\fR initializes the components of a 3-element vector \fI(v_dst = [x, y, z]).\fR It is a macro. .PP \fBvpSetVector4\fR initializes the components of a 4-element vector \fI(v_dst = [x, y, z, w]).\fR It is a macro. .SH ERRORS \fBvpNormalize3\fR and \fBvpSolveSystem4\fR normally return VP_OK. The following error return value is possible: .IP VPERROR_SINGULAR The vector is a 0 vector (\fBvpNormalize3\fR only), or the matrix is singular (\fBvpSolveSystem4\fR only). .SH SEE ALSO VolPack(3) volpack-1.0b3/man/src/TracePixel.30000644000265600020320000000426605701332771013662 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpTracePixel 3 "" VolPack .SH NAME vpTracePixel \- print a trace of the voxels composited into a pixel .SH SYNOPSIS #include .sp .FS vpResult \fBvpTracePixel(\fIvpc, trace_u, trace_v\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fItrace_u, trace_v;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP "\fItrace_u, trace_v\fR" Intermediate image coordinates of the pixel to trace. .SH DESCRIPTION This routine is for debugging the rendering algorithms. If \fI(trace_u, trace_v)\fR is a valid set of coordinates in the intermediate image then a printout appears during rendering showing a trace of all of the voxels that contribute to the pixel. The intermediate image is not the same as the final image; see vpGetvpSetImage(3). .PP The VolPack library must be compiled with the -DDEBUG compiler option for this function to have any effect. .SH SEE ALSO VolPack(3) volpack-1.0b3/man/src/ClientData.30000644000265600020320000000410405701332743013620 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetClientData 3 "" VolPack .SH NAME vpSetClientData \- define a client data pointer .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetClientData(\fIvpc, client_data\fB)\fR .FA vpContext *\fIvpc;\fR .FA void *\fIclient_data;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIclient_data\fR Pointer to application-specific client data. .SH DESCRIPTION \fBvpSetClientData\fR is used to store a pointer to application-specific client data in the VolPack context. This pointer is passed to some of the callback routines (see vpSetCallback(3)) to allow the application to define its own state variables. The pointer is not used by VolPack. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetCallback(3) volpack-1.0b3/man/src/ClsfyScan.30000644000265600020320000000672405701332744013510 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpClassifyScanline 3 "" VolPack .SH NAME vpClassifyScanline \- incrementally create a preclassified volume from scanlines of scalar data .SH SYNOPSIS #include .sp .FS vpResult \fBvpClassifyScanline(\fIvpc, voxels\fB)\fR .FA vpContext *\fIvpc;\fR .FA void *\fIvoxels;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIvoxels\fR 1D array of voxel data. .SH DESCRIPTION \fBvpClassifyScanline\fR is used to incrementally compute a preclassified volume by classifying one scanline of voxels and storing the result in the current preclassified volume. .PP The \fIvoxels\fR argument is a 1D array containing voxels in the format previously specified with \fBvpSetVoxelSize\fR and \fBvpSetVoxelField\fR. \fBvpVolumeSize\fR must be called to declare the size of the volume before the first call to \fBvpClassifyScanline\fR, and the length of the 1D voxel array must be equal to the length of the X dimension of the volume. The 1D voxel array may be initialized with \fBvpScanlineNormals\fR or a user-defined function. .PP The voxels in the array are classified using the current opacity transfer function (see vpSetClassifierTable(3)) and appended to the preclassified volume (see vpClassifyVolume(3)). Scanlines must be processed in Z-major order: all of the scanlines in the Z=0 slice are processed from Y=0 onward, then the Z=1 slice is processed, and so on. When the last scanline in the volume has been processed the preclassified data structure is ready to be used for rendering. Rendering is not possible until all scanlines have been processed. .PP When the first scanline of a volume is passed to \fBvpClassifyScanline\fR, any existing preclassified volume data is destroyed. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetClassifierTable(3), vpClassifyVolume(3), vpClassifyScalars(3) volpack-1.0b3/man/src/GetMatrix.30000644000265600020320000000451105701332754013520 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpGetMatrix 3 "" VolPack .SH NAME vpGetMatrix \- retrieve the contents of a transformation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetMatrix(\fIvpc, matrix_code, matrix\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fImatrix_code;\fR .FA vpMatrix4 \fImatrix;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fImatrix_code\fR A code specifying one of the VolPack transformation matrices (VP_MODEL, VP_VIEW, VP_PROJECT or VP_SCREEN). .IP \fImatrix\fR Matrix for storing the result. .SH DESCRIPTION \fBvpGetMatrix\fR retrieves the contents of one of the transformation matrices (see vpCurrentMatrix(3)). The special code VP_SCREEN causes the function to compute the transformation from object coordinates to image coordinates and return a matrix describing this transformation. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fImatrix_code\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3) volpack-1.0b3/man/src/Window.30000644000265600020320000001003505701332776013065 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpWindow 3 "" VolPack .SH NAME vpWindow \- multiply the projection matrix by a perspective or orthographic matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpWindow(\fIvpc, type, left, right, bottom, top, near, far\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fItype;\fR .FA double \fIleft, right;\fR .FA double \fIbottom, top;\fR .FA double \fInear, far;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fItype\fR Projection type code. Currently, must be VP_PARALLEL. .IP \fIleft\fR Coordinate of the left vertical clipping plane. .IP \fIright\fR Coordinate of the right vertical clipping plane. .IP \fIbottom\fR Coordinate of the bottom horizontal clipping plane. .IP \fItop\fR Coordinate of the top horizontal clipping plane. .IP \fInear\fR Coordinate of the near depth clipping plane. .IP \fIfar\fR Coordinate of the far depth clipping plane. .SH DESCRIPTION \fBvpWindow\fR is used to multiply the current projection matrix by a perspective or orthographic projection matrix. The new projection matrix is defined by the coordinates of six clipping planes in the eye coordinate system (see vpCurrentMatrix(3)). The matrix maps the points \fI(left, bottom, near)\fR and \fI(right, top, near)\fR to the lower left and upper right corners of the clipping window. For an alternative means of specifying the projection matrix, see vpWindowPHIGS(3). .PP Currently, only orthographic projections are supported. Perspective projections will be added in a future release. .PP The matrix for parallel projections is: .DS .ta 2C 6C 10C 14C A 0 0 D .br 0 B 0 E .br 0 0 C F .br 0 0 0 1 .sp A = 2 / \fI(right \- left)\fR .br B = 2 / \fI(top \- bottom)\fR .br C = 2 / \fI(far \- near)\fR .br D = \fI(left + right) / (left \- right)\fR .br E = \fI(bottom + top) / (bottom \- top)\fR .br F = \fI(near + far) / (near \- far)\fR .DE The matrix is multiplied into the projection matrix, even if the projection matrix is not the current matrix. By default, the matrix is post-multiplied (N = N*\fIm\fR where N is the current matrix and \fIm\fR is the argument to \fBvpMultMatrix\fR). The VP_CONCAT_MODE option to \fBvpSeti\fR can be used to select pre-multiplication. The default window is a parallel projection with left = bottom = near = -0.5, and right = top = far = 0.5. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CONCAT_MODE. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE The clipping plane coordinates are invalid (\fIleft >= right\fR, etc.). .IP VPERROR_BAD_OPTION The \fItype\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpWindowPHIGS(3) volpack-1.0b3/man/src/Identity.30000644000265600020320000000363605701332754013414 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpIdentityMatrix 3 "" VolPack .SH NAME vpIdentityMatrix \- load the identity matrix into the current transformation matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpIdentityMatrix(\fIvpc\fB)\fR .FA vpContext \fI*vpc;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .SH DESCRIPTION \fBvpIdentityMatrix\fR is used to load a 4-by-4 identity matrix into the current transformation matrix. Use \fBvpCurrentMatrix\fR to set the current transformation matrix. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpGetMatrix(3) volpack-1.0b3/man/src/Makefile.am0000644000265600020320000000163310727044625013567 00000000000000## Process this file with automake to produce Makefile.in # man/src/Makefile.am for volpack # Andreas Tille # GPL dist_man_MANS = \ BruteForce.3 Callback.3 ClientData.3 ClsfyScalar.3 ClsfyScan.3 \ ClsfyTable.3 ClsfyVolume.3 Context.3 CurrentMatrix.3 Debug.3 \ DepthCueing.3 Enable.3 Error.3 Extract.3 Filter.3 FilterTab.3 \ Get.3 GetImage.3 GetLight.3 GetMaterial.3 GetMatrix.3 Identity.3 \ Image.3 Light.3 LinAlgebra.3 Load.3 LookupShader.3 Material.3 \ MinMaxOctree.3 MultMatrix.3 NormalIndex.3 OctreeMask.3 Ramp.3 \ RawVoxels.3 Render.3 Resample.3 Rotate.3 Scale.3 ScanNormals.3 \ Set.3 SetMatrix.3 ShadeTable.3 Shadow.3 Store.3 Timer.3 \ TracePixel.3 Translate.3 Transpose.3 VolPack.3 VolumeNormals.3 \ VolumeSize.3 VoxelField.3 VoxelSize.3 Window.3 WindowPHIGS.3 EXTRA_DIST = makelinks volpack-1.0b3/man/src/VoxelSize.30000644000265600020320000001021505701332775013545 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetVoxelSize 3 "" VolPack .SH NAME vpSetVoxelSize \- define the size of a voxel .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetVoxelSize(\fIvpc, bytes_per_voxel, num_voxel_fields, num_shade_fields, num_classify_fields\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIbytes_per_voxel;\fR .FA int \fInum_voxel_fields;\fR .FA int \fInum_shade_fields;\fR .FA int \fInum_classify_fields;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIbytes_per_voxel\fR Size of one voxel in bytes. .IP \fInum_voxel_fields\fR Number of fields in a voxel. .IP \fInum_shade_fields\fR Number of voxel fields that are arguments to the shading function. .IP \fInum_classify_fields\fR Number of voxel fields that are arguments to the opacity transfer function. .SH DESCRIPTION \fBvpSetVoxelSize\fR is used to define the size in bytes and the number of fields in a voxel. Each voxel field is analogous to a field in a C structure and the contents of each field is user-defined. See the \fBvpSetVoxelField\fR function (vpSetVoxelField(3)) for setting the size and offset of each field. \fBvpSetVoxelSize\fR should be called before \fBvpSetVoxelField\fR and before any functions that access the contents of a voxel. .PP Typically, some of the voxel fields are used as arguments to a shading function and some (possibly the same) fields are used as arguments to an opacity transfer function (for classification). The fields that are used for shading should come first, i.e.\ they should have the smallest offsets, followed by any fields that are only used for classification. The classification fields can then be stripped off to save space during the precomputation stage for the fast rendering algorithm. The parameter \fInum_shade_fields\fR indicates the number of fields (starting from the first) that must not be stripped off. .PP The parameter \fInum_clsfy_fields\fR indicates the total number of fields that are used as parameters to the opacity transfer function. These fields do not necessarily have to be contiguous, although any fields that are not also used for shading should be the last fields in the voxel. .PP If the call to \fBvpSetVoxelSize\fR succeeds, any existing precomputed volume data structures in the context are destroyed. .SH "STATE VARIABLES" The current voxel size parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_BYTES_PER_VOXEL, VP_VOXEL_FIELD_COUNT, VP_SHADE_FIELD_COUNT, VP_CLASSIFY_FIELD_COUNT. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_LIMIT_EXCEEDED The number of voxel fields exceeds the implementation limit. This limit can be increased by editing volpack.h and recompiling the library. .IP VPERROR_BAD_VALUE Either \fInum_clsfy_fields\fR or \fInum_shade_fields\fR is out of range. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetVoxelField(3) volpack-1.0b3/man/src/LookupShader.30000644000265600020320000002127105701332757014221 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetLookupShader 3 "" VolPack .SH NAME vpSetLookupShader \- specify shading lookup tables .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetLookupShader(\fIvpc, color_channels, num_materials, color_field, color_table, color_table_size, weight_field, weight_table, weight_table_size\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIcolor_channels, num_materials;\fR .FA int \fIcolor_field;\fR .FA float *\fIcolor_table;\fR .FA int \fIcolor_table_size;\fR .FA int \fIweight_field;\fR .FA float *\fIweight_table;\fR .FA int \fIweight_table_size;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIcolor_channels\fR The number of color channels per pixel (1 or 3). .IP \fInum_materials\fR The number of material types. .IP \fIcolor_field\fR Field number for voxel field containing color lookup table index. .IP \fIcolor_table\fR Color lookup table. .IP \fIcolor_table_size\fR Size of color lookup table in bytes. .IP \fIweight_field\fR Field number for voxel field containing material weight lookup table index. .IP \fIweight_table\fR Material weight lookup table. .IP \fIweight_table_size\fR Size of material weight lookup table in bytes. .SH DESCRIPTION \fBvpSetLookupShader\fR is used to specify lookup tables that define a shading function. The lookup-table shading algorithm provided by VolPack is designed to support the following shading model. Each voxel is assumed to contain a mixture of some set of basic material types. Each material type has its own shading parameters for the Phong shading equation (for example, the diffuse color components and the shinyness). The color of a voxel is found by computing a color for each material type and then combining the colors in proportion to the fraction of each material in the voxel. The shading model also supports directional (infinite-distance) light sources. .PP This shading model is implemented using lookup tables. The tables can be precomputed so that the shading equation does not have to be evaluated for every voxel. VolPack provides routines to compute the lookup tables (see vpShadeTable(3)). The lookup tables can also be used to implement other shading models by using a user-supplied routine to compute the contents of the tables. See vpSetDepthCueing(3) for information about depth cueing. .PP It is also possible to define a callback function that will be called to shade each voxel during rendering, instead of using a lookup table. This method allows more general shading models but slows down rendering. To define a callback shader, call \fBvpSetCallback\fR with the VP_GRAY_SHADE_FUNC or VP_RGB_SHADE_FUNC option code (see vpSetCallback(3)). The lookup tables are used if the last successful call to \fBvpSetLookupShader\fR occurred after the last successful call to \fBvpSetCallback\fR with one of the VP_*_SHADE_FUNC options. .PP The \fIcolor_channels\fR argument determines whether the shading table will contain grayscale (1 channel) or RGB (3 channel) pixels. The \fInum_materials\fR argument specifies the number of basic material types out of which each voxel can be composed (at least 1). The \fIcolor_table\fR and \fIweight_table\fR arguments specify two lookup tables, and the \fIcolor_field\fR and \fIweight_field\fR arguments specify two voxel fields that are used to index the tables. The size of the \fIcolor_table\fR array must be: .DS float \fIcolor_table[n][num_materials][color_channels];\fR .DE where \fIn\fR is the number of possible values in the \fIcolor_field\fR field of the voxel (the maximum value plus one). The size of the \fIweight_table\fR argument must be: .DS float \fIweight_table[m][num_materials];\fR .DE where \fIm\fR is the number of possible values in the \fIweight_field\fR field of the voxel (the maximum value plus one). If there is only one material then \fIweight_table\fR is not used and may be a NULL pointer. .PP During rendering the shading lookup tables are accessed as follows. Suppose a particular voxel to be shaded has the value \fIcolor_index\fR in the field specified by \fIcolor_field\fR and the value \fIweight_index\fR in the field specified by \fIweight_field\fR. For each material number \fImaterial_index,\fR a weighted color is computed from the formula: .DS color =\kx color_table[color_index][material_index] * .br \h'\nxu' weight_table[weight_index][material_index] .DE Then the weighted colors for each material type are added up to give the voxel color. If \fIcolor_table\fR contains RGB values then each component is treated separately using the above formula. If there is only one material type then the constant 1.0 is substituted for the \fIweight_table\fR value. .PP The suggested way to use the tables is as follows. The voxel field specified by \fIcolor_field\fR should contain an encoded surface normal vector; this should be the same field as the \fInorm_field\fR argument to \fBvpVolumeNormals\fR or \fBvpClassifyScalars\fR. In the \fIcolor_table\fR array, for each possible encoded surface normal (the \fIcolor\fR index) and material type (the \fImaterial\fR index) the array should contain the color of the material given the current viewing direction and lighting arrangement. The color is independent of the voxel location because the light sources are assumed to be infinitely distant. The function \fBvpShadeTable\fR initializes the contents of \fIcolor_table\fR in this way. .PP The voxel field specified by \fIweight_field\fR should contain some quantity that determines the material composition of the voxel. For example, a field containing the scalar value could be used. In the \fIweight_table\fR array, for each possible value of \fIweight_field\fR there should be one row of material occupancy fractions. Each entry should be a number in the range 0.0-1.0 that specifies the fraction of the voxel occupied by the corresponding material. For example, if there are two material types and a voxel's \fIweight_field\fR contains the value 62, then \fIweight_table\fR[62][0] gives the fraction of the voxel occupied by material 0, and \fIweight_table\fR[62][1] gives the fraction of the voxel occupied by material 1. Normally, the numbers in a given row of \fIweight_table\fR should add up to 1.0 (although special effects can be achieved by bending the rules). The function \fBvpRamp\fR is useful for initializing the weight table with piece-wise linear ramps. .PP The values in the shading lookup tables may be initialized before or after calling \fBvpSetLookupShader.\fR Typically \fBvpSetLookupShader\fR is called once at the beginning of a rendering session, and then the values in the shading tables are modified as the user changes the lighting and shading parameters or the viewing direction. .SH "STATE VARIABLES" Information about the current shading table parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_COLOR_CHANNELS, VP_SHADE_COLOR_TABLE, VP_SHADE_COLOR_SIZE, VP_SHADE_WEIGHT_TABLE, VP_SHADE_WEIGHT_SIZE, VP_SHADE_COLOR_FIELD, VP_SHADE_WEIGHT_FIELD, VP_MATERIAL_COUNT .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE One or more of the arguments has an invalid value or is out of range. .IP VPERROR_LIMIT_EXCEEDED The \fInum_materials\fR argument has exceeded an internal limit. Change the value of VP_MAX_MATERIAL in volpack.h and recompile the VolPack library. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpShadeTable(3), vpSetCallback(3), vpRamp(3), vpVolumeNormals(3), vpClassifyScalars(3), vpSetDepthCueing(3) volpack-1.0b3/man/src/Scale.30000644000265600020320000000516605701332764012653 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpScale 3 "" VolPack .SH NAME vpScale \- multiply the current transformation matrix by a scaling matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpScale(\fIvpc, sx, sy, sz\fB)\fR .FA vpContext \fI*vpc;\fR .FA double \fIsx\R; .FA double \fIsy\R; .FA double \fIsz\R; .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIsx\fR Scale factor for the X dimension. .IP \fIsy\fR Scale factor for the Y dimension. .IP \fIsz\fR Scale factor for the Z dimension. .SH DESCRIPTION \fBvpScale\fR is used to multiply the current transformation matrix by a 4-by-4 scaling matrix. The arguments specify independent scale factors for each of the three cartesian axes. The scaling matrix is: .DS .ta 2C 6C 10C 14C sx 0 0 0 .br 0 sy 0 0 .br 0 0 sz 0 .br 0 0 0 1 .DE Use \fBvpCurrentMatrix\fR to set the current transformation matrix. By default, the scaling matrix is post-multiplied (M = M*S where M is the current matrix and S is the scaling matrix). The VP_CONCAT_MODE option to \fBvpSeti\fR can be used to select pre-multiplication. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX, VP_CONCAT_MODE. .SH ERRORS The return value is always VP_OK. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3) volpack-1.0b3/man/src/Set.30000644000265600020320000001244005701332765012351 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSeti 3 "" VolPack .SH NAME vpSeti, vpSetd \- set the value of an option .SH SYNOPSIS #include .sp .FS vpResult \fBvpSeti(\fIvpc, option, value\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA int \fIvalue;\fR .FE .sp .FS vpResult \fBvpSetd(\fIvpc, option, value\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA double \fIvalue;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR Constant that specifies the option to be set. .IP \fIvalue\fR New value for the option. .SH DESCRIPTION These functions are used to set the values of integer- or double-valued options in a rendering context. The following list summarizes the integer-valued options that can be set with \fBvpSeti\fR: .IP VP_CONCAT_MODE Choose whether transformation matrices are premultiplied or postmultiplied. If \fIvalue\fR is VP_CONCAT_LEFT then matrices are premultiplied. If \fIvalue\fR is VP_CONCAT_RIGHT then matrices are postmultiplied. Default: VP_CONCAT_RIGHT. .IP VP_DEPTH_CUE_SIZE_HINT Set the suggested number of entries in the depth cueing lookup table. See vpSetDepthCueing(3). Default: none .IP VP_INT_WIDTH_HINT Set the suggested width (in pixels) of the intermediate image work buffer. See vpRenderRawVolume(3). Default: none .IP VP_INT_HEIGHT_HINT Set the suggested height (in pixels) of the intermediate image work buffer. See vpRenderRawVolume(3). Default: none .IP VP_SHADOW_LIGHT Get the current shadow light (see vpSetShadowLookupShader(3)). Legal values are VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5. Default: VP_LIGHT0 .IP VP_SHADOW_WIDTH_HINT Set the suggested width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none .IP VP_SHADOW_HEIGHT_HINT Set the suggested height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none .IP VP_SHADOW_BIAS Set the current shadow bias value (see vpSetShadowLookupShader(3)). The value is an integral distance in units of voxels. Default: 4 .IP VP_AXIS_OVERRIDE Force the rendering routine to composite along a particular principle viewing axis, regardless of the current viewing direction. Legal values are VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS. Set the value to VP_NO_AXIS to let VolPack choose the optimal axis automatically (the default). This option is normally used only for debugging. .IP VP_TRACE_SHADOW_K When pixel tracing is enabled (see vpTracePixel(3)) and shadows are enabled (the VP_SHADOW option to vpEnable(3)), this option is used to choose one shadow buffer pixel to trace. The value must be a voxel slice number. The shadow buffer pixel that gets traced is the shadow pixel that affects the traced image pixel at the indicated slice. .PP The following list summarizes the double-valued options that can be set with \fBvpSetd\fR: .IP VP_DEPTH_CUE_QUANTIZATION Set the difference in depth between two adjacent entries in the depth cueing lookup table (see vpSetDepthCueing(3)). Must be greater than 0.0 and less than 1.0. Default: 1/255 .IP VP_MAX_RAY_OPACITY Set the maximum opacity threshold. During rendering, when a pixel's opacity reaches this threshold no more voxels are composited into the pixel. To maximize performance, the value should be as low as possible without adversely affecting image quality. Must be in the range 0.0-1.0 (1.0 is the default and 0.95 is the suggested value). Default: 1.0 .IP VP_MIN_VOXEL_OPACITY Set the minimum opacity threshold. During classification, if a voxel's opacity is less than or equal to this threshold then the voxel is discarded before rendering. To maximize performance, the value should be as high as possible without adversely affecting image quality. Must be in the range 0.0-1.0 (0.0 is the default and 0.05 is the suggested value). Default: 0.0 .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .IP VPERROR_BAD_VALUE The \fIvalue\fR argument is invalid or out of range. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpGeti(3) volpack-1.0b3/man/src/Transpose.30000644000265600020320000000600405701332772013571 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpTranspose 3 "" VolPack .SH NAME vpTranspose \- transpose a volume .SH SYNOPSIS #include .sp .FS vpResult \fBvpTranspose(\fIvpc, axis\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIaxis;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIaxis\fR Axis which should have the smallest stride after transposing (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS). .SH DESCRIPTION \fBvpTranspose\fR is used to transpose the 3D voxel array to optimize the memory stride for a particular principal viewing axis. The intended way to use this function is to set the viewing transformation, call \fBvpGeti\fR with the VP_VIEW_AXIS argument to find the corresponding viewing axis, and then call \fBvpTranspose\fR with that axis. Transposing the data changes the arrangement of the data stored in the 3D voxel array. The voxel stride state variables are updated to reflect this change, so the viewing transformation does not need to be changed after transposing. If the volume is already transposed for the requested axis then it returns immediately without modifying the voxel array. .PP This function is useful only for rendering large 3D voxel arrays. This function has no affect on the preclassified volume data. .SH "STATE VARIABLES" Relevant variables may be retrieved with the following state variable codes (see vpGeti(3)): VP_VIEW_AXIS, VP_VOXEL_XSTRIDE, VP_VOXEL_YSTRIDE, VP_VOXEL_ZSTRIDE. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_OPTION The \fIaxis\fR argument is invalid. .IP VPERROR_BAD_VOLUME The 3D voxel array is missing or invalid. .IP VPERROR_BAD_VOXEL The voxel fields are incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/Store.30000644000265600020320000000772005701332770012713 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpStoreRawVolume 3 "" VolPack .SH NAME vpStoreRawVolume, vpStoreMinMaxOctree, vpStoreClassifiedVolume, vpStoreContext \- store volume data structures to a file .SH SYNOPSIS #include .sp .FS vpResult \fBvpStoreRawVolume(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpStoreMinMaxOctree(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpStoreClassifiedVolume(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .sp .FS vpResult \fBvpStoreContext(\fIvpc, fd\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIfd;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIfd\fR File descriptor from \fBopen\fR(2), open for writing. .SH DESCRIPTION These functions are used to store volume data structures from a rendering context into files in the format read by the VolPack file reading routines (see vpLoadRawVolume(3)). .PP \fBvpStoreRawVolume\fR creates a 3D voxel array file. The file includes information about the size of the volume and the layout of the voxels as well as the volume data itself. .PP \fBvpStoreMinMaxOctree\fR creates a min-max octree file. The file includes information about the size of the volume and the layout of the voxels as well as the octree itself. .PP \fBvpStoreClassifiedVolume\fR creates a preclassified volume data file. The file includes information about the size of the volume and the layout of the voxels as well as the volume data itself. .PP \fBvpStoreContext\fR creates a rendering context file. The file includes all rendering parameters except volume data and callback functions. The contents of any lookup tables for shading and classification are also stored. .PP The function used to write data to the files can be set by calling \fBvpSetCallback\fR with the VP_WRITE_FUNC option. This could be used to implement a file-compression system, for example. .SH "STATE VARIABLES" The current file I/O parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_WRITE_FUNC. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_IO The file writing function returned an error value (in which case the external variable \fBerrno\fR should contain an operating-system specific error code), or the file system is full. .IP VPERROR_BAD_VOLUME The volume dimensions are invalid, or there is no voxel data in the context. .IP VPERROR_BAD_SIZE There is no min-max octree in the volume (\fBvpStoreMinMaxOctree\fR only). .IP VPERROR_BAD_VOXEL The voxel fields in the rendering context have not been properly defined. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpLoadRawVolume(3) volpack-1.0b3/man/src/Light.30000644000265600020320000001150005701332755012660 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetLight 3 "" VolPack .SH NAME vpSetLight \- set lighting properties .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetLight(\fIvpc, light_num, property, n0, n1, n2\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIlight_num;\fR .FA int \fIproperty;\fR .FA double \fIn0, n1, n2;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIlight_num\fR A constant specifying a particular light source (VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5). .IP \fIproperty\fR A constant specifying one lighting property (VP_COLOR or VP_DIRECTION). .IP "\fIn0, n1, n2\fR" Components of an RGB color (for VP_COLOR) or a direction vector (for VP_DIRECTION). .SH DESCRIPTION \fBvpSetLight\fR is used to set the properties of a light source. VolPack currently only supports directional light sources: each light is infinitely distant, so it can be fully characterized by a direction vector and a color. The lighting properties are used by \fBvpShadeTable\fR to compute the shading lookup table, which is then used to compute a color for each voxel. .PP To initialize the lighting environment, call \fBvpSetLight\fR twice for each light source which will be enabled. One call should set the RGB components of the light color (by using the VP_COLOR code for the \fIproperty\fR parameter), and one call should set the XYZ components of the light direction vector (by using the VP_DIRECTION code for the \fIproperty\fR parameter). The particular light source is specified with one of the light source codes defined in volpack.h: VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5. In the current implementation, at most six light sources may be specified. .PP The RGB components of a light color should be numbers in the range 0.0 (zero intensity) to 1.0 (full intensity). For grayscale renderings only the first (red) component is used and the other components may be set to any legal value. The default is white light (1.0, 1.0, 1.0). .PP The light direction vector points from the light source towards the lit object. It is transformed by the current contents of the modeling matrix (see \fBvpCurrentMatrix\fR). This allows the direction vector to be specified in an arbitrary coordinate system, provided the current modeling matrix properly transforms the vector into world coordinates. The default is the vector (1,1,1). .PP Each light source contributes to the shading computation only if it is enabled by calling \fBvpEnable.\fR By default, VP_LIGHT0 is enabled and all other lights are disabled. The more light sources that are enabled, the longer it takes to precompute the contents of the shading lookup table. .PP One additional property of the light sources can be set with \fBvpEnable\fR: VP_LIGHT_BOTH_SIDES. With this option enabled each light source shines in two opposing directions, as if there were two light sources facing each other with opposite direction vectors. No additional computation is required when this option is enabled. .SH "STATE VARIABLES" Information about the current lighting properties can be retrieved with the following state variable codes (see vpGeti(3)): VP_LIGHT_BOTH_SIDES. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_LIMIT_EXCEEDED The light number is invalid or exceeds an implementation limit. .IP VPERROR_SINGULAR The light direction vector is a zero vector. .IP VPERROR_BAD_VALUE The RGB color components are out of range. .IP VPERROR_BAD_OPTION The \fIproperty\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSetLookupShader(3), vpShadeTable(3), vpGetLight(3) volpack-1.0b3/man/src/VolPack.30000644000265600020320000001427105701332772013157 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH VolPack 3 "" VolPack .SH NAME VolPack \- introduction to VolPack, a library for volume rendering .SH SYNOPSIS #include .sp cc file.c -lvolpack -lm .SH DESCRIPTION VolPack is a portable software library for volume rendering. It is based on a new family of fast volume rendering algorithms (see Philippe Lacroute and Marc Levoy, Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transformation, Proc.\ SIGGRAPH '94, in \fIComputer Graphics\fR, Annual Conference Series, 1994, pp. 451-458). For a tutorial introduction to the library see the \fIVolPack User's Guide.\fR .PP The following list includes all of the functions in the library grouped by general function, along with the corresponding man pages. .ta 30 .SS "Rendering Contexts" vpCreateContext vpCreateContext(3) .br vpDestroyContext vpCreateContext(3) .br .SS Volumes vpSetVolumeSize vpSetVolumeSize(3) .br vpSetVoxelSize vpSetVoxelSize(3) .br vpSetVoxelField vpSetVoxelField(3) .br vpFieldOffset vpSetVoxelField(3) .br vpSetRawVoxels vpSetRawVoxels(3) .br vpVolumeNormals vpVolumeNormals(3) .br vpScanlineNormals vpScanlineNormals(3) .br vpNormalIndex vpNormalIndex(3) .br vpNormal vpNormalIndex(3) .SS "Classified Volumes" vpSetClassifierTable vpSetClassifierTable(3) .br vpClassifyVolume vpClassifyVolume(3) .br vpDestroyClassifiedVolume vpClassifyVolume(3) .br vpClassifyScalars vpClassifyScalars(3) .br vpClassifyScanline vpClassifyScanline(3) .SS "Min-Max Octrees" vpCreateMinMaxOctree vpCreateMinMaxOctree(3) .br vpMinMaxOctreeThreshold vpCreateMinMaxOctree(3) .br vpDestroyMinMaxOctree vpCreateMinMaxOctree(3) .br vpOctreeMask vpOctreeMask(3) .SS "View Transformations" vpCurrentMatrix vpCurrentMatrix(3) .br vpIdentityMatrix vpIdentityMatrix(3) .br vpTranslate vpTranslate(3) .br vpRotate vpRotate(3) .br vpScale vpScale(3) .br vpMultMatrix vpMultMatrix(3) .br vpSetMatrix vpSetMatrix(3) .br vpWindow vpWindow(3) .br vpWindowPHIGS vpWindowPHIGS(3) .SS "Shading and Lighting" vpSetLookupShader vpSetLookupShader(3) .br vpSetShadowLookupShader vpSetShadowLookupShader(3) .br vpSetLight vpSetLight(3) .br vpSetMaterial vpSetMaterial(3) .br vpShadeTable vpShadeTable(3) .br vpSetDepthCueing vpSetDepthCueing(3) .SS Rendering vpSetImage vpSetImage(3) .br vpRenderClassifiedVolume vpRenderRawVolume(3) .br vpRenderRawVolume vpRenderRawVolume(3) .SS "State Variables" vpEnable vpEnable(3) .br vpSeti vpSeti(3) .br vpSetd vpSeti(3) .br vpGeti vpGeti(3) .br vpGetd vpGeti(3) .br vpGetp vpGeti(3) .br vpGetMatrix vpGetMatrix(3) .br vpGetMaterial vpGetvpSetMaterial(3) .br vpGetLight vpGetvpSetLight(3) .br vpSetCallback vpSetCallback(3) .br vpSetClientData vpSetClientData(3) .SS "File I/O" vpLoadClassifiedVolume vpLoadRawVolume(3) .br vpLoadMinMaxOctree vpLoadRawVolume(3) .br vpLoadRawVolume vpLoadRawVolume(3) .br vpLoadContext vpLoadRawVolume(3) .br vpStoreClassifiedVolume vpStoreRawVolume(3) .br vpStoreMinMaxOctree vpStoreRawVolume(3) .br vpStoreRawVolume vpStoreRawVolume(3) .br vpStoreContext vpStoreRawVolume(3) .SS "Utility Functions" vpRamp vpRamp(3) .br vpExtract vpExtract(3) .br vpTranspose vpTranspose(3) .br vpResample vpResample(3) .br vpSetFilter vpSetFilter(3) .br vpBoxFilter vpBoxFilter(3) .br vpLinearFilter vpBoxFilter(3) .br vpBicubicFilter vpBoxFilter(3) .br vpGaussianFilter vpBoxFilter(3) .br vpIdentity3 LinearAlgebra(3) .br vpIdentity4 LinearAlgebra(3) .br vpSetVector3 LinearAlgebra(3) .br vpSetVector4 LinearAlgebra(3) .br vpNormalize3 LinearAlgebra(3) .br vpMatrixVectorMult4 LinearAlgebra(3) .br vpMatrixMult4 LinearAlgebra(3) .br vpCrossProduct LinearAlgebra(3) .br vpSolveSystem4 LinearAlgebra(3) .SS "Error Handling" vpGetError vpGetError(3) .br vpGetErrorString vpGetError(3) .SS Debugging vpSetDebug vpSetDebug(3) .br vpTracePixel vpTracePixel(3) .br vpGetImage vpGetvpSetImage(3) .br vpBruteForceRender vpBruteForceRender(3) .SH "DATA TYPES" The following data types are declared in the VolPack header file (volpack.h): .IP vpContext An opaque handle for a rendering context. A context contains all of the information required to render a volume, including classification and shading parameters, the view transformation, a description of the format of the volume data, and private data structures used by the rendering routines. .IP vpResult A result code. Most of the library routines return the code VP_OK upon successful completion, or an error code if the library call fails. .IP vpVector3 A three-element linear array of double-precision elements (double[3]). .IP vpVector4 A four-element linear array of double-precisions elements (double[4]). .IP vpMatrix3 A three-by-three array of double-precision elements (double[3][3]). .IP vpMatrix4 A four-by-four array of double-precision elements (double[4][4]). .SH AVAILABILITY Source code and documentation for VolPack are available free via the World Wide Web (http://www-graphics.stanford.edu/software/volpack) or by anonymous ftp (ftp://graphics.stanford.edu/pub/volpack). .SH SEE ALSO \fIVolPack User's Guide\fR volpack-1.0b3/man/src/FilterTab.30000644000265600020320000001060005701332751013461 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpBoxFilter 3 "" VolPack .SH NAME vpBoxFilter, vpLinearFilter, vpBicubicFilter, vpGaussianFilter \- initialize a filter weight table .SH SYNOPSIS #include .sp .FS vpResult \fBvpBoxFilter(\fInum_taps, num_phases, weights, weights_bytes\fB)\fR .FA int \fInum_taps, num_phases\fR; .FA float *\fIweights\fR; .FA int \fIweights_bytes\fR; .FE .sp .FS vpResult \fBvpLinearFilter(\fInum_taps, num_phases, weights, weights_bytes\fB)\fR .FA int \fInum_taps, num_phases\fR; .FA float *\fIweights\fR; .FA int \fIweights_bytes\fR; .FE .sp .FS vpResult \fBvpBicubicFilter(\fIb_value, c_value, num_taps, num_phases, weights, weights_bytes\fB)\fR .FA double \fIb_value, c_value\fR; .FA int \fInum_taps, num_phases\fR; .FA float *\fIweights\fR; .FA int \fIweights_bytes\fR; .FE .sp .FS vpResult \fBvpGaussianFilter(\fIsigma, num_taps, num_phases, weights, weights_bytes\fB)\fR .FA double \fIsigma\fR; .FA int \fInum_taps, num_phases\fR; .FA float *\fIweights\fR; .FA int \fIweights_bytes\fR; .FE .SH ARGUMENTS .IP \fInum_taps\fR Number of filter taps. .IP \fInum_phases\fR Number of filter phases. .IP \fIweights\fR Array containing filter weights. .IP \fIweights_bytes\fR Size (in bytes) of array containing filter weights. .IP \fIb_value\fR "B" parameter in the formula for a Mitchell bicubic. .IP \fIc_value\fR "C" parameter in the formula for a Mitchell bicubic. .IP \fIsigma\fR Standard deviation for a Gaussian. .SH DESCRIPTION These routines can be used to initialize filter weight tables for use with \fBvpSetFilter\fR and \fBvpResample\fR. See the \fBvpSetFilter\fR man page for information on the \fInum_taps\fR and \fInum_phases\fR arguments. .PP \fBvpBoxFilter\fR creates a filter table for a box filter (a zero-order filter). With \fInum_taps\fR equal to 1 the filter is a nearest-neighbor filter, suitable for low-quality upsampling. To create a decimation filter that averages down, the number of taps should equal the decimation factor (as nearly as possible). .PP \fBvpLinearFilter\fR creates a filter table for a linear filter (a first-order or tent filter). With \fInum_taps\fR equal to 2 the filter performs linear interpolation. .PP \fBvpBicubicFilter\fR creates a filter table for a Mitchell bicubic filter. The first two arguments can be used to modify the shape of the filter kernel. Some standard parameter values are: .IP "\fIb_value\fR = 1, \fIc_value = 0\fR" Cubic B-spline. .IP "\fIb_value\fR = 0, \fIc_value = 0.5\fR" Catmull-Rom spline. .PP With four filter taps the cubic B-spline filter is suitable for upsampling. For more details, see the following paper: Mitchell, D.P. and Netravali, A.N., "Reconstruction filters in computer graphics," Proc. SIGGRAPH '88 (Computer Graphics V22 N4), p. 221-8. .PP \fBvpGaussianFilter\fR creates a filter table for a gaussian filter. The first argument is the standard deviation of the gaussian. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SIZE The filter weight table size is invalid. .IP VPERROR_BAD_VALUE The number of phases is not a positive power of two. .SH SEE ALSO VolPack(3), vpResample(3), vpSetFilter(3) volpack-1.0b3/man/src/Debug.30000644000265600020320000000570205701332746012646 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetDebug 3 "" VolPack .SH NAME vpSetDebug \- enable/disable debugging options .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetDebug(\fIvpc, flag, value\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIflag;\fR .FA int \fIvalue;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIflag\fR Constant that specifies the debugging option to be adjusted. .IP \fIvalue\fR New value for the option (boolean: 0 or 1). .SH DESCRIPTION \fBvpSetDebug\fR is used to enable or disable a debugging option in a rendering context. The debugging options cause messages to be printed during execution. These messages are probably useless without a good understanding of the source code. If the \fIvalue\fR option is 0 then the option is disabled; otherwise it is enabled. The following list summarizes all available options: .IP VPDEBUG_VIEW view transform calculations .IP VPDEBUG_RENDER high-level rendering stages .IP VPDEBUG_RBUF intermediate image (render buffer) allocation .IP VPDEBUG_OPCCORRECT opacity correction .IP VPDEBUG_DEPTHCUE depth cueing .IP VPDEBUG_PYRAMID pyramid construction .IP VPDEBUG_OCTREE octree construction .IP VPDEBUG_CLSFYOCTREE octree classification .IP VPDEBUG_OCTREERUNS runs computed from octree .IP VPDEBUG_OCTREETRAVERSE octree traversal .IP VPDEBUG_TRANSPOSE volume transposing .IP VPDEBUG_COMPOSITE compositing .PP The VolPack library must be compiled with the -DDEBUG compiler option for this function to have any effect. .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_OPTION The \fIflag\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/OctreeMask.30000644000265600020320000001011305701332761013642 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpOctreeMask 3 "" VolPack .SH NAME vpOctreeMask \- compute a mask representing one level of a min-max octree .SH SYNOPSIS #include .sp .FS vpResult \fBvpOctreeMask(\fIvpc, array, array_size, max_level\fB)\fR .FA vpContext \fI*vpc;\fR .FA unsigned char *\fIarray;\fR .FA int \fIarray_size;\fR .FA int \fImax_level;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIarray\fR A 3D array for storing the mask. .IP \fIarray_size\fR Size of \fIarray\fR in bytes. .IP \fImax_level\fR Maximum octree level to descend to. .SH DESCRIPTION \fBvpOctreeMask\fR is used for performance debugging when rendering volumes with a min-max octree. During rendering the min-max octree is used to help determine which voxels are transparent. The time required to make this determination can be minimized by an appropriate choice for the range parameters for \fBvpMinMaxOctreeThreshold\fR and the node size parameters for \fBvpCreateMinMaxOctree\fR. \fBvpOctreeMask\fR provides information that can help to determine whether a set of parameters works effectively or not. .PP The output of the routine is stored in a 3D array of bytes that has the same dimensions as the volume (although each element is only one byte, regardless of the size of a voxel). For each voxel in the volume the corresponding byte in the output array is set by \fBvpOctreeMask\fR to one of three values: 0 if the voxel is definitely transparent, 255 if the voxel may be non-transparent, or 128 if the voxel may be non-transparent and there is more detailed information available at unvisited levels of the octree. The \fImax_level\fR argument specifies the deepest level of the octree to be visited (the root level is level 0). .PP A suggested way to use this routine is to compute an octree using a particular set of parameters and then call \fBvpOctreeMask\fR with several different values for \fImax_level.\fR For each resulting mask array, look at slices (or create a volume rendering!) and see how accurately the mask captures the general shape of the data in the original volume. The best set of parameters results in a mask that captures the general shape without an excessively small value for the minimum octree node size (which would result in a very large data structure and a lot of traversal overhead). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_SIZE There is no octree or the output array has the wrong size. .IP VPERROR_BAD_VOXEL The voxel size or the voxel fields have not been specified or have been incorrectly specified. .IP VPERROR_BAD_CLASSIFIER The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCreateMinMaxOctree(3) volpack-1.0b3/man/src/Enable.30000644000265600020320000000611505701332747013006 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpEnable 3 "" VolPack .SH NAME vpEnable \- enable or disable options .SH SYNOPSIS #include .sp .FS vpResult \fBvpEnable(\fIvpc, option, value\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA int \fIvalue;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR Constant that specifies the option to be adjusted. .IP \fIvalue\fR New value for the option (boolean: 0 or 1). .SH DESCRIPTION \fBvpEnable\fR is used to enable or disable boolean options in a rendering context. If the \fIvalue\fR option is 0 then the option is disabled; otherwise it is enabled. The following list summarizes all available options: .IP VP_LIGHT0 .PD 0 .IP VP_LIGHT1 .IP VP_LIGHT2 .IP VP_LIGHT3 .IP VP_LIGHT4 .IP VP_LIGHT5 Enable the corresponding light source (see vpSetLight(3)). Default: VP_LIGHT0 is enabled, and all others are disabled. .PD .IP VP_LIGHT_BOTH_SIDES Enable two-sided lighting (see vpSetLight(3)). Default: disabled .IP VP_REVERSE_SURFACE_SIDES Reverse the definition of interior and exterior surfaces (see vpSetMaterial(3)). Default: disabled .IP VP_DEPTH_CUE Enable depth cueing (see vpSetDepthCueing(3)). Default: disabled .IP VP_VIEW_X_AXIS .PD 0 .IP VP_VIEW_Y_AXIS .IP VP_VIEW_Z_AXIS Enable computing a preclassified volume for the corresponding major viewing axis (see vpClassifyVolume(3)). Default: enabled .PD .IP VP_SHADOW Enable rendering shadows (see vpSetShadowLookupShader(3)). Default: disabled .IP VP_CLAMP_SHADE_TABLE Enable clamping the color components in a shade table to the range 0.0-255.0. This option affects vpShadeTable(). Default: enabled .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_VALUE The \fIoption\fR argument is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3) volpack-1.0b3/man/src/WindowPHIGS.30000644000265600020320000001246605701332777013673 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpWindowPHIGS 3 "" VolPack .SH NAME vpWindowPHIGS \- multiply the projection matrix by a PHIGS viewing matrix .SH SYNOPSIS #include .sp .FS vpResult \fBvpWindowPHIGS(\fIvpc, vrp, vpn, vup, prp, umin, umax, vmin, vmax, front, back, projection_type\fB)\fR .FA vpContext *\fIvpc;\fR .FA vpVector3 \fIvrp, vpn, vup;\fR .FA vpVector3 \fIprp;\fR .FA double \fIumin, umax, vmin, vmax, front, back;\fR .FA int \fIprojection_type;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIvrp\fR Point specifying the view reference point. .IP \fIvpn\fR Vector specifying the view plane normal. .IP \fIvup\fR Vector specifying the view up vector. .IP \fIprp\fR Point specifying the projection reference point (in view reference coordinates). .IP \fIumin\fR Left coordinate of clipping window (in view reference coordinates). .IP \fIumax\fR Right coordinate of clipping window (in view reference coordinates). .IP \fIvmin\fR Bottom coordinate of clipping window (in view reference coordinates). .IP \fIvmax\fR Top coordinate of clipping window (in view reference coordinates). .IP \fIfront\fR Coordinate of the near depth clipping plane (in view reference coordinates). .IP \fIback\fR Coordinate of the far depth clipping plane (in view reference coordinates). .IP \fIprojection_type\fR Projection type code. Currently, must be VP_PARALLEL. .SH DESCRIPTION \fBvpWindowPHIGS\fR is used to multiply the current projection matrix by a viewing and projection matrix specified by means of the PHIGS viewing model. This model combines specification of the viewpoint, projection and clipping parameters. The resulting matrix is stored in the projection transformation matrix. Since both the view and the projection are specified in this one matrix, normally the view transformation matrix is not used in conjunction with \fBvpWindowPHIGS\fR (it should be set to the identity). Currently, only parallel projections may be specified. For an alternative view specification model, see vpWindow(3). .PP Assuming that the view transformation matrix is the identity, the matrix produced by \fBvpWindowPHIGS\fR should transform world coordinates into clip coordinates. This transformation is specified as follows. First, the projection plane (called the view plane) is defined by a point on the plane (the view reference point, \fIvrp\fR) and a vector normal to the plane (the view plane normal, \fIvpn\fR). Next, a coordinate system called the view reference coordinate (VRC) system is specified by means of the view plane normal and the view up vector, \fIvup.\fR The origin of VRC coordinates is the view reference point. The basis vectors of VRC coordinates are: .DS \fBu\fR = v cross n .br \fBv\fR = the projection of \fIvup\fR parallel to \fIvpn\fR onto the view plane .br \fBn\fR = \fIvpn\fR .DE This coordinate system is used to specify the direction of projection and the clipping window. The clipping window bounds in the projection plane are given by \fIumin, umax, vmin\fR and \fIvmax.\fR The direction of projection is the vector from the center of the clipping window to the projection reference point \fI(prp),\fR which is also specified in VRC coordinates. Finally, the front and back clipping planes are given by n=\fIfront\fR and n=\fIback\fR in VRC coordinates. .PP For a more detailed explanation of this view specification model, see \fIComputer Graphics: Principles and Practice\fR by Foley, vanDam, Feiner and Hughes. .SH "STATE VARIABLES" The current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CONCAT_MODE. .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE The clipping plane coordinates are invalid (\fIumin >= umax\fR, etc.). .IP VPERROR_BAD_OPTION The \fItype\fR argument is invalid. .IP VPERROR_SINGULAR The vectors defining view reference coordinates are not mutually orthogonal, or the projection reference point lies in the view plane. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpWindow(3) volpack-1.0b3/man/src/ClsfyTable.30000644000265600020320000001313705701332745013650 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetClassifierTable 3 "" VolPack .SH NAME vpSetClassifierTable \- specify an opacity transfer function .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetClassifierTable(\fIvpc, param_num, param_field, table, table_size\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIparam_num, param_field;\fR .FA float *\fItable;\fR .FA int \fItable_size;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIparam_num\fR Parameter number identifying one parameter of the opacity transfer function. .IP \fIparam_field\fR Field number identifying a voxel field that contains the parameter. .IP \fItable\fR Lookup table that defines the mapping from the voxel field value to the opacity. .IP \fItable_size\fR Size of \fItable\fR in bytes. .SH DESCRIPTION \fBvpSetClassifierTable\fR is used to specify lookup tables that define an opacity transfer function. The opacity transfer function must be of the form: .DS opacity = f0(param0) * f1(param1) * ... * fN(paramN) .DE where each of the factors is a function of one voxel field (see below for implementing more general classification models). \fBvpSetClassifierTable\fR must be called once for each factor to specify a lookup table that defines the factor. After the function has been specified, opacities are computed by calling one of the classification functions: \fBvpClassifyScalars, vpClassifyVolume,\fR or \fBvpClassifyScanline.\fR To classify a voxel, these functions use the values in the fields of the voxel as indexes into the opacity transfer function tables, retrieve one value from each table, and multiply the values together to compute the opacity for the voxel. The opacity should be a number in the range 0.0-1.0, so normally each table contains numbers that are also in this range. .PP The parameters of the opacity transfer function are numbered from zero, and the total number of parameters must be specified using \fBvpSetVoxelSize\fR before calling \fBvpSetClassifierTable\fR. The number of parameters is independent of the number of voxel fields: some fields may not be used as parameters, and one field could be used multiple times (although this is inefficient since all of the tables indexed by the same parameter could be merged into one table). .PP Each table should be a 1D array of numbers with one entry for each possible value of the corresponding voxel field. The voxel field must contain an unsigned integer quantity. Normally each table would be declared: .DS float table[MAX_FIELD_VALUE + 1]; .DE where MAX_FIELD_VALUE is the maximum possible value in the voxel field as specified with \fBvpSetVoxelField.\fR The table may also be dynamically allocated. Note that VolPack will never free the table, even if the VolPack context is destroyed with \fBvpDestroyContext,\fR so the application is responsible for freeing the memory when appropriate. The values in the table may be initialized or modified at any time before or after calling \fBvpSetClassifierTable,\fR but before calling one of the classification routines. See the function \fBvpRamp\fR for a convenient way to initialize tables with piece-wise linear ramps. .PP Classification functions that are not expressible in the form above can be handled as follows. First, write your own routine that computes the opacity for each voxel. Next, quantize the opacities using somewhere between 8 and 16 bits per voxel, and store the quantized values in one field of each voxel. Finally, define an opacity transfer function table that maps the quantized opacities into a floating point number in the range 0.0-1.0 and use the table to define a single-parameter opacity transfer function by calling \fBvpSetClassifierTable.\fR .PP The minimum opacity threshold should be set at the same time as the opacity transfer function. See the VP_MIN_VOXEL_OPACITY argument to \fBvpSetd\fR. .SH "STATE VARIABLES" The current classification function parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CLASSIFY_FIELD_COUNT, VP_CLASSIFY_FIELDS, VP_CLASSIFY_TABLES, VP_CLASSIFY_TABLE_SIZES, VP_MIN_VOXEL_OPACITY .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_VALUE Either \fIparam_num\fR or \fIfield_num\fR is out of range. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpClassifyScanline(3), vpClassifyScalars(3), vpClassifyVolume(3), vpRamp(3) volpack-1.0b3/man/src/Ramp.30000644000265600020320000000604005701332762012511 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpRamp 3 "" VolPack .SH NAME vpRamp \- initialize an array with a piecewise-linear ramp .SH SYNOPSIS #include .sp .FS vpResult \fBvpRamp(\fIarray, stride, num_points, ramp_x, ramp_y\fB)\fR .FA float *\fIarray;\fR .FA int \fIstride;\fR .FA int \fInum_points;\fR .FA int *\fIramp_x;\fR .FA float *\fIramp_y;\fR .FE .SH ARGUMENTS .IP \fIarray\fR Output array. .IP \fIstride\fR Stride from one array element to the next, in bytes. .IP \fInum_points\fR Number of entries in the input arrays (\fIramp_x\fR and \fIramp_y\fR). .IP \fIramp_x\fR Input array containing indices into \fIarray\fR. .IP \fIramp_y\fR Input array containing values to store into \fIarray\fR. .SH DESCRIPTION \fBvpRamp\fR is a utility routine for initializing linear arrays of floating-point numbers with piecewise-linear ramps. A ramp is defined by a set of (x, y) pairs. The X coordinates are integers that index entries in the \fIarray\fR argument, and the Y coordinates are floating-point values to store into the array. Linearly-interpolated Y values are stored in array elements with indexes in between two of the X values. .PP The values in \fIramp_x\fR most be strictly increasing. The \fIstride\fR argument may be used to skip array elements or to initialize arrays with a non-standard stride. If the output array is a simple linear array of type float then the stride should be sizeof(float). .PP This function is useful for creating lookup tables used for opacity transfer functions (see vpSetClassifierTable(3)) and shading functions (see vpSetLookupShader(3)). .SH ERRORS The normal return value is VP_OK. The following error return value is possible: .IP VPERROR_BAD_VALUE The number of points is less than one or the X values are not strictly increasing. .SH SEE ALSO VolPack(3) volpack-1.0b3/man/src/Shadow.30000644000265600020320000002072205701332767013047 00000000000000'\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford '\" Junior University. All rights reserved. '\" '\" Permission to use, copy, modify and distribute this software and its '\" documentation for any purpose is hereby granted without fee, provided '\" that the above copyright notice and this permission notice appear in '\" all copies of this software and that you do not sell the software. '\" Commercial licensing is available by contacting the author. '\" '\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, '\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY '\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. '\" '\" Author: '\" Phil Lacroute '\" Computer Systems Laboratory '\" Electrical Engineering Dept. '\" Stanford University '\" '\" $Date: 1994/12/31 19:49:53 $ '\" $Revision: 1.1 $ '\" '\" Macros '\" .FS -- function start '\" is return type of function '\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. '\" .FA -- function arguments '\" one argument declaration follows on next line .de FA .IP " " 4 .. '\" .FE -- function end '\" end of function declaration .de FE .PD .. '\" .DS -- display start .de DS .IP " " 4 .. '\" .DE -- display done .de DE .LP .. .TH vpSetShadowLookupShader 3 "" VolPack .SH NAME vpSetShadowLookupShader \- specify shading lookup tables for rendering shadows .SH SYNOPSIS #include .sp .FS vpResult \fBvpSetShadowLookupShader(\fIvpc, color_channels, num_materials, color_field, color_table, color_table_size, weight_field, weight_table, weight_table_size, shadow_table, shadow_table_size\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIcolor_channels, num_materials;\fR .FA int \fIcolor_field;\fR .FA float *\fIcolor_table;\fR .FA int \fIcolor_table_size;\fR .FA int \fIweight_field;\fR .FA float *\fIweight_table;\fR .FA int \fIweight_table_size;\fR .FA float *\fIshadow_table;\fR .FA int \fIshadow_table_size;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIcolor_channels\fR The number of color channels per pixel (1 or 3). .IP \fInum_materials\fR The number of material types. .IP \fIcolor_field\fR Field number for voxel field containing color lookup table index. .IP \fIcolor_table\fR Color lookup table. .IP \fIcolor_table_size\fR Size of color lookup table in bytes. .IP \fIweight_field\fR Field number for voxel field containing material weight lookup table index. .IP \fIweight_table\fR Material weight lookup table. .IP \fIweight_table_size\fR Size of material weight lookup table in bytes. .IP \fIshadow_table\fR Shadow color lookup table. .IP \fIshadow_table_size\fR Size of shadow color lookup table in bytes. .SH DESCRIPTION \fBvpSetShadowLookupShader\fR is used to specify lookup tables that define a shading function for rendering a volume with shadows. It should be used instead of \fBvpSetLookupShader\fR when shadows are enabled. .PP VolPack supports a fast, one-pass shadow algorithm. The algorithm computes the fraction of light from a given light source that reaches each voxel. The fraction is then used to attenuate the diffuse and specular shading terms associated with that light source, producing a dark shadow in areas that are hidden from the light source. The implementation uses lookup tables so that most of the shading calculation can be precomputed. .PP In order to compute the shadows in a single pass the algorithm places a restriction on the direction of the light source: the light casting the shadows must not be more than 45 degrees from the viewing direction. The quality of the shadows may degrade if the angle approaches 45 degrees. The current implementation allows shadows to be cast only from one light source. Additional lights may be enabled, but they will not cast shadows. .PP To make a rendering with shadows, the following steps must be performed: .IP Call \fBvpSetShadowLookupShader\fR to define the lookup tables (see discussion below). .IP Call \fBvpSeti\fR with the VP_SHADOW_LIGHT option to specify which light will cast shadows. The current implementation only allows one light to be specified. .IP Call \fBvpSeti\fR with the VP_SHADOW_BIAS option to set the shadow bias value (see discussion below). .IP Call \fBvpEnable\fR with the VP_SHADOW option to enable shadows. .IP Call \fBvpShadeTable\fR as usual to initialize the lookup tables. .IP Call one of the rendering routines. .PP \fBvpSetShadowLookupShader\fR defines the lookup tables required for the shading and shadowing algorithm. The first nine arguments are identical to the arguments for \fBvpSetLookupShader\fR (see the corresponding man page). The remaining two arguments specify an additional color lookup table, \fIshadow_table,\fR with the same dimensions as \fIcolor_table\fR. The contents of the table will be initialized by \fBvpShadeTable\fR. .PP The call to \fBvpSeti\fR with the VP_SHADOW_BIAS option specifies an offset to eliminate self-shadowing. Self-shadowing is an intrinsic problem when implementing shadow algorithms for volume rendering. Consider a single voxelized object consisting of an opaque core surrounded by a "halo" of lower-opacity voxels (necessary for the scene to be band-limited). As a light ray pierces the halo its strength is attenuated. By the time the light reaches the high-opacity region a significant fraction of the light may be obscured, resulting in a general darkening of the image even if no shadows should be present. The problem can be corrected by moving the shadow a small distance along the direction of the light rays. VP_SHADOW_BIAS specifies the distance of the bias in units of voxels. The optimal value depends on the data set. Increase the bias until it has no more effect on overall image brightness, but do not increase it too far or small features in the data will no longer produce correct shadows. .PP \fBvpShadeTable\fR initializes the shading lookup tables. It operates differently when shadows are enabled. Instead of computing one color for each surface normal vector and storing the results in \fIcolor_table,\fR the routine computes two colors terms. The first term is the portion of the voxel color due to the diffuse and specular components of the shadow light. This value is stored in \fIshadow_table\fR. The second term contains the contribution of all other light source and the ambient light term, and is stored in \fIcolor_table.\fR During rendering the color of a voxel is computed by extracting a surface normal from the voxel, using the surface normal to index both \fIcolor_table\fR and \fIshadow_table,\fR attenuating the value from \fIshadow_table\fR by the local strength of the shadow light, and then adding the two terms together. The local strength of the shadow light is found by extracting a value from the shadow buffer, an internal data structure that is updated during rendering. .PP The values in the shading lookup tables may be initialized before or after calling \fBvpSetShadowLookupShader.\fR Typically \fBvpSetShadowLookupShader\fR is called once at the beginning of a rendering session, and then \fBvpShadeTable\fR is called whenever the user changes the lighting and shading parameters or the viewing direction. .PP The shadow buffer is an internal 2D array used to maintain state during rendering. There are several state variables that can be used to query its current size in pixels (VP_SHADOW_WIDTH and VP_SHADOW_HEIGHT) and to suggest a size (VP_SHADOW_WIDTH_HINT and VP_SHADOW_HEIGHT_HINT). The required size depends on the volume size and the shadow light's direction. Normally the buffer is automatically resized when necessary. .SH "STATE VARIABLES" Information about the current shading table parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_COLOR_CHANNELS, VP_SHADE_COLOR_TABLE, VP_SHADE_COLOR_SIZE, VP_SHADE_WEIGHT_TABLE, VP_SHADE_WEIGHT_SIZE, VP_SHADE_COLOR_FIELD, VP_SHADE_WEIGHT_FIELD, VP_MATERIAL_COUNT, VP_SHADOW, VP_SHADOW_LIGHT, VP_SHADOW_WIDTH_HINT, VP_SHADOW_HEIGHT_HINT, VP_SHADOW_WIDTH, VP_SHADOW_HEIGHT, VP_SHADOW_COLOR_TABLE, VP_SHADOW_COLOR_SIZE, VP_SHADOW_BIAS .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_VALUE One or more of the arguments has an invalid value or is out of range. .IP VPERROR_LIMIT_EXCEEDED The \fInum_materials\fR argument has exceeded an internal limit. Change the value of VP_MAX_MATERIAL in volpack.h and recompile the VolPack library. .SH SEE ALSO VolPack(3), vpCreateContext(3), vpShadeTable(3), vpSetLookupShader(3) volpack-1.0b3/man/Makefile.am0000644000265600020320000000022010727044625012767 00000000000000## Process this file with automake to produce Makefile.in # man/Makefile.am for volpack # Andreas Tille # GPL SUBDIRS = src volpack-1.0b3/vp_linalg.c0000644000265600020320000001655105701116541012306 00000000000000/* * vp_linalg.c * * A simple linear algebra package. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.27 $ */ #include "vp_global.h" static void MatrixMult ANSI_ARGS((double* p, double *a, double *b, int l, int m, int n)); /* * vpIdentity3 * * Initialize a Matrix3 to the identity. */ void vpIdentity3(m) vpMatrix3 m; { m[0][0] = 1.; m[0][1] = 0.; m[0][2] = 0.; m[1][0] = 0.; m[1][1] = 1.; m[1][2] = 0.; m[2][0] = 0.; m[2][1] = 0.; m[2][2] = 1.; } /* * vpIdentity4 * * Initialize a Matrix4 to the identity. */ void vpIdentity4(m) vpMatrix4 m; { m[0][0] = 1.; m[0][1] = 0.; m[0][2] = 0.; m[0][3] = 0.; m[1][0] = 0.; m[1][1] = 1.; m[1][2] = 0.; m[1][3] = 0.; m[2][0] = 0.; m[2][1] = 0.; m[2][2] = 1.; m[2][3] = 0.; m[3][0] = 0.; m[3][1] = 0.; m[3][2] = 0.; m[3][3] = 1.; } /* * vpNormalize3 * * Normalize a vector (divide it by its magnitude). Return VPERROR_SINGULAR * if the magnitude is too small. */ vpResult vpNormalize3(v) vpVector3 v; { double magsqr, invmag; int i; magsqr = 0.; for (i = 0; i < 3; i++) magsqr += v[i]*v[i]; if (fabs(magsqr) < VP_EPS) return(VPERROR_SINGULAR); invmag = 1. / sqrt(magsqr); for (i = 0; i < 3; i++) v[i] *= invmag; return(VP_OK); } /* * vpMatrixVectorMult4 * * Perform the matrix-vector multiplication v2 = m*v1. */ void vpMatrixVectorMult4(v2, m, v1) vpVector4 v2, v1; vpMatrix4 m; { int i, j; for (i = 0; i < 4; i++) { v2[i] = 0; for (j = 0; j < 4; j++) v2[i] += m[i][j] * v1[j]; } } /* * vpMatrixMult4 * * Perform the matrix multiplication m3 = m2 * m1. */ void vpMatrixMult4(m3, m2, m1) vpMatrix4 m3, m2, m1; { MatrixMult((double *)m3, (double *)m2, (double *)m1, 4, 4, 4); } /* * MatrixMult * * Perform the matrix multiplication p = a * b. */ static void MatrixMult(p, a, b, l, m, n) double *p; /* result matrix, size l by n */ double *a; /* first factor, size l by m */ double *b; /* second factor, size m by n */ int l, m, n; { int i, j, k; if (l <= 0 || m <= 0 || n <= 0) VPBug("MatrixMult called with non-positive matrix size"); for (i = 0; i < l; i++) { for (j = 0; j < n; j++) { p[i*n+j] = 0; for (k = 0; k < m; k++) p[i*n+j] += a[i*n+k] * b[k*n+j]; } } } /* * vpCrossProduct * * Compute the cross product p = v * w. */ void vpCrossProduct(p, v, w) vpVector3 p, v, w; { p[0] = v[1]*w[2] - v[2]*w[1]; p[1] = v[2]*w[0] - v[0]*w[2]; p[2] = v[0]*w[1] - v[1]*w[0]; } /* * vpSolveSystem4 * * Solve the linear system a*xi = bi where a is a 4-by-4 matrix and bi * is a column of the 4-by-m matrix b. Each column bi in b is replaced * by the corresponding solution vector xi. The matrix a is destroyed. * The method used is Gauss-Jordan elimination with partial pivoting and * implicit scaling (based on the discussion in Numerical Recipes in C * by Press, Flannery, Teukolsky and Vetterling). * * Return VPERROR_SINGULAR if matrix is singular. */ vpResult vpSolveSystem4(a, b, m) vpMatrix4 a; /* linear system matrix */ double **b; /* RHS vectors on input, solution vectors on output; b[i] is a Vector4 */ int m; /* number of vectors in b */ { vpVector4 row_scale_factor; /* normalization for each row */ int ipivot; /* row containing pivot */ int pivot[4]; /* after the reduction loop, row i has been pivoted to row pivot[i] */ int i, j, k, l; /* loop indices */ double *aptr; /* pointer into a */ double entry; /* entry in a */ double max_entry; /* maximum entry in row */ double inv_entry; /* inverse of an entry in a */ vpVector4 tmpv; /* temporary vector for undoing row interchange in solution vectors */ /* initialize */ for (i = 0; i < 4; i++) pivot[i] = -1; /* find the largest element in each row and compute normalization for implicit scaling */ aptr = &a[0][0]; for (i = 0; i < 4; i++) { max_entry = 0.; for (j = 0; j < 4; j++) { if (*aptr < 0) { if (-*aptr > max_entry) max_entry = -*aptr; } else { if (*aptr > max_entry) max_entry = *aptr; } aptr++; } if (fabs(max_entry) < VP_EPS) return(VPERROR_SINGULAR); row_scale_factor[i] = 1. / max_entry; } /* loop over the columns of a */ for (j = 0; j < 4; j++) { /* loop over the rows of a and choose a pivot element in the current column, ignoring rows containing previous pivots */ max_entry = 0.; for (i = 0; i < 4; i++) { if (pivot[i] < 0) { entry = a[i][j] * row_scale_factor[i]; if (entry < 0) { if (-entry > max_entry) { max_entry = -entry; ipivot = i; } } else { if (entry > max_entry) { max_entry = entry; ipivot = i; } } } } if (fabs(max_entry) < VP_EPS) return(VPERROR_SINGULAR); pivot[ipivot] = j; inv_entry = 1. / a[ipivot][j]; /* scale the pivot row by the pivot element */ for (l = j+1; l < 4; l++) a[ipivot][l] *= inv_entry; for (l = 0; l < m; l++) b[l][ipivot] *= inv_entry; /* subtract a multiple of the pivot row from the other rows */ for (k = 0; k < 4; k++) { if (k != ipivot) { entry = a[k][j]; for (l = j+1; l < 4; l++) a[k][l] -= a[ipivot][l] * entry; for (l = 0; l < m; l++) b[l][k] -= b[l][ipivot] * entry; } } } /* undo row interchanges in solution vectors */ for (j = 0; j < m; j++) { for (i = 0; i < 4; i++) tmpv[pivot[i]] = b[j][i]; for (i = 0; i < 4; i++) b[j][i] = tmpv[i]; } return(VP_OK); } /* * VPLoadTranslation * * Load a translation matrix. */ void VPLoadTranslation(m, tx, ty, tz) vpMatrix4 m; double tx, ty, tz; { vpIdentity4(m); m[0][3] = tx; m[1][3] = ty; m[2][3] = tz; } /* * VPLoadRotation * * Load a rotation matrix. */ void VPLoadRotation(m, axis, degrees) vpMatrix4 m; int axis; double degrees; { vpMatrix4 tmp; double radians, sintheta, costheta; radians = degrees * M_PI / 180.; sintheta = sin(radians); costheta = cos(radians); vpIdentity4(m); switch (axis) { case VP_X_AXIS: m[1][1] = costheta; m[1][2] = sintheta; m[2][1] = -sintheta; m[2][2] = costheta; break; case VP_Y_AXIS: m[0][0] = costheta; m[0][2] = -sintheta; m[2][0] = sintheta; m[2][2] = costheta; break; case VP_Z_AXIS: m[0][0] = costheta; m[0][1] = sintheta; m[1][0] = -sintheta; m[1][1] = costheta; break; default: VPBug("bad axis in VPLoadRotation"); } } /* * VPLoadScale * * Load a scale matrix. */ void VPLoadScale(m, sx, sy, sz) vpMatrix4 m; double sx, sy, sz; { vpIdentity4(m); m[0][0] = sx; m[1][1] = sy; m[2][2] = sz; } volpack-1.0b3/vp_resample.c0000644000265600020320000010150405701116545012645 00000000000000/* * vp_resample.c * * Routines to resample an array to a grid with a different resolution. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.6 $ */ #include "vp_global.h" /* convert a float in the interval [0-1) to a 31-bit fixed point */ #define FLTFRAC_TO_FIX31(f) ((int)((f) * 2147483648.)) typedef struct { int in_ptr_offset; /* offset in bytes from beginning of scanline to first input sample for current output sample */ float *wptr; /* filter weights for the filter phase for current output sample */ int tap_min; /* first tap to evaluate */ int tap_max; /* last tap to evaluate */ } FilterTemplate; static void ResampleUchar ANSI_ARGS((vpContext *vpc, int num_dimens, int *src_dimens, int *dst_dimens, int *src_strides, int *dst_strides, unsigned char *in_array, unsigned char *out_array, FilterTemplate *template)); static void ResampleUshort ANSI_ARGS((vpContext *vpc, int num_dimens, int *src_dimens, int *dst_dimens, int *src_strides, int *dst_strides, unsigned short *in_array, unsigned short *out_array, FilterTemplate *template)); static void ResampleFloat ANSI_ARGS((vpContext *vpc, int num_dimens, int *src_dimens, int *dst_dimens, int *src_strides, int *dst_strides, float *in_array, float *out_array, FilterTemplate *template)); static float *ComputeWeights ANSI_ARGS((vpContext *vpc, int src_xlen, int dst_xlen, int filter_type)); /* * vpSetFilter * * Set the filter to use for resampling. */ vpResult vpSetFilter(vpc, num_taps, num_phases, weights) vpContext *vpc; int num_taps; /* number of filter taps */ int num_phases; /* number of filter phases */ float *weights; /* table of filter weights (weights[num_phases][num_taps]) */ { int num_ones, bit; /* make sure num_taps is positive and num_phases is a power of two */ if (num_taps < 1 || num_phases < 1) return(VPSetError(vpc, VPERROR_BAD_VALUE)); num_ones = 0; for (bit = 0; bit < 32; bit++) { if (num_phases & (1 << bit)) num_ones++; } if (num_ones != 1) return(VPSetError(vpc, VPERROR_BAD_VALUE)); /* store values in context */ vpc->filter_num_taps = num_taps; vpc->filter_num_phases = num_phases; vpc->filter_weights = weights; return(VP_OK); } /* * vpResample * * Resample an array to a grid with a different resolution. */ vpResult vpResample(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, element_type, in_array, out_array) vpContext *vpc; int num_dimens; /* number of dimensions in the two arrays */ int *src_dimens; /* sizes of source array dimensions */ int *dst_dimens; /* sizes of destination array dimensions (must be the same, except for first dimension) */ int *src_strides; /* strides of source array dimensions (in bytes) */ int *dst_strides; /* strides of destination dimensions (in bytes) */ int element_type; /* type of array element (VP_UCHAR, VP_USHORT, VP_FLOAT) */ void *in_array; /* input array containing data */ void *out_array; /* storage for output array */ { int num_taps; /* number of filter taps */ int num_phases; /* number of filter phases */ int in_x_count; /* length of input scanlines */ int out_x_count; /* length of output scanlines */ int in_x_stride; /* stride of input scanline elements */ double scale_factor; /* in_x = scale_factor * out_x */ double in_x0; /* location of center of first output sample in the input scanline */ int index0; /* coordinate of input sample corresponding to first filter tap for first output sample */ int phase0; /* filter phase for first output sample */ int index_incr; /* change in index0 for next output sample */ int phase_incr; /* change in phase0 for next output sample */ int unused_phase_bits; /* number of low-order bits of the phase that are ignored for indexing the weight table */ FilterTemplate *template; /* filter template */ float *weights; /* pointer to weight table */ int in_offset; /* offset to input sample */ int index, phase; /* current input sample index and phase */ int out_x; /* current output sample */ int tap_min, tap_max; /* bounds on tap number */ int bit, d; /* check for errors */ if (vpc->filter_weights == NULL) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* find where the first output sample maps into the input array and compute the filter phase for that sample; also compute increments to get the input array position and filter phase for the next sample */ num_taps = vpc->filter_num_taps; num_phases = vpc->filter_num_phases; in_x_count = src_dimens[0]; out_x_count = dst_dimens[0]; scale_factor = (double)in_x_count / (double)out_x_count; if (num_taps % 2 == 0) { /* even number of taps */ /* map center of first output voxel (x=0.5) to input voxel space (multiply by scale_factor), then translate by -0.5 to convert input voxels centered at 0.5 to input voxels centered at 0.0 */ in_x0 = 0.5 * scale_factor - 0.5; phase0 = FLTFRAC_TO_FIX31(in_x0 - floor(in_x0)); index0 = (int)floor(in_x0) - num_taps/2 + 1; } else { /* odd number of taps */ /* omit translation by -0.5 since filter phase is offset by 0.5 voxels relative to previous case */ in_x0 = 0.5 * scale_factor; phase0 = FLTFRAC_TO_FIX31(in_x0 - floor(in_x0)); if (in_x0 < 0.5) { index0 = (int)floor(in_x0) - num_taps/2; } else { index0 = (int)floor(in_x0) - num_taps/2 - 1; } } index_incr = (int)floor(scale_factor); phase_incr = FLTFRAC_TO_FIX31(scale_factor - index_incr); unused_phase_bits = 0; for (bit = 0; bit < 32; bit++) { if (num_phases & (1 << bit)) { unused_phase_bits = 31 - bit; break; } } ASSERT(unused_phase_bits != 0); /* compute a template containing input array position and filter weights for each output sample in an output scanline */ Alloc(vpc, template, FilterTemplate *, out_x_count*sizeof(FilterTemplate), "FilterTemplate"); weights = vpc->filter_weights; index = index0; phase = phase0; in_x_stride = src_strides[0]; in_offset = index * in_x_stride; for (out_x = 0; out_x < out_x_count; out_x++) { tap_min = MAX(0, -index); tap_max = MIN(in_x_count - index - 1, num_taps-1); template[out_x].in_ptr_offset = in_offset + tap_min * in_x_stride; template[out_x].wptr = &weights[(phase >> unused_phase_bits) * num_taps + tap_min]; template[out_x].tap_min = tap_min; template[out_x].tap_max = tap_max; phase += phase_incr; if (phase < 0) { phase &= 0x7FFFFFFF; index += index_incr + 1; in_offset += (index_incr + 1) * in_x_stride; } else { index += index_incr; in_offset += index_incr * in_x_stride; } } /* call a type-specific resampling routine */ switch (element_type) { case VP_UCHAR: ResampleUchar(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template); break; case VP_USHORT: ResampleUshort(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template); break; case VP_FLOAT: ResampleFloat(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template); break; default: Dealloc(vpc, template); return(VPSetError(vpc, VPERROR_BAD_VALUE)); } Dealloc(vpc, template); return(VP_OK); } /* * ResampleUchar * * Resample an array of unsigned chars. */ static void ResampleUchar(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template) vpContext *vpc; int num_dimens; /* number of dimensions in the two arrays */ int *src_dimens; /* sizes of source array dimensions */ int *dst_dimens; /* sizes of destination array dimensions (must be the same, except for first dimension) */ int *src_strides; /* strides of source array dimensions (in bytes) */ int *dst_strides; /* strides of destination dimensions (in bytes) */ unsigned char *in_array;/* input array containing data */ unsigned char *out_array;/* storage for output array */ FilterTemplate *template;/* filter template */ { int out_x; /* current output sample */ float *wptr; /* pointer to filter weights */ float acc; /* accumulator for resampled value */ int tap; /* current tap number */ int tap_min, tap_max; /* bounds on tap number */ unsigned char *in_ptr; /* pointer to first input sample that affects current output sample */ unsigned char *in_scan_ptr; /* pointer to beginning of input scanline */ unsigned char *out_ptr; /* pointer to current output sample */ unsigned char *out_scan_ptr;/* pointer to beginning of output scanline */ FilterTemplate *sample_template; /* template for output sample */ int out_x_count; /* number of elements in output scanline */ int in_x_stride; /* stride for input elements */ int out_x_stride; /* stride for output elements */ int *scan_coord; /* current scanline coordinates */ int done; int dim; /* copy parameters into local variables */ out_x_count = dst_dimens[0]; in_x_stride = src_strides[0]; out_x_stride = dst_strides[0]; /* allocate space for current scanline coordinates */ Alloc(vpc, scan_coord, int *, num_dimens * sizeof(int), "scan_coord"); for (dim = 0; dim < num_dimens; dim++) { scan_coord[dim] = 0; } /* initialize pointers to first scanline */ in_scan_ptr = in_array; out_scan_ptr = out_array; done = 0; while (!done) { /* resample one scanline */ sample_template = template; out_ptr = out_scan_ptr; for (out_x = 0; out_x < out_x_count; out_x++) { in_ptr = in_scan_ptr + sample_template->in_ptr_offset; wptr = sample_template->wptr; tap_min = sample_template->tap_min; tap_max = sample_template->tap_max; acc = 0; for (tap = tap_min; tap <= tap_max; tap++) { acc += (float)(*in_ptr) * *wptr; in_ptr += in_x_stride; wptr++; } if (acc > 255.) *out_ptr = 255; else if (acc < 0.) *out_ptr = 0; else *out_ptr = (int)acc; out_ptr += out_x_stride; sample_template++; } /* for out_x */ /* set pointers to next scanline */ for (dim = 1; dim < num_dimens; dim++) { if (++scan_coord[dim] < src_dimens[dim]) { in_scan_ptr += src_strides[dim]; out_scan_ptr += dst_strides[dim]; break; } else if (dim == num_dimens-1) { done = 1; } else { scan_coord[dim] = 0; in_scan_ptr -= src_strides[dim] * src_dimens[dim]; out_scan_ptr -= dst_strides[dim] * dst_dimens[dim]; } } } /* while scanlines */ /* clean up */ Dealloc(vpc, scan_coord); } /* * ResampleUshort * * Resample an array of unsigned shorts. */ static void ResampleUshort(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template) vpContext *vpc; int num_dimens; /* number of dimensions in the two arrays */ int *src_dimens; /* sizes of source array dimensions */ int *dst_dimens; /* sizes of destination array dimensions (must be the same, except for first dimension) */ int *src_strides; /* strides of source array dimensions (in bytes) */ int *dst_strides; /* strides of destination dimensions (in bytes) */ unsigned short *in_array;/* input array containing data */ unsigned short *out_array;/* storage for output array */ FilterTemplate *template;/* filter template */ { int out_x; /* current output sample */ float *wptr; /* pointer to filter weights */ float acc; /* accumulator for resampled value */ int tap; /* current tap number */ int tap_min, tap_max; /* bounds on tap number */ unsigned short *in_ptr; /* pointer to first input sample that affects current output sample */ unsigned short *in_scan_ptr;/* pointer to beginning of input scanline */ unsigned short *out_ptr; /* pointer to current output sample */ unsigned short *out_scan_ptr;/* pointer to beginning of output scanline */ FilterTemplate *sample_template; /* template for output sample */ int out_x_count; /* number of elements in output scanline */ int in_x_stride; /* stride for input elements */ int out_x_stride; /* stride for output elements */ int *scan_coord; /* current scanline coordinates */ int done; int dim; /* copy parameters into local variables */ out_x_count = dst_dimens[0]; in_x_stride = src_strides[0]; out_x_stride = dst_strides[0]; /* allocate space for current scanline coordinates */ Alloc(vpc, scan_coord, int *, num_dimens * sizeof(int), "scan_coord"); for (dim = 0; dim < num_dimens; dim++) { scan_coord[dim] = 0; } /* initialize pointers to first scanline */ in_scan_ptr = in_array; out_scan_ptr = out_array; done = 0; while (!done) { /* resample one scanline */ sample_template = template; out_ptr = out_scan_ptr; for (out_x = 0; out_x < out_x_count; out_x++) { in_ptr = in_scan_ptr + sample_template->in_ptr_offset; wptr = sample_template->wptr; tap_min = sample_template->tap_min; tap_max = sample_template->tap_max; acc = 0; for (tap = tap_min; tap <= tap_max; tap++) { acc += (float)(*in_ptr) * *wptr; in_ptr = (unsigned short *)((char *)in_ptr + in_x_stride); wptr++; } if (acc > 65535.) *out_ptr = 65535; else if (acc < 0.) *out_ptr = 0; else *out_ptr = (int)acc; out_ptr = (unsigned short *)((char *)out_ptr + out_x_stride); sample_template++; } /* for out_x */ /* set pointers to next scanline */ for (dim = 1; dim < num_dimens; dim++) { if (++scan_coord[dim] < src_dimens[dim]) { in_scan_ptr = (unsigned short *)((char *)in_scan_ptr + src_strides[dim]); out_scan_ptr = (unsigned short *)((char *)out_scan_ptr + dst_strides[dim]); break; } else if (dim == num_dimens-1) { done = 1; } else { scan_coord[dim] = 0; in_scan_ptr = (unsigned short *)((char *)in_scan_ptr - src_strides[dim] * src_dimens[dim]); out_scan_ptr = (unsigned short *)((char *)out_scan_ptr - dst_strides[dim] * dst_dimens[dim]); } } } /* while scanlines */ /* clean up */ Dealloc(vpc, scan_coord); } /* * ResampleFloat * * Resample an array of unsigned shorts. */ static void ResampleFloat(vpc, num_dimens, src_dimens, dst_dimens, src_strides, dst_strides, in_array, out_array, template) vpContext *vpc; int num_dimens; /* number of dimensions in the two arrays */ int *src_dimens; /* sizes of source array dimensions */ int *dst_dimens; /* sizes of destination array dimensions (must be the same, except for first dimension) */ int *src_strides; /* strides of source array dimensions (in bytes) */ int *dst_strides; /* strides of destination dimensions (in bytes) */ float *in_array; /* input array containing data */ float *out_array; /* storage for output array */ FilterTemplate *template;/* filter template */ { int out_x; /* current output sample */ float *wptr; /* pointer to filter weights */ float acc; /* accumulator for resampled value */ int tap; /* current tap number */ int tap_min, tap_max; /* bounds on tap number */ float *in_ptr; /* pointer to first input sample that affects current output sample */ float *in_scan_ptr; /* pointer to beginning of input scanline */ float *out_ptr; /* pointer to current output sample */ float *out_scan_ptr; /* pointer to beginning of output scanline */ FilterTemplate *sample_template; /* template for output sample */ int out_x_count; /* number of elements in output scanline */ int in_x_stride; /* stride for input elements */ int out_x_stride; /* stride for output elements */ int *scan_coord; /* current scanline coordinates */ int done; int dim; /* copy parameters into local variables */ out_x_count = dst_dimens[0]; in_x_stride = src_strides[0]; out_x_stride = dst_strides[0]; /* allocate space for current scanline coordinates */ Alloc(vpc, scan_coord, int *, num_dimens * sizeof(int), "scan_coord"); for (dim = 0; dim < num_dimens; dim++) { scan_coord[dim] = 0; } /* initialize pointers to first scanline */ in_scan_ptr = in_array; out_scan_ptr = out_array; done = 0; while (!done) { /* resample one scanline */ sample_template = template; out_ptr = out_scan_ptr; for (out_x = 0; out_x < out_x_count; out_x++) { in_ptr = in_scan_ptr + sample_template->in_ptr_offset; wptr = sample_template->wptr; tap_min = sample_template->tap_min; tap_max = sample_template->tap_max; acc = 0; for (tap = tap_min; tap <= tap_max; tap++) { acc += *in_ptr * *wptr; in_ptr = (float *)((char *)in_ptr + in_x_stride); wptr++; } *out_ptr = acc; out_ptr = (float *)((char *)out_ptr + out_x_stride); sample_template++; } /* for out_x */ /* set pointers to next scanline */ for (dim = 1; dim < num_dimens; dim++) { if (++scan_coord[dim] < src_dimens[dim]) { in_scan_ptr = (float *)((char *)in_scan_ptr + src_strides[dim]); out_scan_ptr = (float *)((char *)out_scan_ptr + dst_strides[dim]); break; } else if (dim == num_dimens-1) { done = 1; } else { scan_coord[dim] = 0; in_scan_ptr = (float *)((char *)in_scan_ptr - src_strides[dim] * src_dimens[dim]); out_scan_ptr = (float *)((char *)out_scan_ptr - dst_strides[dim] * dst_dimens[dim]); } } } /* while scanlines */ /* clean up */ Dealloc(vpc, scan_coord); } /* * vpResample2D * * Resample a 2D array. */ vpResult vpResample2D(in_array, in_x, in_y, out_array, out_x, out_y, element_type, filter_type) void *in_array; /* input array containing data */ int in_x, in_y; /* input array dimensions */ void *out_array; /* storage for output array */ int out_x, out_y; /* output array dimensions */ int element_type; /* type of array element (VP_UCHAR, VP_USHORT, VP_FLOAT) */ int filter_type; /* type of filter (VP_BOX_FILTER, etc.) */ { int src_dimens[2], dst_dimens[2]; int src_strides[2], dst_strides[2]; void *tmp1_array; int element_size; vpResult code; vpContext *vpc; float *weights; /* compute size of array element and allocate intermediate arrays */ switch (element_type) { case VP_UCHAR: element_size = 1; break; case VP_USHORT: element_size = 2; break; case VP_FLOAT: element_size = 4; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } vpc = vpCreateContext(); Alloc(vpc, tmp1_array, void *, out_x*in_y*element_size, "resample_tmp1"); /* resample first dimension */ src_dimens[0] = in_x; src_dimens[1] = in_y; dst_dimens[0] = out_x; dst_dimens[1] = in_y; src_strides[0] = element_size; src_strides[1] = src_dimens[0] * src_strides[0]; dst_strides[0] = element_size; dst_strides[1] = dst_dimens[0] * dst_strides[0]; weights = ComputeWeights(vpc, src_dimens[0], dst_dimens[0], filter_type); if (weights == NULL) { Dealloc(vpc, tmp1_array); return(vpc->error_code); } code = vpResample(vpc, 2, src_dimens, dst_dimens, src_strides, dst_strides, element_type, in_array, tmp1_array); Dealloc(vpc, weights); if (code != VP_OK) { Dealloc(vpc, tmp1_array); return(code); } /* resample second dimension */ src_dimens[1] = out_x; src_dimens[0] = in_y; dst_dimens[1] = out_x; dst_dimens[0] = out_y; src_strides[1] = element_size; src_strides[0] = src_dimens[1] * src_strides[1]; dst_strides[1] = element_size; dst_strides[0] = dst_dimens[1] * dst_strides[1]; weights = ComputeWeights(vpc, src_dimens[0], dst_dimens[0], filter_type); if (weights == NULL) { Dealloc(vpc, tmp1_array); return(vpc->error_code); } code = vpResample(vpc, 2, src_dimens, dst_dimens, src_strides, dst_strides, element_type, tmp1_array, out_array); Dealloc(vpc, weights); if (code != VP_OK) { Dealloc(vpc, tmp1_array); return(code); } /* clean up */ Dealloc(vpc, tmp1_array); return(VP_OK); } /* * vpResample3D * * Resample a 3D array. */ vpResult vpResample3D(in_array, in_x, in_y, in_z, out_array, out_x, out_y, out_z, element_type, filter_type) void *in_array; /* input array containing data */ int in_x, in_y, in_z; /* input array dimensions */ void *out_array; /* storage for output array */ int out_x, out_y, out_z;/* output array dimensions */ int element_type; /* type of array element (VP_UCHAR, VP_USHORT, VP_FLOAT) */ int filter_type; /* type of filter (VP_BOX_FILTER, etc.) */ { int src_dimens[3], dst_dimens[3]; int src_strides[3], dst_strides[3]; void *tmp1_array, *tmp2_array; int element_size; vpResult code; vpContext *vpc; float *weights; /* compute size of array element and allocate intermediate arrays */ switch (element_type) { case VP_UCHAR: element_size = 1; break; case VP_USHORT: element_size = 2; break; case VP_FLOAT: element_size = 4; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } vpc = vpCreateContext(); Alloc(vpc, tmp1_array, void *, out_x * in_y * in_z * element_size, "resample_tmp1"); Alloc(vpc, tmp2_array, void *, out_x * out_y * in_z * element_size, "resample_tmp2"); /* resample first dimension */ src_dimens[0] = in_x; src_dimens[1] = in_y; src_dimens[2] = in_z; dst_dimens[0] = out_x; dst_dimens[1] = in_y; dst_dimens[2] = in_z; src_strides[0] = element_size; src_strides[1] = src_dimens[0] * src_strides[0]; src_strides[2] = src_dimens[1] * src_strides[1]; dst_strides[0] = element_size; dst_strides[1] = dst_dimens[0] * dst_strides[0]; dst_strides[2] = dst_dimens[1] * dst_strides[1]; weights = ComputeWeights(vpc, src_dimens[0], dst_dimens[0], filter_type); if (weights == NULL) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(vpc->error_code); } code = vpResample(vpc, 3, src_dimens, dst_dimens, src_strides, dst_strides, element_type, in_array, tmp1_array); Dealloc(vpc, weights); if (code != VP_OK) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(code); } /* resample second dimension */ src_dimens[1] = out_x; src_dimens[0] = in_y; src_dimens[2] = in_z; dst_dimens[1] = out_x; dst_dimens[0] = out_y; dst_dimens[2] = in_z; src_strides[1] = element_size; src_strides[0] = src_dimens[1] * src_strides[1]; src_strides[2] = src_dimens[0] * src_strides[0]; dst_strides[1] = element_size; dst_strides[0] = dst_dimens[1] * dst_strides[1]; dst_strides[2] = dst_dimens[0] * dst_strides[0]; weights = ComputeWeights(vpc, src_dimens[0], dst_dimens[0], filter_type); if (weights == NULL) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(vpc->error_code); } code = vpResample(vpc, 3, src_dimens, dst_dimens, src_strides, dst_strides, element_type, tmp1_array, tmp2_array); Dealloc(vpc, weights); if (code != VP_OK) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(code); } /* resample third dimension */ src_dimens[1] = out_x; src_dimens[2] = out_y; src_dimens[0] = in_z; dst_dimens[1] = out_x; dst_dimens[2] = out_y; dst_dimens[0] = out_z; src_strides[1] = element_size; src_strides[2] = src_dimens[1] * src_strides[1]; src_strides[0] = src_dimens[2] * src_strides[2]; dst_strides[1] = element_size; dst_strides[2] = dst_dimens[1] * dst_strides[1]; dst_strides[0] = dst_dimens[2] * dst_strides[2]; weights = ComputeWeights(vpc, src_dimens[0], dst_dimens[0], filter_type); if (weights == NULL) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(vpc->error_code); } code = vpResample(vpc, 3, src_dimens, dst_dimens, src_strides, dst_strides, element_type, tmp2_array, out_array); Dealloc(vpc, weights); if (code != VP_OK) { Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(code); } /* clean up */ Dealloc(vpc, tmp1_array); Dealloc(vpc, tmp2_array); return(VP_OK); } /* * ComputeWeights * * Allocate and compute a filter weight table for a predefined filter type. */ static float * ComputeWeights(vpc, src_xlen, dst_xlen, filter_type) vpContext *vpc; /* context for storing table */ int src_xlen; /* number of samples in input scanline */ int dst_xlen; /* number of samples in output scanline */ int filter_type; /* type of filter (VP_BOX_FILTER, etc.) */ { double scale_factor; int num_phases, num_taps, support, tap_limit, phases, table_size; int code; float *weights; switch (filter_type) { case VP_BOX_FILTER: support = 1; break; case VP_LINEAR_FILTER: support = 2; break; case VP_GAUSSIAN_FILTER: support = 3; break; case VP_BSPLINE_FILTER: case VP_MITCHELL_FILTER: support = 4; break; default: VPSetError(vpc, VPERROR_BAD_OPTION); return(NULL); } scale_factor = (double)dst_xlen / (double)src_xlen; if (scale_factor >= 1.0) { num_taps = support; num_phases = 1024; } else { num_taps = (double)support / scale_factor; tap_limit = 4; phases = 1024; while (1) { if (num_taps <= tap_limit) { num_phases = phases; break; } tap_limit *= 2; phases /= 2; if (phases <= 1) { num_phases = 1; break; } } } table_size = num_taps * num_phases * sizeof(float); Alloc(vpc, weights, float *, table_size, "weight_table"); switch (filter_type) { case VP_BOX_FILTER: code = vpBoxFilter(num_taps, num_phases, weights, table_size); if (code != VP_OK) { Dealloc(vpc, weights); VPSetError(vpc, code); return(NULL); } break; case VP_LINEAR_FILTER: code = vpLinearFilter(num_taps, num_phases, weights, table_size); if (code != VP_OK) { Dealloc(vpc, weights); VPSetError(vpc, code); return(NULL); } break; case VP_GAUSSIAN_FILTER: code = vpGaussianFilter(VP_GAUSSIAN_SIGMA, num_taps, num_phases, weights, table_size); if (code != VP_OK) { Dealloc(vpc, weights); VPSetError(vpc, code); return(NULL); } break; case VP_BSPLINE_FILTER: code = vpBicubicFilter(1.0, 0.0, num_taps, num_phases, weights, table_size); if (code != VP_OK) { Dealloc(vpc, weights); VPSetError(vpc, code); return(NULL); } break; case VP_MITCHELL_FILTER: code = vpBicubicFilter(1.0/3.0, 1.0/3.0, num_taps, num_phases, weights, table_size); if (code != VP_OK) { Dealloc(vpc, weights); VPSetError(vpc, code); return(NULL); } break; } vpSetFilter(vpc, num_taps, num_phases, weights); return(weights); } /* * vpBoxFilter * * Compute filter weights for box filter. * For abs(x) < 0.5: * k(x) = C * (C is chosen so that k(x) integrates to 1). * Otherwise: * k(x) = 0 */ vpResult vpBoxFilter(num_taps, num_phases, weights, weights_bytes) int num_taps; /* number of filter taps to compute */ int num_phases; /* number of phases to compute */ float *weights; /* array for storing filter weights (num_taps*num_phases entries) */ int weights_bytes; /* size of array (for error checking) */ { int p, t; float *wptr; double value; if (weights_bytes != num_taps * num_phases * sizeof(float)) return(VPERROR_BAD_SIZE); if (num_phases % 2 != 0) return(VPERROR_BAD_VALUE); wptr = weights; value = 1.0 / (double)num_taps; for (p = 0; p < num_phases; p++) { for (t = 0; t < num_taps; t++) { *wptr++ = value; } } return(VP_OK); } /* * vpLinearFilter * * Compute filter weights for linear interpolation. * For abs(x) < 1: * k(x) = C * (1 - abs(x)) * (C is chosen so that k(x) integrates to 1). * Otherwise: * k(x) = 0 */ vpResult vpLinearFilter(num_taps, num_phases, weights, weights_bytes) int num_taps; /* number of filter taps to compute */ int num_phases; /* number of phases to compute */ float *weights; /* array for storing filter weights (num_taps*num_phases entries) */ int weights_bytes; /* size of array (for error checking) */ { int p, t; float *wptr1, *wptr2; double x0, delta_x, x, xa, tap_spacing, sum, normalize, value; if (weights_bytes != num_taps * num_phases * sizeof(float)) return(VPERROR_BAD_SIZE); if (num_phases % 2 != 0) return(VPERROR_BAD_VALUE); wptr1 = weights; tap_spacing = 2.0 / (double)num_taps; x0 = -tap_spacing * ((double)num_taps/2.0 - 1.0); delta_x = tap_spacing / (double)num_phases; for (p = 0; p < num_phases/2; p++) { x = x0; sum = 0; for (t = 0; t < num_taps; t++) { if (x < 0.0) xa = -x; else xa = x; value = 1.0 - xa; wptr1[t] = value; sum += value; x += tap_spacing; } normalize = 1.0 / sum; for (t = 0; t < num_taps; t++) { wptr1[t] *= normalize; } wptr1 += num_taps; x0 -= delta_x; } wptr2 = wptr1; for (p = 0; p < num_phases/2; p++) { for (t = 0; t < num_taps; t++) { *wptr1++ = *--wptr2; } } return(VP_OK); } /* * vpBicubicFilter * * Compute filter weights for a Mitchell bicubic. * * See Mitchell, D.P. and Netravali, A.N., "Reconstruction filters in * computer graphics," Proc. SIGGRAPH '88 (Computer Graphics V22 N4), * p. 221-8. */ vpResult vpBicubicFilter(b_value, c_value, num_taps, num_phases, weights, weights_bytes) double b_value; /* b in the filter kernel equation */ double c_value; /* c in the filter kernel equation */ int num_taps; /* number of filter taps to compute */ int num_phases; /* number of phases to compute */ float *weights; /* array for storing filter weights (num_taps*num_phases entries) */ int weights_bytes; /* size of array (for error checking) */ { int p, t; float *wptr1, *wptr2; double x0, delta_x, x, xa, tap_spacing, sum, normalize, value; if (weights_bytes != num_taps * num_phases * sizeof(float)) return(VPERROR_BAD_SIZE); if (num_phases % 2 != 0) return(VPERROR_BAD_VALUE); wptr1 = weights; tap_spacing = 4.0 / (double)num_taps; x0 = -tap_spacing * ((double)num_taps/2.0 - 1.0); delta_x = tap_spacing / (double)num_phases; for (p = 0; p < num_phases/2; p++) { x = x0; sum = 0; for (t = 0; t < num_taps; t++) { if (x < 0.0) xa = -x; else xa = x; if (xa < 1.0) { value = (((12. - 9.*b_value - 6.*c_value)*xa - 18. + 12.*b_value + 6.*c_value)*xa*xa + 6. - 2.*b_value) * 1./6.; } else { value = ((((-b_value - 6.*c_value)*xa + 6.*b_value + 30.*c_value)*xa - 12.*b_value - 48.*c_value)*xa + 8.*b_value + 24.*c_value)* 1./6.; } wptr1[t] = value; sum += value; x += tap_spacing; } normalize = 1.0 / sum; for (t = 0; t < num_taps; t++) { wptr1[t] *= normalize; } wptr1 += num_taps; x0 -= delta_x; } wptr2 = wptr1; for (p = 0; p < num_phases/2; p++) { for (t = 0; t < num_taps; t++) { *wptr1++ = *--wptr2; } } return(VP_OK); } /* * vpGaussianFilter * * Compute filter weights for a Gaussian. * For abs(x) <= 1.0: * k(x) = C * exp(-x*x/(2*sigma*sigma)) * (C is chosen so that k(x) integrates to 1). * Otherwise: * k(x) = 0 */ vpResult vpGaussianFilter(sigma, num_taps, num_phases, weights, weights_bytes) double sigma; /* standard deviation */ int num_taps; /* number of filter taps to compute */ int num_phases; /* number of phases to compute */ float *weights; /* array for storing filter weights (num_taps*num_phases entries) */ int weights_bytes; /* size of array (for error checking) */ { int p, t; float *wptr1, *wptr2; double x0, delta_x, x, tap_spacing, sigma2_inv, sum, normalize, value; if (weights_bytes != num_taps * num_phases * sizeof(float)) return(VPERROR_BAD_SIZE); if (num_phases % 2 != 0) return(VPERROR_BAD_VALUE); wptr1 = weights; sigma2_inv = -1.0 / (2.0 * sigma * sigma); tap_spacing = 2.0 / (double)num_taps; x0 = -tap_spacing * ((double)num_taps/2.0 - 1.0); delta_x = tap_spacing / (double)num_phases; for (p = 0; p < num_phases/2; p++) { x = x0; sum = 0; for (t = 0; t < num_taps; t++) { value = exp(x*x*sigma2_inv); wptr1[t] = value; sum += value; x += tap_spacing; } normalize = 1.0 / sum; for (t = 0; t < num_taps; t++) { wptr1[t] *= normalize; } wptr1 += num_taps; x0 -= delta_x; } wptr2 = wptr1; for (p = 0; p < num_phases/2; p++) { for (t = 0; t < num_taps; t++) { *wptr1++ = *--wptr2; } } return(VP_OK); } volpack-1.0b3/vp_file.c0000644000265600020320000011416605701116540011757 00000000000000/* * vp_file.c * * Routines for loading and storing volume data in disk files. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.26 $ */ #include "vp_global.h" static int StoreRLEVoxels ANSI_ARGS((vpContext *vpc, int fd, RLEVoxels *rle_voxels)); static int LoadRLEVoxels ANSI_ARGS((vpContext *vpc, int fd, RLEVoxels *rle_voxels, int offsets, int swab)); static void SwapWords ANSI_ARGS((void *data, unsigned size)); static void SwapVoxels ANSI_ARGS((vpContext *vpc, void *voxels, int num_voxels, int fields, int bytes_per_voxel)); #ifdef DEBUG void VPCheckScanOffsets ANSI_ARGS((RLEVoxels *rle_voxels, int rle_bytes_per_voxel)); #endif static void SwapOctreeNode ANSI_ARGS((vpContext *vpc, int level, void *node)); static int StoreTable ANSI_ARGS((vpContext *vpc, int fd, float *ptr, unsigned size)); static int LoadTable ANSI_ARGS((vpContext *vpc, int fd, float **ptr_ptr, unsigned *size_ptr)); /******************************************************************* * Classified Volume Files. * *******************************************************************/ /* file header structure */ typedef struct { unsigned magic; /* magic number for identification */ unsigned xlen; /* voxels in each dimension */ unsigned ylen; unsigned zlen; unsigned bytes_per_voxel; /* size of a classified voxel */ unsigned num_shade_fields; /* number of fields in a classified voxel (not including opacity) */ unsigned num_x_runs; /* number of run lengths for X view */ unsigned num_x_voxels; /* number of nonzero voxels for X view */ unsigned num_x_offsets; /* number of offsets per slice for X view */ unsigned num_y_runs; /* number of run lengths for Y view */ unsigned num_y_voxels; /* number of nonzero voxels for Y view */ unsigned num_y_offsets; /* number of offsets per slice for Y view */ unsigned num_z_runs; /* number of run lengths for Z view */ unsigned num_z_voxels; /* number of nonzero voxels for Z view */ unsigned num_z_offsets; /* number of offsets per slice for Z view */ float min_opacity; /* low opacity threshold */ } RLEVoxelHdr; /* * File layout: * RLEVoxelHdr hdr; * unsigned field_size[hdr.num_shade_fields]; (size of each voxel field) * unsigned field_offset[hdr.num_shade_fields]; (offset for each field) * unsigned field_max[hdr.num_shade_fields]; (max. value of each field) * padding to align to double word * unsigned char x_run_lengths[hdr.num_x_runs]; (run lengths for X view) * padding to align to double word * char x_data[hdr.num_x_voxels*hdr.bytes_per_voxel]; (voxel data for X view) * padding to align to double word * ScanOffset x_offsets[hdr.num_x_offsets]; (scanline offset for X view) * padding to align to double word * unsigned char y_run_lengths[hdr.num_y_runs]; (run lengths for Y view) * padding to align to double word * char y_data[hdr.num_y_voxels*hdr.bytes_per_voxel]; (voxel data for Y view) * padding to align to double word * ScanOffset y_offsets[hdr.num_y_offsets]; (scanline offset for Y view) * padding to align to double word * unsigned char z_run_lengths[hdr.num_z_runs]; (run lengths for Z view) * padding to align to double word * char z_data[hdr.num_z_voxels*hdr.bytes_per_voxel]; (voxel data for Z view) * padding to align to double word * ScanOffset z_offsets[hdr.num_z_offsets]; (scanline offset for Z view) * * The padding ensures that voxel data can be mapped into memory * without any word alignment problems. */ /* * vpStoreClassifiedVolume * * Store a run-length encoded, classified volume to a file. */ vpResult vpStoreClassifiedVolume(vpc, fd) vpContext *vpc; /* context containing the volume */ int fd; /* UNIX file descriptor open for writing */ { RLEVoxelHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int nsf, c; unsigned size; char pad_data[8]; int pad_bytes; int retcode; /* check for errors */ if ((retcode = VPCheckVoxelFields(vpc)) != VP_OK) return(retcode); /* write header */ header.magic = VP_CVFILE_MAGIC; header.xlen = vpc->xlen; header.ylen = vpc->ylen; header.zlen = vpc->zlen; header.bytes_per_voxel = vpc->rle_bytes_per_voxel; header.num_shade_fields = vpc->num_shade_fields; if (vpc->rle_x == NULL) { header.num_x_runs = 0; header.num_x_voxels = 0; header.num_x_offsets = 0; } else { if ((retcode = VPCheckClassifiedVolume(vpc, VP_X_AXIS)) != VP_OK) return(retcode); header.num_x_runs = vpc->rle_x->run_count; header.num_x_voxels = vpc->rle_x->data_count; header.num_x_offsets = vpc->rle_x->scan_offsets_per_slice; } if (vpc->rle_y == NULL) { header.num_y_runs = 0; header.num_y_voxels = 0; header.num_y_offsets = 0; } else { if ((retcode = VPCheckClassifiedVolume(vpc, VP_Y_AXIS)) != VP_OK) return(retcode); header.num_y_runs = vpc->rle_y->run_count; header.num_y_voxels = vpc->rle_y->data_count; header.num_y_offsets = vpc->rle_y->scan_offsets_per_slice; } if (vpc->rle_z == NULL) { header.num_z_runs = 0; header.num_z_voxels = 0; header.num_z_offsets = 0; } else { if ((retcode = VPCheckClassifiedVolume(vpc, VP_Z_AXIS)) != VP_OK) return(retcode); header.num_z_runs = vpc->rle_z->run_count; header.num_z_voxels = vpc->rle_z->data_count; header.num_z_offsets = vpc->rle_z->scan_offsets_per_slice; } header.min_opacity = vpc->min_opacity; if (vpc->write_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); /* write voxel layout information */ nsf = vpc->num_shade_fields; for (c = 0; c < nsf; c++) { field_data[c] = vpc->field_size[c]; field_data[nsf + c] = vpc->field_offset[c]; field_data[2*nsf + c] = vpc->field_max[c]; } size = 3*nsf*sizeof(unsigned); if (vpc->write_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); /* padding after header */ pad_bytes = (8 - ((sizeof(header) + size) % 8)) & 0x7; if (pad_bytes > 0) { bzero(pad_data, pad_bytes); if (vpc->write_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } /* write data */ if (vpc->rle_x != NULL) { if ((c = StoreRLEVoxels(vpc, fd, vpc->rle_x)) != VP_OK) return(c); } if (vpc->rle_y != NULL) { if ((c = StoreRLEVoxels(vpc, fd, vpc->rle_y)) != VP_OK) return(c); } if (vpc->rle_z != NULL) { if ((c = StoreRLEVoxels(vpc, fd, vpc->rle_z)) != VP_OK) return(c); } return(VP_OK); } /* * StoreRLEVoxels * * Write an RLEVoxels structure to a file. */ static int StoreRLEVoxels(vpc, fd, rle_voxels) vpContext *vpc; int fd; RLEVoxels *rle_voxels; { int size; char pad_data[8]; int pad_bytes; bzero(pad_data, sizeof(pad_data)); if (rle_voxels->run_count > 0) { size = rle_voxels->run_count; if (vpc->write_func(fd, rle_voxels->run_lengths, size) != size) return(VPSetError(vpc, VPERROR_IO)); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->write_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } if (rle_voxels->data_count > 0) { size = rle_voxels->data_count * vpc->rle_bytes_per_voxel; if (vpc->write_func(fd, rle_voxels->data, size) != size) return(VPSetError(vpc, VPERROR_IO)); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->write_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } if (rle_voxels->scan_offsets_per_slice > 0) { size = rle_voxels->scan_offsets_per_slice * rle_voxels->klen * sizeof(ScanOffset); if (vpc->write_func(fd, rle_voxels->scan_offsets, size) != size) return(VPSetError(vpc, VPERROR_IO)); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->write_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } return(VP_OK); } /* * vpLoadClassifiedVolume * * Load a run-length encoded, classified volume from a file. */ vpResult vpLoadClassifiedVolume(vpc, fd) vpContext *vpc; /* context to store the volume into */ int fd; /* UNIX file descriptor open for reading */ { RLEVoxelHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int nsf, c, swab; unsigned size; unsigned char *data; char pad_data[8]; int pad_bytes; unsigned x_run_offset; unsigned x_data_offset; unsigned x_offset_offset; unsigned y_run_offset; unsigned y_data_offset; unsigned y_offset_offset; unsigned z_run_offset; unsigned z_data_offset; unsigned z_offset_offset; int current_offset; int destroy_old_volume; /* read header */ if (vpc->read_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); swab = 0; if (header.magic != VP_CVFILE_MAGIC) { SwapWords(&header, sizeof(header)); if (header.magic != VP_CVFILE_MAGIC) return(VPSetError(vpc, VPERROR_BAD_FILE)); swab = 1; } /* read voxel layout information */ size = 3 * header.num_shade_fields * sizeof(unsigned); if (vpc->read_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapWords(field_data, size); /* padding after header */ pad_bytes = (8 - ((sizeof(header) + size) % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->read_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } /* check for consistency with old volume data */ destroy_old_volume = 0; if (vpc->xlen != header.xlen || vpc->ylen != header.ylen || vpc->zlen != header.zlen || vpc->raw_bytes_per_voxel < header.bytes_per_voxel || vpc->num_voxel_fields < header.num_shade_fields) destroy_old_volume = 1; nsf = header.num_shade_fields; for (c = 0; c < nsf; c++) { if (vpc->field_size[c] != field_data[c] || vpc->field_offset[c] != field_data[nsf + c] || vpc->field_max[c] != field_data[2*nsf + c]) destroy_old_volume = 1; } if (destroy_old_volume) { vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); vpc->raw_voxels = NULL; vpc->raw_voxels_size = 0; vpc->xstride = 0; vpc->ystride = 0; vpc->zstride = 0; } /* load new volume size */ if (destroy_old_volume) { vpc->xlen = header.xlen; vpc->ylen = header.ylen; vpc->zlen = header.zlen; vpc->raw_bytes_per_voxel = header.bytes_per_voxel; nsf = header.num_shade_fields; vpc->num_voxel_fields = nsf; for (c = 0; c < nsf; c++) { vpc->field_size[c] = field_data[c]; vpc->field_offset[c] = field_data[nsf + c]; vpc->field_max[c] = field_data[2*nsf + c]; } } vpc->num_shade_fields = nsf; vpc->min_opacity = header.min_opacity; vpc->rle_bytes_per_voxel = header.bytes_per_voxel; /* load new volume data */ if (vpc->mmap_func != NULL && !swab) { /* compute file offsets */ current_offset = sizeof(header) + size; current_offset += (8 - (current_offset % 8)) & 0x7; x_run_offset = current_offset; current_offset += header.num_x_runs; current_offset += (8 - (current_offset % 8)) & 0x7; x_data_offset = current_offset; current_offset += header.num_x_voxels * header.bytes_per_voxel; current_offset += (8 - (current_offset % 8)) & 0x7; x_offset_offset = current_offset; current_offset += header.num_x_offsets * sizeof(ScanOffset); current_offset += (8 - (current_offset % 8)) & 0x7; y_run_offset = current_offset; current_offset += header.num_y_runs; current_offset += (8 - (current_offset % 8)) & 0x7; y_data_offset = current_offset; current_offset += header.num_y_voxels * header.bytes_per_voxel; current_offset += (8 - (current_offset % 8)) & 0x7; y_offset_offset = current_offset; current_offset += header.num_y_offsets * sizeof(ScanOffset); current_offset += (8 - (current_offset % 8)) & 0x7; z_run_offset = current_offset; current_offset += header.num_z_runs; current_offset += (8 - (current_offset % 8)) & 0x7; z_data_offset = current_offset; current_offset += header.num_z_voxels * header.bytes_per_voxel; current_offset += (8 - (current_offset % 8)) & 0x7; z_offset_offset = current_offset; current_offset += header.num_z_offsets * sizeof(ScanOffset); /* memory-map the data */ if ((data = vpc->mmap_func(fd, current_offset, vpc->client_data)) == NULL) return(VPSetError(vpc, VPERROR_IO)); /* assign pointers to x view data */ vpc->rle_x = VPCreateRLEVoxels(vpc, header.ylen, header.zlen, header.xlen, 0, 0, 0); vpc->rle_x->run_count = header.num_x_runs; if (header.num_x_runs > 0) vpc->rle_x->run_lengths = (unsigned char *)(data + x_run_offset); vpc->rle_x->data_count = header.num_x_voxels; if (header.num_x_voxels > 0) vpc->rle_x->data = (void *)(data + x_data_offset); vpc->rle_x->scan_offsets_per_slice = header.num_x_offsets; if (header.num_x_offsets > 0) vpc->rle_x->scan_offsets = (ScanOffset *)(data + x_offset_offset); vpc->rle_x->mmapped = 1; /* assign pointers to y view data */ vpc->rle_y = VPCreateRLEVoxels(vpc, header.zlen, header.xlen, header.ylen, 0, 0, 0); vpc->rle_y->run_count = header.num_y_runs; if (header.num_y_runs > 0) vpc->rle_y->run_lengths = (unsigned char *)(data + y_run_offset); vpc->rle_y->data_count = header.num_y_voxels; if (header.num_y_voxels > 0) vpc->rle_y->data = (void *)(data + y_data_offset); vpc->rle_y->scan_offsets_per_slice = header.num_y_offsets; if (header.num_y_offsets > 0) vpc->rle_y->scan_offsets = (ScanOffset *)(data + y_offset_offset); vpc->rle_y->mmapped = 1; /* assign pointers to z view data */ vpc->rle_z = VPCreateRLEVoxels(vpc, header.xlen, header.ylen, header.zlen, 0, 0, 0); vpc->rle_z->run_count = header.num_z_runs; if (header.num_z_runs > 0) vpc->rle_z->run_lengths = (unsigned char *)(data + z_run_offset); vpc->rle_z->data_count = header.num_z_voxels; if (header.num_z_voxels > 0) vpc->rle_z->data = (void *)(data + z_data_offset); vpc->rle_z->scan_offsets_per_slice = header.num_z_offsets; if (header.num_z_offsets > 0) vpc->rle_z->scan_offsets = (ScanOffset *)(data + z_offset_offset); vpc->rle_z->mmapped = 1; } else { /* read the x view data into memory */ if (header.num_x_runs != 0) { vpc->rle_x = VPCreateRLEVoxels(vpc, header.ylen, header.zlen, header.xlen, header.num_x_voxels, header.num_x_runs, header.bytes_per_voxel); if ((c = LoadRLEVoxels(vpc, fd, vpc->rle_x, header.num_x_offsets, swab)) != VP_OK) return(c); } /* read the y view data into memory */ if (header.num_y_runs != 0) { vpc->rle_y = VPCreateRLEVoxels(vpc, header.zlen, header.xlen, header.ylen, header.num_y_voxels, header.num_y_runs, header.bytes_per_voxel); if ((c = LoadRLEVoxels(vpc, fd, vpc->rle_y, header.num_y_offsets, swab)) != VP_OK) return(c); } /* read the z view data into memory */ if (header.num_z_runs != 0) { vpc->rle_z = VPCreateRLEVoxels(vpc, header.xlen, header.ylen, header.zlen, header.num_z_voxels, header.num_z_runs, header.bytes_per_voxel); if ((c = LoadRLEVoxels(vpc, fd, vpc->rle_z, header.num_z_offsets, swab)) != VP_OK) return(c); } } #ifdef DEBUG if (vpc->rle_x != NULL) { printf("Checking X scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_x, vpc->rle_bytes_per_voxel); } if (vpc->rle_y != NULL) { printf("Checking Y scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_y, vpc->rle_bytes_per_voxel); } if (vpc->rle_z != NULL) { printf("Checking Z scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_z, vpc->rle_bytes_per_voxel); } #endif return(VP_OK); } /* * LoadRLEVoxels * * Load an RLEVoxels structure from a file. */ static int LoadRLEVoxels(vpc, fd, rle_voxels, offsets, swab) vpContext *vpc; int fd; RLEVoxels *rle_voxels; int offsets; int swab; { int size; char pad_data[8]; int pad_bytes; if (rle_voxels->run_count > 0) { size = rle_voxels->run_count; if (vpc->read_func(fd, rle_voxels->run_lengths, size) != size) return(VPSetError(vpc, VPERROR_IO)); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->read_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } if (rle_voxels->data_count > 0) { size = rle_voxels->data_count * vpc->rle_bytes_per_voxel; if (vpc->read_func(fd, rle_voxels->data, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapVoxels(vpc, rle_voxels->data, rle_voxels->data_count, vpc->num_shade_fields, vpc->rle_bytes_per_voxel); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->read_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } if (offsets > 0) { rle_voxels->scan_offsets_per_slice = offsets; size = rle_voxels->klen * offsets * sizeof(ScanOffset); Alloc(vpc, rle_voxels->scan_offsets, ScanOffset *, size, "scan_offsets"); if (vpc->read_func(fd, rle_voxels->scan_offsets, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapWords(rle_voxels->scan_offsets, size); pad_bytes = (8 - (size % 8)) & 0x7; if (pad_bytes > 0) { if (vpc->read_func(fd, pad_data, pad_bytes) != pad_bytes) return(VPSetError(vpc, VPERROR_IO)); } } return(VP_OK); } /* * SwapWords * * Byte-swap word data to change the endianess. */ static void SwapWords(data, size) void *data; unsigned size; { unsigned char *ptr; int tmp1, tmp2; ptr = data; while (size >= 4) { tmp1 = ptr[0]; ptr[0] = ptr[3]; ptr[3] = tmp1; tmp2 = ptr[1]; ptr[1] = ptr[2]; ptr[2] = tmp2; size -= 4; ptr += 4; } } /* * SwapVoxels * * Byte-swap voxel data to change the endianess. */ static void SwapVoxels(vpc, voxels, num_voxels, fields, bytes_per_voxel) vpContext *vpc; /* context */ void *voxels; /* array of voxels */ int num_voxels; /* number of voxels in the array */ int fields; /* number of fields in voxel */ int bytes_per_voxel; /* size of voxel in bytes */ { int f, size, offset; unsigned char *voxel_ptr; int tmp1, tmp2; /* check if any of the fields of the voxel need swapping */ size = 0; for (f = 0; f < fields; f++) { if (vpc->field_size[f] > size) size = vpc->field_size[f]; } if (size <= 1) return; /* do the swapping */ voxel_ptr = voxels; while (num_voxels-- > 0) { for (f = 0; f < fields; f++) { size = vpc->field_size[f]; if (size == 1) continue; offset = vpc->field_offset[f]; if (size == 2) { tmp1 = voxel_ptr[offset]; voxel_ptr[offset] = voxel_ptr[offset+1]; voxel_ptr[offset+1] = tmp1; } else { tmp1 = voxel_ptr[offset]; voxel_ptr[offset] = voxel_ptr[offset+3]; voxel_ptr[offset+3] = tmp1; tmp2 = voxel_ptr[offset+1]; voxel_ptr[offset+1] = voxel_ptr[offset+2]; voxel_ptr[offset+2] = tmp2; } } voxel_ptr += bytes_per_voxel; } } /******************************************************************* * Min-Max Octree Files. * *******************************************************************/ /* file header structure */ typedef struct { unsigned magic; /* magic number for identification */ unsigned xlen; /* voxels in each dimension */ unsigned ylen; unsigned zlen; int num_clsfy_params; /* # of params for classification */ int levels; /* number of levels in octree */ int root_node_size; /* voxels/side for root level */ int base_node_size; /* voxels/side for base level */ int range_bytes_per_node; /* bytes/node for min/max data */ int base_bytes_per_node; /* bytes/node for base level */ int nonbase_bytes_per_node; /* bytes/node for non-base level */ int status_offset; /* offset to status field */ int child_offset; /* offset to child field */ unsigned octree_bytes; /* bytes of storage for the octree */ } MinMaxOctreeHdr; /* * File layout: * MinMaxOctreeHdr hdr; * unsigned param_size[hdr.num_clsfy_params]; (size of each parameter, bytes) * unsigned param_max[hdr.num_clsfy_params]; (max. value of each parameter) * unsigned node_offset[hdr.num_clsfy_params];(node offset to min/max data) * char data[octree_bytes]; (octree data) */ /* * vpStoreMinMaxOctree * * Store a min-max octree to a file. */ vpResult vpStoreMinMaxOctree(vpc, fd) vpContext *vpc; /* context containing the octree */ int fd; /* UNIX file descriptor open for writing */ { MinMaxOctreeHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int ncp, c; unsigned size; if (vpc->mm_octree == NULL) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* write header */ bzero(&header, sizeof(MinMaxOctreeHdr)); header.magic = VP_OCTFILE_MAGIC; header.xlen = vpc->xlen; header.ylen = vpc->ylen; header.zlen = vpc->zlen; header.num_clsfy_params = vpc->num_clsfy_params; header.levels = vpc->mm_octree->levels; header.root_node_size = vpc->mm_octree->root_node_size; header.base_node_size = vpc->mm_octree->base_node_size; header.range_bytes_per_node = vpc->mm_octree->range_bytes_per_node; header.base_bytes_per_node = vpc->mm_octree->base_bytes_per_node; header.nonbase_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; header.status_offset = vpc->mm_octree->status_offset; header.child_offset = vpc->mm_octree->child_offset; header.octree_bytes = vpc->mm_octree->octree_bytes; if (vpc->write_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); /* write parameter size/offset information */ ncp = vpc->num_clsfy_params; for (c = 0; c < ncp; c++) { field_data[c] = vpc->field_size[vpc->param_field[c]]; field_data[ncp + c] = vpc->field_max[vpc->param_field[c]]; field_data[2*ncp + c] = vpc->mm_octree->node_offset[c]; } size = 3*ncp*sizeof(unsigned); if (vpc->write_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); /* write octree data */ size = vpc->mm_octree->octree_bytes; if (vpc->write_func(fd, vpc->mm_octree->root, size) != size) return(VPSetError(vpc, VPERROR_IO)); return(VP_OK); } /* * vpLoadMinMaxOctree * * Load a min-max octree from a file. */ vpResult vpLoadMinMaxOctree(vpc, fd) vpContext *vpc; /* context to store the octree into */ int fd; /* UNIX file descriptor open for reading */ { MinMaxOctreeHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int ncp, c, swab; unsigned size; /* read header */ if (vpc->read_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); swab = 0; if (header.magic != VP_OCTFILE_MAGIC) { SwapWords(&header, sizeof(header)); if (header.magic != VP_OCTFILE_MAGIC) return(VPSetError(vpc, VPERROR_BAD_FILE)); swab = 1; } /* read parameter size/offset information */ size = 3 * header.num_clsfy_params * sizeof(unsigned); if (vpc->read_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapWords(field_data, size); /* check for consistency with current volume data */ if ((c = VPCheckRawVolume(vpc)) != VP_OK) return(c); if (header.xlen != vpc->xlen || header.ylen != vpc->ylen || header.zlen != vpc->zlen || header.num_clsfy_params != vpc->num_clsfy_params) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); ncp = vpc->num_clsfy_params; for (c = 0; c < ncp; c++) { if (field_data[c] != vpc->field_size[vpc->param_field[c]] || field_data[ncp + c] != vpc->field_max[vpc->param_field[c]]) return(VPSetError(vpc, VPERROR_BAD_VOXEL)); } /* clear old octree */ vpDestroyMinMaxOctree(vpc); /* initialize new octree */ Alloc(vpc, vpc->mm_octree, MinMaxOctree *, sizeof(MinMaxOctree), "MinMaxOctree"); bzero(vpc->mm_octree, sizeof(MinMaxOctree)); vpc->mm_octree->levels = header.levels; vpc->mm_octree->root_node_size = header.root_node_size; vpc->mm_octree->base_node_size = header.base_node_size; vpc->mm_octree->range_bytes_per_node = header.range_bytes_per_node; vpc->mm_octree->base_bytes_per_node = header.base_bytes_per_node; vpc->mm_octree->nonbase_bytes_per_node = header.nonbase_bytes_per_node; vpc->mm_octree->status_offset = header.status_offset; vpc->mm_octree->child_offset = header.child_offset; vpc->mm_octree->octree_bytes = header.octree_bytes; ncp = header.num_clsfy_params; for (c = 0; c < ncp; c++) vpc->mm_octree->node_offset[c] = field_data[2*ncp + c]; /* load octree data */ size = header.octree_bytes; Alloc(vpc, vpc->mm_octree->root, void *, size, "mm_octree"); if (vpc->read_func(fd, vpc->mm_octree->root, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapOctreeNode(vpc, 0, vpc->mm_octree->root); return(VP_OK); } /* * SwapOctreeNode * * Recursive depth-first traversal of an octree to byte-swap each node's * data (in order to switch the endianess). */ static void SwapOctreeNode(vpc, level, node) vpContext *vpc; int level; void *node; { int p, field, size, offset, tmp1, tmp2; int child_bytes_per_node; char *node_ptr = node; /* byte swap min-max data */ for (p = 0; p < vpc->num_clsfy_params; p++) { field = vpc->param_field[p]; size = vpc->field_size[field]; if (size != 1) { ASSERT(size == 2); offset = vpc->mm_octree->node_offset[p]; tmp1 = node_ptr[offset]; node_ptr[offset] = node_ptr[offset+1]; node_ptr[offset+1] = tmp1; tmp2 = node_ptr[offset+2]; node_ptr[offset+2] = node_ptr[offset+3]; node_ptr[offset+3] = tmp2; } } /* byte swap child pointer and recurse */ if (level != vpc->mm_octree->levels-1) { offset = vpc->mm_octree->child_offset; tmp1 = node_ptr[offset]; node_ptr[offset] = node_ptr[offset+3]; node_ptr[offset+3] = tmp1; tmp2 = node_ptr[offset+1]; node_ptr[offset+1] = node_ptr[offset+2]; node_ptr[offset+2] = tmp2; ASSERT(IntField(node, offset) != 0); node_ptr = (char *)vpc->mm_octree->root + IntField(node, offset); if (level == vpc->mm_octree->levels-2) child_bytes_per_node = vpc->mm_octree->base_bytes_per_node; else child_bytes_per_node = vpc->mm_octree->nonbase_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); node_ptr += child_bytes_per_node; SwapOctreeNode(vpc, level+1, node_ptr); } } /******************************************************************* * Raw Volume Files. * *******************************************************************/ /* file header structure */ typedef struct { unsigned magic; /* magic number for identification */ unsigned xlen; /* voxels in each dimension */ unsigned ylen; unsigned zlen; unsigned bytes_per_voxel; /* size of a raw voxel */ unsigned num_voxel_fields; /* number of fields in a voxel */ unsigned num_shade_fields; /* number of fields for shading */ unsigned num_clsfy_fields; /* number of fields for classification */ int xstride; /* strides for voxel data */ int ystride; int zstride; } RawVoxelHdr; /* * File layout: * RawVoxelHdr hdr; * unsigned field_size[hdr.num_shade_fields]; (size of each voxel field) * unsigned field_offset[hdr.num_shade_fields]; (offset for each field) * unsigned field_max[hdr.num_shade_fields]; (max. value of each field) * char data[hdr.xlen*hdr.ylen*hdr.zlen*hdr.bytes_per_voxel]; (volume data) */ /* * vpStoreRawVolume * * Store an unclassified volume to a file. */ vpResult vpStoreRawVolume(vpc, fd) vpContext *vpc; /* context containing the volume */ int fd; /* UNIX file descriptor open for writing */ { RawVoxelHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int nvf, c; unsigned size; int retcode; /* check for errors */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); /* write header */ header.magic = VP_RVFILE_MAGIC; header.xlen = vpc->xlen; header.ylen = vpc->ylen; header.zlen = vpc->zlen; header.bytes_per_voxel = vpc->raw_bytes_per_voxel; header.num_voxel_fields = vpc->num_voxel_fields; header.num_shade_fields = vpc->num_shade_fields; header.num_clsfy_fields = vpc->num_clsfy_params; header.xstride = vpc->xstride; header.ystride = vpc->ystride; header.zstride = vpc->zstride; if (vpc->write_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); /* write voxel layout information */ nvf = vpc->num_voxel_fields; for (c = 0; c < nvf; c++) { field_data[c] = vpc->field_size[c]; field_data[nvf + c] = vpc->field_offset[c]; field_data[2*nvf + c] = vpc->field_max[c]; } size = 3*nvf*sizeof(unsigned); if (vpc->write_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); /* write data */ if (vpc->write_func(fd, vpc->raw_voxels, vpc->raw_voxels_size) != vpc->raw_voxels_size) return(VPSetError(vpc, VPERROR_IO)); return(VP_OK); } /* * vpLoadRawVolume * * Load an unclassified volume from a file. */ vpResult vpLoadRawVolume(vpc, fd) vpContext *vpc; /* context to store the volume into */ int fd; /* UNIX file descriptor open for reading */ { RawVoxelHdr header; unsigned field_data[3*VP_MAX_FIELDS]; int nvf, c, swab; unsigned size; unsigned voxel_offset; unsigned char *data; int destroy_old_volume; /* read header */ if (vpc->read_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); swab = 0; if (header.magic != VP_RVFILE_MAGIC) { SwapWords(&header, sizeof(header)); if (header.magic != VP_RVFILE_MAGIC) return(VPSetError(vpc, VPERROR_BAD_FILE)); swab = 1; } /* read voxel layout information */ size = 3 * header.num_voxel_fields * sizeof(unsigned); if (vpc->read_func(fd, field_data, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) SwapWords(field_data, size); voxel_offset = sizeof(header) + size; /* destroy old volume data */ vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); /* load new volume size */ vpc->xlen = header.xlen; vpc->ylen = header.ylen; vpc->zlen = header.zlen; vpc->raw_bytes_per_voxel = header.bytes_per_voxel; vpc->num_voxel_fields = header.num_voxel_fields; vpc->num_shade_fields = header.num_shade_fields; vpc->num_clsfy_params = header.num_clsfy_fields; vpc->xstride = header.xstride; vpc->ystride = header.ystride; vpc->zstride = header.zstride; nvf = header.num_voxel_fields; for (c = 0; c < nvf; c++) { vpc->field_size[c] = field_data[c]; vpc->field_offset[c] = field_data[nvf + c]; vpc->field_max[c] = field_data[2*nvf + c]; } /* load new volume data */ size = vpc->xlen*vpc->ylen*vpc->zlen*vpc->raw_bytes_per_voxel; vpc->raw_voxels_size = size; if (vpc->mmap_func != NULL && !swab) { if ((vpc->raw_voxels = vpc->mmap_func(fd, voxel_offset, vpc->client_data)) == NULL) return(VPSetError(vpc, VPERROR_IO)); } else { Alloc(vpc, vpc->raw_voxels, void *, size, "raw_voxels"); if (vpc->read_func(fd, vpc->raw_voxels, size) != size) return(VPSetError(vpc, VPERROR_IO)); if (swab) { SwapVoxels(vpc, vpc->raw_voxels, vpc->xlen*vpc->ylen*vpc->zlen, vpc->num_voxel_fields, vpc->raw_bytes_per_voxel); } } return(VP_OK); } /******************************************************************* * Rendering Context Dump Files. * *******************************************************************/ /* file header structure */ typedef struct { unsigned magic; /* magic number for identification */ unsigned major_version; /* major version number */ unsigned minor_version; /* minor version number */ unsigned max_fields; /* value of VP_MAX_FIELDS */ unsigned max_material; /* value of VP_MAX_MATERIAL */ unsigned max_lights; /* value of VP_MAX_LIGHTS */ } VpcHdr; /* * File layout: * VpcHdr hdr; * vpContext vpc; --> truncated just before "end_of_parameters" field * unsigned shade_color_table_size; * float shade_color_table[shade_color_table_size]; * unsigned shade_weight_table_size; * float shade_weight_table[shade_weight_table_size]; * for i = 1 to vpc.num_clsfy_params: * int clsfy_table_size; * float clsfy_table[clsfy_table_size]; */ /* * vpStoreContext * * Store the contents of a volpack context to a file. All state parameters * stored directly in the vpContext structure are stored. User-supplied * lookup tables are also stored. Volume data and octrees are not stored * (use the routines specifically for storing those data structures), and * internal tables that can be computed from other state variables * (e.g. depth cueing lookup table) are not stored. */ vpResult vpStoreContext(vpc, fd) vpContext *vpc; int fd; { VpcHdr header; int i; unsigned vpc_size; header.magic = VP_VPCFILE_MAGIC; header.major_version = VP_MAJOR_VERSION; header.minor_version = VP_MINOR_VERSION; header.max_fields = VP_MAX_FIELDS; header.max_material = VP_MAX_MATERIAL; header.max_lights = VP_MAX_LIGHTS; vpc_size = vpFieldOffset(vpc, end_of_parameters); if (vpc->write_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); if (vpc->write_func(fd, vpc, vpc_size) != vpc_size) return(VPSetError(vpc, VPERROR_IO)); if (!StoreTable(vpc, fd, vpc->shade_color_table, vpc->shade_color_table_size)) return(VPSetError(vpc, VPERROR_IO)); if (!StoreTable(vpc, fd, vpc->shade_weight_table, vpc->shade_weight_table_size)) return(VPSetError(vpc, VPERROR_IO)); for (i = 0; i < vpc->num_clsfy_params; i++) { if (!StoreTable(vpc, fd, vpc->clsfy_table[i], vpc->clsfy_table_size[i])) return(VPSetError(vpc, VPERROR_IO)); } return(VP_OK); } /* * StoreTable * * Store a table to a file and check for errors. Return value is 1 for * success, 0 for failure. */ static int StoreTable(vpc, fd, ptr, size) vpContext *vpc; int fd; float *ptr; unsigned size; { if (size == 0 || ptr == NULL) { size = 0; if (vpc->write_func(fd, &size, sizeof(size)) != sizeof(size)) return(0); } else { if (vpc->write_func(fd, &size, sizeof(size)) != sizeof(size)) return(0); if (vpc->write_func(fd, ptr, size) != size) return(0); } return(1); } /* * vpLoadContext * * Load a volpack context from a file. The old contents of the context are * destroyed, including any volume data. Lookup tables for shading and * classification that are loaded from the file are stored in newly-allocated * memory, but the application is responsible for freeing the tables; * existing tables in the context are not overwritten (since there is no * way for the application to predict the right table sizes), and the new * tables are not freed when vpDestroyContext is called (since volpack * normally does not manage the tables). Byte swapping is not performed. */ vpResult vpLoadContext(vpc, fd) vpContext *vpc; int fd; { VpcHdr header; int swab, i; unsigned vpc_size; /* read header */ if (vpc->read_func(fd, &header, sizeof(header)) != sizeof(header)) return(VPSetError(vpc, VPERROR_IO)); swab = 0; if (header.magic != VP_VPCFILE_MAGIC) return(VPSetError(vpc, VPERROR_BAD_FILE)); if (header.major_version != VP_MAJOR_VERSION || header.minor_version != VP_MINOR_VERSION || header.max_fields != VP_MAX_FIELDS || header.max_material != VP_MAX_MATERIAL || header.max_lights != VP_MAX_LIGHTS) { return(VPSetError(vpc, VPERROR_BAD_VALUE)); } /* destroy old data structures */ vpDestroyMinMaxOctree(vpc); vpDestroyClassifiedVolume(vpc); /* load new context */ vpc_size = vpFieldOffset(vpc, end_of_parameters); if (vpc->read_func(fd, vpc, vpc_size) != vpc_size) return(VPSetError(vpc, VPERROR_IO)); vpc->raw_voxels = NULL; for (i = 0; i < VP_MAX_FIELDS; i++) vpc->clsfy_table[i] = NULL; vpc->shade_color_table = NULL; vpc->shade_weight_table = NULL; vpc->image = NULL; if (vpc->shade_func == NULL) vpc->shading_mode = LOOKUP_SHADER; if (!LoadTable(vpc, fd, &vpc->shade_color_table, (unsigned *)&vpc->shade_color_table_size)) goto failed; if (!LoadTable(vpc, fd, &vpc->shade_weight_table, (unsigned *)&vpc->shade_weight_table_size)) goto failed; for (i = 0; i < vpc->num_clsfy_params; i++) { if (!LoadTable(vpc, fd, &vpc->clsfy_table[i], (unsigned *)&vpc->clsfy_table_size[i])) goto failed; } return(VP_OK); failed: if (vpc->shade_color_table != NULL) { Dealloc(vpc, vpc->shade_color_table); vpc->shade_color_table = NULL; } if (vpc->shade_weight_table != NULL) { Dealloc(vpc, vpc->shade_weight_table); vpc->shade_weight_table = NULL; } for (i = 0; i < vpc->num_clsfy_params; i++) { if (vpc->clsfy_table[i] != NULL) { Dealloc(vpc, vpc->clsfy_table[i]); vpc->clsfy_table[i] = NULL; } } return(VPSetError(vpc, VPERROR_IO)); } /* * LoadTable * * Load a table from a file and check for errors. Return value is 1 for * success, 0 for failure. */ static int LoadTable(vpc, fd, ptr_ptr, size_ptr) vpContext *vpc; int fd; float **ptr_ptr; unsigned *size_ptr; { if (vpc->read_func(fd, size_ptr, sizeof(unsigned)) != sizeof(unsigned)) return(0); if (*size_ptr != 0) { Alloc(vpc, *ptr_ptr, void *, *size_ptr, "lookup table"); if (vpc->read_func(fd, *ptr_ptr, *size_ptr) != *size_ptr) return(0); } return(1); } volpack-1.0b3/ChangeLog0000644000265600020320000001035210727044625011741 00000000000000--------------- Released version 1.0 beta1 --------------- 1. Bug Fix: vpCreateMinMaxOctree caused a segmentation fault for volume sizes that were not a power of two. 2. Debug Feature: Added debugging code for compositing calculation. 3. Debug Feature: Added intermediate image coordinates to vpTracePixel output. 4. Bug Fix: Added a check in vpRamp for non-increasing x coordinates to prevent a divide-by-zero error. 5. Bug Fix: Added a version of the compositing routine (vp_compAn.m4) that does not have unrolled loops, since some compilers have trouble with the unrolled version (too many basic blocks to run the optimizer in a reasonable amount of time). The unrolled version is now in vp_compAu.m4 instead of vp_compA.m4. The Makefile can be modified to choose one or the other version. 6. Feature: Added complete man pages for all library routines. 7. Bug Fix: In vpSetCallback, revert to default behavior if the function argument is NULL (instead of causing a NULL dereference later on). 8. Feature: Added vpStoreContext and vpLoadContext to save and restore rendering contexts (and to make it easier to reproduce bugs). 9. Feature: Changed vpLoadRawVolume to memory-map the file if requested 10. Bug Fix: Fixed missing and incorrect function prototypes. 11. Feature: Changed makefile and headers to use GNU autoconf. --------------- Released version 1.0 beta2 --------------- 12. Bug Fix: Fixed minus-sign error in formula for depth cueing factor. This eliminates the brightness changes that occurred when rotating a volume past a 45 degree point with depth cueing enabled. 13. Debug Feature: Added code to collect rendering statistics for performance analysis. 14. Debug Feature: Allow negative opacity threshold (to experiment with disabling the benefit of spatial data structures). 15. Bug Fix: Fixed the result of vpGeti with the VP_VIEW_Y_SIZE or VP_VIEW_Z_SIZE options. 16. Reorganization and renaming of compositing functions to make it easier to conditionally compile in just some of the special-case versions. Also merged code for unrolled loops with code for non-unrolled loops into one M4 source file. 17. Feature: Added experimental "index volume" code for faster early-ray termination. 18. Debug Feature: Added define flags to conditionally remove early-ray termination and resampling loops for performance analysis runs. 19. Feature: Added experimental brute-force raycaster for performance comparisons. 20. Feature: Implemented shadows. 21. Bug Fix: Added missing return value in vpDestroyClassifiedVolume. 22. Feature: Implemented resampling filters for scaling volume data (vpSetFilter(), vpResample(), vpBoxFilter(), vpLinearFilter(), vpBicubicFilter(), vpGaussianFilter()). 23. Feature: Added capability to produce images with a variety of pixel formats, including an optional alpha channel. *** INCOMPATIBLE CHANGE TO vpSetImage *** 24. Feature: Changed vpGetImage to produce images with the same pixel formats supported by vpSetImage, and to allow reading back the shadow buffer. *** INCOMPATIBLE CHANGE TO vpGetImage *** 25. Reorganized macros in vp_compA.m4 and vp_warpA.m4. 26. Bug Fix: Refactor view if shadows are turned on. 27. Feature: The callback functions for VP_LOG_ALLOC_FUNC, VP_LOG_FREE_FUNC and VP_STATUS_FUNC now get one additional argument, the client_data pointer associated with the context. 28. Bug Fix: Check if intermediate image buffer must be resized even if view has not changed (since number of color channels may be different). 29. Feature: Allow clamping to be disabled when computing shading lookup table (vpShadeTable). 30. Debug Feature: Added options to override default compositing direction and to retrieve compositing order. 31. Bug Fix: Check for invalid voxel field sizes when using lookup table shading. 32. Bug Fix: Don't destroy classified volume when raw voxel array is set to NULL pointer. 33. Bug Fix: Fixed error in vpNormalIndex (also affecting vpScanlineNormals and vpVolumeNormals) that resulted in incorrect calculation of isolated surface normals due to a roundoff error. This sometimes also resulted in index values greater than the maximum permissible value. volpack-1.0b3/vp_transpose.c0000644000265600020320000001052605701116547013060 00000000000000/* * vp_transpose.c * * Routines to transpose a raw volume. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.18 $ */ #include "vp_global.h" static int TransposeBlock ANSI_ARGS((void *src, int src_xstride, int src_ystride, int src_zstride, void *dst, int dst_xstride, int dst_ystride, int dst_zstride, int xlen, int ylen, int zlen, int bytes_per_voxel)); /* * vpTranspose * * Transpose the raw volume data. */ vpResult vpTranspose(vpc, kaxis) vpContext *vpc; /* context */ int kaxis; /* axis which will have the largest stride after transposing */ { void *blk; /* buffer to store data during transpose */ int xlen, ylen, zlen; /* volume size */ int src_xstride, src_ystride, src_zstride; /* strides of src voxels */ int dst_xstride, dst_ystride, dst_zstride; /* strides of dst voxels */ int bytes_per_voxel; /* size of voxel */ int retcode; /* XXX replace with a blocked algorithm to conserve memory and improve cache performance */ /* check for errors */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); /* decide on the new strides */ xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; src_xstride = vpc->xstride; src_ystride = vpc->ystride; src_zstride = vpc->zstride; bytes_per_voxel = vpc->raw_bytes_per_voxel; switch (kaxis) { case VP_X_AXIS: dst_xstride = ylen*zlen*bytes_per_voxel; dst_ystride = bytes_per_voxel; dst_zstride = ylen*bytes_per_voxel; break; case VP_Y_AXIS: dst_xstride = zlen*bytes_per_voxel; dst_ystride = zlen*xlen*bytes_per_voxel; dst_zstride = bytes_per_voxel; break; case VP_Z_AXIS: dst_xstride = bytes_per_voxel; dst_ystride = xlen*bytes_per_voxel; dst_zstride = xlen*ylen*bytes_per_voxel; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } if (src_xstride == dst_xstride && src_ystride == dst_ystride && src_zstride == dst_zstride) return(VP_OK); /* transpose volume */ Alloc(vpc, blk, void *, xlen*ylen*zlen*bytes_per_voxel, "transpose_tmp"); TransposeBlock(vpc->raw_voxels, src_xstride, src_ystride, src_zstride, blk, dst_xstride, dst_ystride, dst_zstride, xlen, ylen, zlen, bytes_per_voxel); bcopy(blk, vpc->raw_voxels, xlen*ylen*zlen*bytes_per_voxel); Dealloc(vpc, blk); vpc->xstride = dst_xstride; vpc->ystride = dst_ystride; vpc->zstride = dst_zstride; return(VP_OK); } /* * TransposeBlock * * Transpose a block of volume data by copying it from a source array * to a destination array using the indicated strides. */ static int TransposeBlock(src, src_xstride, src_ystride, src_zstride, dst, dst_xstride, dst_ystride, dst_zstride, xlen, ylen, zlen, bytes_per_voxel) void *src; /* source array */ int src_xstride; /* strides for source array */ int src_ystride; int src_zstride; void *dst; /* destination array */ int dst_xstride; /* strides for destination array */ int dst_ystride; int dst_zstride; int xlen, ylen, zlen; /* size of block in voxels per side */ int bytes_per_voxel; /* size of a voxel */ { int x, y, z, b; unsigned char *src_ptr; unsigned char *dst_ptr; src_ptr = src; dst_ptr = dst; for (z = 0; z < zlen; z++) { for (y = 0; y < ylen; y++) { for (x = 0; x < xlen; x++) { for (b = 0; b < bytes_per_voxel; b++) dst_ptr[b] = src_ptr[b]; src_ptr += src_xstride; dst_ptr += dst_xstride; } src_ptr += src_ystride - xlen*src_xstride; dst_ptr += dst_ystride - xlen*dst_xstride; } src_ptr += src_zstride - ylen*src_ystride; dst_ptr += dst_zstride - ylen*dst_ystride; } } volpack-1.0b3/missing0000755000265600020320000002557710515602102011566 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: volpack-1.0b3/makeopts0000755000265600020320000000106210727044625011736 00000000000000#!/bin/sh # # makeopts # # Create a C source file containing an initialized string with the # compiler options used to compile VolPack. # # Copyright (c) 2007 Andreas Tille # Author: # Andreas Tille # License: BSD # Usage: makeopts output_file [compiler_options ...] progname=`basename $0` if [ $# -lt 2 ] ; then echo "Usage: $progname output_file [compiler_options ...]" exit 1 fi outfile=$1 shift cat > $outfile <. Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | 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-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-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 ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: volpack-1.0b3/ltmain.sh0000644000265600020320000060015710404615640012010 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 Debian 1.5.22-4" TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # 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 # 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/" ##################################### # 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_xdir="$my_gentop/$my_xlib" $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 ;; 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 else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built fi 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) # 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%" test "X$link_all_deplibs" != Xno && libs="$libs $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 -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) 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" ;; *) $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 ;; 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 wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 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" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` else compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` fi ;; * ) compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; 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" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` 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" | $Xsed -e "$sed_quote_subst"` 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' # 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 \${1+\"\$@\"}\" 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" | $Xsed -e "$sed_quote_subst"` 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" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 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" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $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 if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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 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: volpack-1.0b3/vp_context.c0000644000265600020320000014714005701373304012525 00000000000000/* * vp_context.c * * Routines to create, modify and destroy vpContext objects. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.28 $ */ #include "vp_global.h" static void InitContext ANSI_ARGS((vpContext *vpc)); #ifdef HAVE_HIRES_TIMER static void StartHiResTimer ANSI_ARGS((vpContext *vpc)); #endif #ifdef STATISTICS int vpResampleCount = 0; int vpCompositeCount = 0; int vpERTSkipCount = 0; int vpERTSkipAgainCount = 0; int vpERTUpdateCount = 0; int vpSpecialZeroSkipCount = 0; int vpRunFragmentCount = 0; #endif /* * InitContext * * Initialize the fields of a context that have defaults. */ static void InitContext(vpc) vpContext *vpc; { extern int read(), write(); int m, l; vpc->xlen = 0; vpc->ylen = 0; vpc->zlen = 0; vpc->raw_bytes_per_voxel = 0; vpc->num_voxel_fields = 0; vpc->num_shade_fields = 0; vpc->min_opacity = 0.0; vpc->num_clsfy_params = 0; vpc->color_channels = 1; vpc->shading_mode = LOOKUP_SHADER; vpc->num_materials = 1; vpc->color_field = 0; vpc->weight_field = 0; for (m = 0; m < VP_MAX_MATERIAL; m++) { vpc->matl_props[m][EXT_SURFACE][MATL_AMB_R] = DEFAULT_AMBIENT; vpc->matl_props[m][EXT_SURFACE][MATL_DIFF_R] = DEFAULT_DIFFUSE; vpc->matl_props[m][EXT_SURFACE][MATL_SPEC_R] = DEFAULT_SPECULAR; vpc->matl_props[m][EXT_SURFACE][MATL_AMB_G] = DEFAULT_AMBIENT; vpc->matl_props[m][EXT_SURFACE][MATL_DIFF_G] = DEFAULT_DIFFUSE; vpc->matl_props[m][EXT_SURFACE][MATL_SPEC_G] = DEFAULT_SPECULAR; vpc->matl_props[m][EXT_SURFACE][MATL_AMB_B] = DEFAULT_AMBIENT; vpc->matl_props[m][EXT_SURFACE][MATL_DIFF_B] = DEFAULT_DIFFUSE; vpc->matl_props[m][EXT_SURFACE][MATL_SPEC_B] = DEFAULT_SPECULAR; vpc->matl_props[m][EXT_SURFACE][MATL_SHINY] = DEFAULT_SHINYNESS; vpc->matl_props[m][INT_SURFACE][MATL_AMB_R] = DEFAULT_AMBIENT; vpc->matl_props[m][INT_SURFACE][MATL_DIFF_R] = DEFAULT_DIFFUSE; vpc->matl_props[m][INT_SURFACE][MATL_SPEC_R] = DEFAULT_SPECULAR; vpc->matl_props[m][INT_SURFACE][MATL_AMB_G] = DEFAULT_AMBIENT; vpc->matl_props[m][INT_SURFACE][MATL_DIFF_G] = DEFAULT_DIFFUSE; vpc->matl_props[m][INT_SURFACE][MATL_SPEC_G] = DEFAULT_SPECULAR; vpc->matl_props[m][INT_SURFACE][MATL_AMB_B] = DEFAULT_AMBIENT; vpc->matl_props[m][INT_SURFACE][MATL_DIFF_B] = DEFAULT_DIFFUSE; vpc->matl_props[m][INT_SURFACE][MATL_SPEC_B] = DEFAULT_SPECULAR; vpc->matl_props[m][INT_SURFACE][MATL_SHINY] = DEFAULT_SHINYNESS; } for (l = 0; l < VP_MAX_LIGHTS; l++) { vpc->light_enable[l] = 0; vpSetVector4(vpc->light_vector[l], 0.57735, 0.57735, 0.57735, 1.); vpSetVector3(vpc->light_color[l], 1., 1., 1.); } vpc->light_enable[0] = 1; vpc->light_both_sides = 0; vpc->reverse_surface_sides = 0; vpc->dc_enable = 0; vpc->dc_front_factor = 1.; vpc->dc_density = 1.; vpc->dc_quantization = DEFAULT_DC_QUANTIZATION; vpIdentity4(vpc->transforms[VP_MODEL]); vpIdentity4(vpc->transforms[VP_VIEW]); vpIdentity4(vpc->transforms[VP_PROJECT]); vpWindow(vpc, VP_PARALLEL, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5); vpc->current_matrix = VP_MODEL; vpc->concat_left = 0; vpc->axis_override = VP_NO_AXIS; vpc->max_opacity = 1.0; vpc->factored_view_ready = 0; vpc->int_image_width_hint = 0; vpc->int_image_height_hint = 0; vpc->clamp_shade_table = 1; vpc->enable_shadows = 0; vpc->shadow_light_num = VP_LIGHT0; vpc->shadow_width_hint = 0; vpc->shadow_height_hint = 0; vpc->shadow_bias = 4; vpc->write_func = write; vpc->read_func = read; vpc->mmap_func = NULL; vpc->log_alloc_func = NULL; vpc->log_free_func = NULL; vpc->status_func = NULL; vpc->client_data = NULL; vpc->error_code = VP_OK; #ifdef DEBUG bzero(vpc->debug_enable, VPDEBUG_COUNT * sizeof(short)); vpc->trace_u = -1; vpc->trace_v = -1; vpc->trace_shadow_k = 0; #endif #ifdef USE_TIMER bzero(vpc->timer_ticks, VPTIMER_COUNT * sizeof(unsigned)); #ifdef HAVE_LORES_TIMER vpc->timer_usec_per_tick = 1.0; #endif #ifdef HAVE_HIRES_TIMER StartHiResTimer(vpc); #endif #endif /* USE_TIMER */ } /* * vpCreateContext * * Create a rendering context. */ vpContext * vpCreateContext() { vpContext *vpc; /* NOTE: cannot use Alloc() to allocate a context since it requires a context as an argument */ if ((vpc = (vpContext *)malloc(sizeof(vpContext))) == NULL) VPBug("out of memory"); bzero(vpc, sizeof(vpContext)); InitContext(vpc); return(vpc); } /* * vpDestroyContext * * Destroy a rendering context. */ void vpDestroyContext(vpc) vpContext *vpc; { VPResizeDepthCueTable(vpc, 0, 0); VPResizeRenderBuffers(vpc, 0, 0, 0); vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); if (vpc->sum_table != NULL) Dealloc(vpc, vpc->sum_table); VPResizeShadowBuffer(vpc, 0, 0); /* NOTE: don't use Dealloc() to deallocate a context since it wasn't created with Alloc() */ free((void *)vpc); } /* * vpSetVolumeSize * * Set the size of the volume. */ vpResult vpSetVolumeSize(vpc, xlen, ylen, zlen) vpContext *vpc; int xlen, ylen, zlen; { vpc->xlen = xlen; vpc->ylen = ylen; vpc->zlen = zlen; vpc->factored_view_ready = 0; vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); return(VP_OK); } /* * vpSetVoxelSize * * Set the size of a voxel. */ vpResult vpSetVoxelSize(vpc, bytes_per_voxel, num_voxel_fields, num_shade_fields, num_clsfy_fields) vpContext *vpc; int bytes_per_voxel; int num_voxel_fields; int num_shade_fields; int num_clsfy_fields; { if (num_voxel_fields >= VP_MAX_FIELDS) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); if (num_clsfy_fields < 0 || num_clsfy_fields > num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (num_shade_fields < 0 || num_shade_fields > num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->raw_bytes_per_voxel = bytes_per_voxel; vpc->num_voxel_fields = num_voxel_fields; vpc->num_shade_fields = num_shade_fields; vpc->num_clsfy_params = num_clsfy_fields; vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); return(VP_OK); } /* * vpSetVoxelField * * Set the size and position of a voxel field. */ vpResult vpSetVoxelField(vpc, field_num, field_size, field_offset, field_max) vpContext *vpc; int field_num; int field_size; int field_offset; int field_max; { if (field_num < 0 || field_num >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (field_size != 1 && field_size != 2 && field_size != 4) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (field_offset < 0 || field_offset >= vpc->raw_bytes_per_voxel) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->field_size[field_num] = field_size; vpc->field_offset[field_num] = field_offset; vpc->field_max[field_num] = field_max; vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); return(VP_OK); } /* * vpSetRawVoxels * * Set the array of unclassified voxels. */ vpResult vpSetRawVoxels(vpc, raw_voxels, raw_voxels_size, xstride, ystride, zstride) vpContext *vpc; int xstride, ystride, zstride; void *raw_voxels; int raw_voxels_size; { vpc->raw_voxels = raw_voxels; vpc->raw_voxels_size = raw_voxels_size; vpc->xstride = xstride; vpc->ystride = ystride; vpc->zstride = zstride; if (raw_voxels_size != 0) vpDestroyClassifiedVolume(vpc); vpDestroyMinMaxOctree(vpc); return(VP_OK); } /* * vpSetClassifierTable * * Specify a lookup table for one of the classification function's * parameters. */ vpResult vpSetClassifierTable(vpc, param_num, param_field, table, table_size) vpContext *vpc; int param_num; int param_field; float *table; int table_size; { if (param_num < 0 || param_num >= vpc->num_clsfy_params) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (param_field < 0 || param_field >= vpc->num_voxel_fields) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->param_field[param_num] = param_field; vpc->clsfy_table[param_num] = table; vpc->clsfy_table_size[param_num] = table_size; return(VP_OK); } /* * vpSetLookupShader * * Define a lookup shader. */ vpResult vpSetLookupShader(vpc, color_channels, num_materials, color_field, color_table, color_table_size, weight_field, weight_table, weight_table_size) vpContext *vpc; int color_channels; int num_materials; int color_field; float *color_table; int color_table_size; int weight_field; float *weight_table; int weight_table_size; { if (color_channels != 1 && color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (num_materials <= 0 || num_materials >= VP_MAX_MATERIAL) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); if (color_field < 0 || color_field >= vpc->num_voxel_fields || color_table == NULL || color_table_size == 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (num_materials > 1) { if (weight_field < 0 || weight_field >= vpc->num_voxel_fields || weight_table == NULL || weight_table_size == 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); } vpc->color_channels = color_channels; vpc->shading_mode = LOOKUP_SHADER; vpc->shade_color_table = color_table; vpc->shade_color_table_size = color_table_size; vpc->shade_weight_table = weight_table; vpc->shade_weight_table_size = weight_table_size; vpc->num_materials = num_materials; vpc->color_field = color_field; vpc->weight_field = weight_field; return(VP_OK); } /* * vpSetShadowLookupShader * * Define a lookup shader that support shadows. */ vpResult vpSetShadowLookupShader(vpc, color_channels, num_materials, color_field, color_table, color_table_size, weight_field, weight_table, weight_table_size, shadow_table, shadow_table_size) vpContext *vpc; int color_channels; int num_materials; int color_field; float *color_table; int color_table_size; int weight_field; float *weight_table; int weight_table_size; float *shadow_table; int shadow_table_size; { if (color_channels != 1 && color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (num_materials <= 0 || num_materials >= VP_MAX_MATERIAL) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); if (color_field < 0 || color_field >= vpc->num_voxel_fields || color_table == NULL || color_table_size == 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (num_materials > 1) { if (weight_field < 0 || weight_field >= vpc->num_voxel_fields || weight_table == NULL || weight_table_size == 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); } if (shadow_table_size != color_table_size) return(VPSetError(vpc, VPERROR_BAD_SIZE)); vpc->color_channels = color_channels; vpc->shading_mode = LOOKUP_SHADER; vpc->shade_color_table = color_table; vpc->shade_color_table_size = color_table_size; vpc->shade_weight_table = weight_table; vpc->shade_weight_table_size = weight_table_size; vpc->num_materials = num_materials; vpc->color_field = color_field; vpc->weight_field = weight_field; vpc->shadow_color_table = shadow_table; vpc->shadow_color_table_size = shadow_table_size; return(VP_OK); } /* * vpSetMaterial * * Set material parameters. */ vpResult vpSetMaterial(vpc, material, property, surface_side, r, g, b) vpContext *vpc; int material; int property; int surface_side; double r, g, b; { material -= VP_MATERIAL0; if (material < 0 || material >= vpc->num_materials) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (surface_side == 0 || (surface_side & ~VP_BOTH_SIDES) != 0) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (property != VP_SHINYNESS) { if (r < 0. || g < 0. || b < 0.) return(VPSetError(vpc, VPERROR_BAD_VALUE)); } switch (property) { case VP_AMBIENT: if (surface_side & VP_EXTERIOR) { vpc->matl_props[material][EXT_SURFACE][MATL_AMB_R] = r * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_AMB_G] = g * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_AMB_B] = b * 255.; } if (surface_side & VP_INTERIOR) { vpc->matl_props[material][INT_SURFACE][MATL_AMB_R] = r * 255.; vpc->matl_props[material][INT_SURFACE][MATL_AMB_G] = g * 255.; vpc->matl_props[material][INT_SURFACE][MATL_AMB_B] = b * 255.; } break; case VP_DIFFUSE: if (surface_side & VP_EXTERIOR) { vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_R] = r * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_G] = g * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_B] = b * 255.; } if (surface_side & VP_INTERIOR) { vpc->matl_props[material][INT_SURFACE][MATL_DIFF_R] = r * 255.; vpc->matl_props[material][INT_SURFACE][MATL_DIFF_G] = g * 255.; vpc->matl_props[material][INT_SURFACE][MATL_DIFF_B] = b * 255.; } break; case VP_SPECULAR: if (surface_side & VP_EXTERIOR) { vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_R] = r * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_G] = g * 255.; vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_B] = b * 255.; } if (surface_side & VP_INTERIOR) { vpc->matl_props[material][INT_SURFACE][MATL_SPEC_R] = r * 255.; vpc->matl_props[material][INT_SURFACE][MATL_SPEC_G] = g * 255.; vpc->matl_props[material][INT_SURFACE][MATL_SPEC_B] = b * 255.; } break; case VP_SHINYNESS: if (surface_side & VP_EXTERIOR) vpc->matl_props[material][EXT_SURFACE][MATL_SHINY] = r; if (surface_side & VP_INTERIOR) vpc->matl_props[material][INT_SURFACE][MATL_SHINY] = r; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpSetLight * * Set the properties of a directional light source. */ vpResult vpSetLight(vpc, light_num, property, n0, n1, n2) vpContext *vpc; int light_num; int property; double n0, n1, n2; { vpVector4 v1, v2; light_num -= VP_LIGHT0; if (light_num < 0 || light_num >= VP_MAX_LIGHTS) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); switch (property) { case VP_DIRECTION: vpSetVector4(v1, n0, n1, n2, 1.); if (vpNormalize3(v1) != VP_OK) return(VPSetError(vpc, VPERROR_SINGULAR)); vpMatrixVectorMult4(v2, vpc->transforms[VP_MODEL], v1); vpc->light_vector[light_num][0] = v2[0]; vpc->light_vector[light_num][1] = v2[1]; vpc->light_vector[light_num][2] = v2[2]; vpc->light_vector[light_num][3] = v2[3]; break; case VP_COLOR: if (n0 < 0. || n0 > 1. || n1 < 0. || n1 > 1. || n2 < 0. || n2 > 1.) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->light_color[light_num][0] = n0; vpc->light_color[light_num][1] = n1; vpc->light_color[light_num][2] = n2; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpEnable * * Enable or disable an option. */ vpResult vpEnable(vpc, option, value) vpContext *vpc; int option; int value; { switch (option) { case VP_LIGHT0: case VP_LIGHT1: case VP_LIGHT2: case VP_LIGHT3: case VP_LIGHT4: case VP_LIGHT5: if (value == 0) vpc->light_enable[option - VP_LIGHT0] = 0; else vpc->light_enable[option - VP_LIGHT0] = 1; break; case VP_LIGHT_BOTH_SIDES: if (value == 0) vpc->light_both_sides = 0; else vpc->light_both_sides = 1; break; case VP_REVERSE_SURFACE_SIDES: if (value == 0) vpc->reverse_surface_sides = 0; else vpc->reverse_surface_sides = 1; break; case VP_DEPTH_CUE: if (value == 0) vpc->dc_enable = 0; else vpc->dc_enable = 1; break; case VP_VIEW_X_AXIS: if (value == 0) vpc->skip_rle_x = 1; else vpc->skip_rle_x = 0; break; case VP_VIEW_Y_AXIS: if (value == 0) vpc->skip_rle_y = 1; else vpc->skip_rle_y = 0; break; case VP_VIEW_Z_AXIS: if (value == 0) vpc->skip_rle_z = 1; else vpc->skip_rle_z = 0; break; case VP_SHADOW: if (value == 0) { vpc->enable_shadows = 0; } else { vpc->enable_shadows = 1; } vpc->factored_view_ready = 0; break; case VP_CLAMP_SHADE_TABLE: if (value == 0) vpc->clamp_shade_table = 0; else vpc->clamp_shade_table = 1; break; default: return(VPSetError(vpc, VPERROR_BAD_VALUE)); } return(VP_OK); } /* * vpSetDepthCueing * * Set depth cueing parameters. */ vpResult vpSetDepthCueing(vpc, front_factor, density) vpContext *vpc; double front_factor; double density; { if (front_factor <= 0.) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->dc_front_factor = front_factor; vpc->dc_density = density; if (vpc->dc_table_len > 0) VPComputeDepthCueTable(vpc, 0, vpc->dc_table_len-1); return(VP_OK); } /* * vpCurrentMatrix * * Set the current matrix. */ vpResult vpCurrentMatrix(vpc, option) vpContext *vpc; int option; { switch (option) { case VP_MODEL: case VP_VIEW: case VP_PROJECT: vpc->current_matrix = option; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpIdentityMatrix * * Load the identity into the current matrix. */ vpResult vpIdentityMatrix(vpc) vpContext *vpc; { vpIdentity4(vpc->transforms[vpc->current_matrix]); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpSetMatrix * * Load the elements of the current matrix. */ vpResult vpSetMatrix(vpc, matrix) vpContext *vpc; vpMatrix4 matrix; { bcopy(matrix, vpc->transforms[vpc->current_matrix], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpGetMatrix * * Get the elements of the indicated matrix. */ vpResult vpGetMatrix(vpc, matrix_code, matrix) vpContext *vpc; int matrix_code; vpMatrix4 matrix; { switch (matrix_code) { case VP_MODEL: case VP_VIEW: case VP_PROJECT: bcopy(vpc->transforms[matrix_code], matrix, sizeof(vpMatrix4)); break; case VP_SCREEN: VPComputeViewTransform(vpc, matrix); break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpMultMatrix * * Multiply the current matrix by the given matrix. */ vpResult vpMultMatrix(vpc, matrix) vpContext *vpc; vpMatrix4 matrix; { vpMatrix4 tmp; if (vpc->concat_left) vpMatrixMult4(tmp, matrix, vpc->transforms[vpc->current_matrix]); else vpMatrixMult4(tmp, vpc->transforms[vpc->current_matrix], matrix); bcopy(tmp, vpc->transforms[vpc->current_matrix], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpTranslate * * Multiply the current matrix by a translation matrix. */ vpResult vpTranslate(vpc, tx, ty, tz) vpContext *vpc; double tx, ty, tz; { vpMatrix4 t, tmp; VPLoadTranslation(t, tx, ty, tz); if (vpc->concat_left) vpMatrixMult4(tmp, t, vpc->transforms[vpc->current_matrix]); else vpMatrixMult4(tmp, vpc->transforms[vpc->current_matrix], t); bcopy(tmp, vpc->transforms[vpc->current_matrix], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpRotate * * Multiply the current matrix by a rotation matrix. */ vpResult vpRotate(vpc, axis, degrees) vpContext *vpc; int axis; double degrees; { vpMatrix4 r, tmp; if (axis != VP_X_AXIS && axis != VP_Y_AXIS && axis != VP_Z_AXIS) return(VPSetError(vpc, VPERROR_BAD_OPTION)); VPLoadRotation(r, axis, degrees); if (vpc->concat_left) vpMatrixMult4(tmp, r, vpc->transforms[vpc->current_matrix]); else vpMatrixMult4(tmp, vpc->transforms[vpc->current_matrix], r); bcopy(tmp, vpc->transforms[vpc->current_matrix], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpScale * * Multiply the current matrix by a scale matrix. */ vpResult vpScale(vpc, sx, sy, sz) vpContext *vpc; double sx, sy, sz; { vpMatrix4 s, tmp; VPLoadScale(s, sx, sy, sz); if (vpc->concat_left) vpMatrixMult4(tmp, s, vpc->transforms[vpc->current_matrix]); else vpMatrixMult4(tmp, vpc->transforms[vpc->current_matrix], s); bcopy(tmp, vpc->transforms[vpc->current_matrix], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpWindow * * Set the projection matrix for a perspective or * orthographic viewing volume. */ vpResult vpWindow(vpc, type, left, right, bottom, top, near, far) vpContext *vpc; int type; double left, right, bottom, top, near, far; { vpMatrix4 projectm, tmp; if (left >= right || bottom >= top || near >= far) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (type == VP_PERSPECTIVE) { if (near <= 0 || far <= 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); } else if (type != VP_PARALLEL) { return(VPSetError(vpc, VPERROR_BAD_OPTION)); } vpIdentity4(projectm); if (type == VP_PARALLEL) { projectm[0][0] = 2. / (right - left); projectm[1][1] = 2. / (top - bottom); projectm[2][2] = 2. / (far - near); projectm[0][3] = (left + right) / (left - right); projectm[1][3] = (bottom + top) / (bottom - top); projectm[2][3] = (near + far) / (near - far); } else { /* XXX perspective rendering not available yet */ return(VPSetError(vpc, VPERROR_BAD_OPTION)); #ifdef notdef projectm[0][0] = 2. * near / (right - left); projectm[1][1] = 2. * near / (top - bottom); projectm[2][2] = (near + far) / (near - far); projectm[0][2] = (right + left) / (right - left); projectm[1][2] = (top + bottom) / (top - bottom); projectm[3][2] = -1.; projectm[2][3] = 2. * far * near / (near - far); #endif } if (vpc->concat_left) vpMatrixMult4(tmp, projectm, vpc->transforms[VP_PROJECT]); else vpMatrixMult4(tmp, vpc->transforms[VP_PROJECT], projectm); bcopy(tmp, vpc->transforms[VP_PROJECT], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpWindowPHIGS * * Setting the projection matrix using a PHIGS view specification. */ vpResult vpWindowPHIGS(vpc, vrp, vpn, vup, prp, viewport_umin, viewport_umax, viewport_vmin, viewport_vmax, viewport_front, viewport_back, projection_type) vpContext *vpc; vpVector3 vrp; vpVector3 vpn; vpVector3 vup; vpVector3 prp; double viewport_umin; double viewport_umax; double viewport_vmin; double viewport_vmax; double viewport_front; double viewport_back; int projection_type; { vpMatrix4 m1, m2, m3; double cw_x, cw_y; /* center of window */ double newz; if (viewport_umax <= viewport_umin || viewport_vmax <= viewport_vmin || viewport_front <= viewport_back) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (projection_type != VP_PARALLEL && projection_type != VP_PERSPECTIVE) return(VPSetError(vpc, VPERROR_BAD_OPTION)); /* perspective rendering not available yet */ if (projection_type == VP_PERSPECTIVE) return(VPSetError(vpc, VPERROR_BAD_OPTION)); /* translate view reference point to the origin */ VPLoadTranslation(m1, -vrp[0], -vrp[1], -vrp[2]); /* rotate VRC axes into world coordinate axes */ vpIdentity4(m2); m2[2][0] = vpn[0]; m2[2][1] = vpn[1]; m2[2][2] = vpn[2]; if (vpNormalize3(m2[2]) != VP_OK) return(VPSetError(vpc, VPERROR_SINGULAR)); vpCrossProduct(m2[0], vup, m2[2]); if (vpNormalize3(m2[0]) != VP_OK) return(VPSetError(vpc, VPERROR_SINGULAR)); vpCrossProduct(m2[1], m2[2], m2[0]); vpMatrixMult4(m3, m2, m1); if (projection_type == VP_PERSPECTIVE) { /* translate center of projection to the origin */ VPLoadTranslation(m1, -prp[0], -prp[1], -prp[2]); vpMatrixMult4(m2, m1, m3); bcopy(m2, m3, sizeof(vpMatrix4)); } /* shear to make DOP equal to the z axis */ if (fabs(prp[2]) < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpIdentity4(m1); cw_x = 0.5 * (viewport_umin + viewport_umax); cw_y = 0.5 * (viewport_vmin + viewport_vmax); m1[0][2] = (cw_x - prp[0]) / prp[2]; m1[1][2] = (cw_y - prp[1]) / prp[2]; vpMatrixMult4(m2, m1, m3); if (projection_type == VP_PARALLEL) { /* translate to clip origin */ VPLoadTranslation(m3, -cw_x, -cw_y, -viewport_back); vpMatrixMult4(m1, m3, m2); /* scale to clip coordinates */ VPLoadScale(m2, 2. / (viewport_umax - viewport_umin), 2. / (viewport_vmax - viewport_vmin), 1. / (viewport_front - viewport_back)); vpMatrixMult4(m3, m2, m1); } else { /* scale into canonical perspective view volume */ if (fabs(prp[2] - viewport_back) < VP_EPS) return(VPSetError(vpc, VPERROR_SINGULAR)); vpIdentity4(m3); m3[0][0] = 2*prp[2] / ((viewport_umax - viewport_umin) * (prp[2] - viewport_back)); m3[1][1] = 2*prp[2] / ((viewport_vmax - viewport_vmin) * (prp[2] - viewport_back)); m3[2][2] = 1. / (prp[2] - viewport_back); vpMatrixMult4(m1, m3, m2); /* transform into clip coordinates */ vpIdentity4(m2); newz = (prp[2] - viewport_front) / (viewport_back - prp[2]); m2[2][2] = 1. / (1. + newz); m2[2][3] = newz / (-1. - newz); m2[3][2] = -1.; m2[3][3] = 0.; vpMatrixMult4(m3, m2, m1); } if (vpc->concat_left) vpMatrixMult4(m1, m3, vpc->transforms[VP_PROJECT]); else vpMatrixMult4(m1, vpc->transforms[VP_PROJECT], m3); bcopy(m1, vpc->transforms[VP_PROJECT], sizeof(vpMatrix4)); vpc->factored_view_ready = 0; return(VP_OK); } /* * vpSetImage * * Set the buffer to store the image into. */ vpResult vpSetImage(vpc, image, width, height, bytes_per_scan, pixel_type) vpContext *vpc; unsigned char *image; int width, height; int bytes_per_scan; int pixel_type; { int bytes_per_pixel; /* check for errors */ switch (pixel_type) { case VP_ALPHA: case VP_LUMINANCE: bytes_per_pixel = 1; break; case VP_LUMINANCEA: bytes_per_pixel = 2; break; case VP_RGB: case VP_BGR: bytes_per_pixel = 3; break; case VP_RGBA: case VP_ABGR: bytes_per_pixel = 4; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } if (bytes_per_scan < width * bytes_per_pixel) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* update context */ if (width != vpc->image_width || height != vpc->image_height) { vpc->image_width = width; vpc->image_height = height; vpc->factored_view_ready = 0; } vpc->image = image; vpc->image_bytes_per_scan = bytes_per_scan; vpc->pixel_type = pixel_type; return(VP_OK); } /* * vpSeti * * Set a rendering option with an integer value. */ vpResult vpSeti(vpc, option, value) vpContext *vpc; int option; int value; { switch (option) { case VP_CONCAT_MODE: if (value == VP_CONCAT_LEFT) vpc->concat_left = 1; else if (value == VP_CONCAT_RIGHT) vpc->concat_left = 0; else return(VPSetError(vpc, VPERROR_BAD_OPTION)); break; case VP_DEPTH_CUE_SIZE_HINT: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->dc_table_len_hint = value; break; case VP_INT_WIDTH_HINT: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->int_image_width_hint = value; break; case VP_INT_HEIGHT_HINT: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->int_image_height_hint = value; break; case VP_SHADOW_LIGHT: if (value < VP_LIGHT0 || value > VP_LIGHT5) return(VPSetError(vpc, VPERROR_BAD_OPTION)); vpc->shadow_light_num = value; break; case VP_SHADOW_WIDTH_HINT: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->shadow_width_hint = value; break; case VP_SHADOW_HEIGHT_HINT: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->shadow_height_hint = value; break; case VP_SHADOW_BIAS: if (value < 0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->shadow_bias = value; vpc->factored_view_ready = 0; break; case VP_AXIS_OVERRIDE: switch (value) { case VP_X_AXIS: case VP_Y_AXIS: case VP_Z_AXIS: case VP_NO_AXIS: vpc->axis_override = value; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); break; } vpc->factored_view_ready = 0; break; case VP_TRACE_SHADOW_K: #ifdef DEBUG vpc->trace_shadow_k = value; #endif break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpSetd * * Set a rendering option with a double-precision value. */ vpResult vpSetd(vpc, option, value) vpContext *vpc; int option; double value; { switch (option) { case VP_DEPTH_CUE_QUANTIZATION: if (value <= 0. || value >= 1.) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->dc_quantization = value; VPResizeDepthCueTable(vpc, 0, 0); break; case VP_MAX_RAY_OPACITY: if (value < 0. || value > 1.) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->max_opacity = value; break; case VP_MIN_VOXEL_OPACITY: if ((value < 0. || value > 1.) && value != -1.0) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->min_opacity = value; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpMinMaxOctreeThreshold * * Set the threshold of a parameter for constructing the min-max octree. */ vpResult vpMinMaxOctreeThreshold(vpc, param, range) vpContext *vpc; int param; int range; { if (param >= vpc->num_clsfy_params) return(VPSetError(vpc, VPERROR_BAD_VALUE)); vpc->param_maxrange[param] = range; return(VP_OK); } /* * vpSetCallback * * Set one of the callback functions. */ vpResult vpSetCallback(vpc, option, func) vpContext *vpc; int option; void *func; { extern int read(), write(); switch (option) { case VP_LOG_ALLOC_FUNC: vpc->log_alloc_func = func; break; case VP_LOG_FREE_FUNC: vpc->log_free_func = func; break; case VP_STATUS_FUNC: vpc->status_func = func; break; case VP_READ_FUNC: if (func == NULL) vpc->read_func = read; else vpc->read_func = func; break; case VP_WRITE_FUNC: if (func == NULL) vpc->write_func = write; else vpc->write_func = func; break; case VP_MMAP_FUNC: vpc->mmap_func = func; break; case VP_GRAY_SHADE_FUNC: if (func == NULL) { vpc->shading_mode = LOOKUP_SHADER; } else { vpc->color_channels = 1; vpc->shading_mode = CALLBACK_SHADER; vpc->shade_func = func; } break; case VP_RGB_SHADE_FUNC: if (func == NULL) { vpc->shading_mode = LOOKUP_SHADER; } else { vpc->color_channels = 3; vpc->shading_mode = CALLBACK_SHADER; vpc->shade_func = func; } break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpSetClientData * * Set the client_data hook. */ vpResult vpSetClientData(vpc, client_data) vpContext *vpc; void *client_data; { vpc->client_data = client_data; return(VP_OK); } /* * vpSetDebug * * Set the value of a debugging flag. */ vpResult vpSetDebug(vpc, flag, value) vpContext *vpc; int flag; int value; { if (flag < 0 || flag >= VPDEBUG_COUNT) return(VPSetError(vpc, VPERROR_BAD_OPTION)); #ifdef DEBUG vpc->debug_enable[flag] = value; #endif return(VP_OK); } /* * vpTracePixel * * Trace one pixel of the intermediate image. */ vpResult vpTracePixel(vpc, trace_u, trace_v) vpContext *vpc; int trace_u, trace_v; /* pixel coordinates */ { #ifdef DEBUG vpc->trace_u = trace_u; vpc->trace_v = trace_v; #endif return(VP_OK); } /* * vpGeti * * Retrieve an integer-valued piece of state. */ vpResult vpGeti(vpc, option, iptr) vpContext *vpc; int option; int *iptr; { int c; int retcode; switch (option) { case VP_XLEN: *iptr = vpc->xlen; break; case VP_YLEN: *iptr = vpc->ylen; break; case VP_ZLEN: *iptr = vpc->zlen; break; case VP_BYTES_PER_VOXEL: *iptr = vpc->raw_bytes_per_voxel; break; case VP_VOXEL_FIELD_COUNT: *iptr = vpc->num_voxel_fields; break; case VP_SHADE_FIELD_COUNT: *iptr = vpc->num_shade_fields; break; case VP_FIELD_SIZES: for (c = 0; c < vpc->num_voxel_fields; c++) iptr[c] = vpc->field_size[c]; break; case VP_FIELD_OFFSETS: for (c = 0; c < vpc->num_voxel_fields; c++) iptr[c] = vpc->field_offset[c]; break; case VP_FIELD_MAXES: for (c = 0; c < vpc->num_voxel_fields; c++) iptr[c] = vpc->field_max[c]; break; case VP_VOXEL_DATA_SIZE: *iptr = vpc->raw_voxels_size; break; case VP_VOXEL_XSTRIDE: *iptr = vpc->xstride; break; case VP_VOXEL_YSTRIDE: *iptr = vpc->ystride; break; case VP_VOXEL_ZSTRIDE: *iptr = vpc->zstride; break; case VP_CLASSIFY_FIELD_COUNT: *iptr = vpc->num_clsfy_params; break; case VP_CLASSIFY_FIELDS: for (c = 0; c < vpc->num_clsfy_params; c++) iptr[c] = vpc->param_field[c]; break; case VP_CLASSIFY_TABLE_SIZES: for (c = 0; c < vpc->num_clsfy_params; c++) iptr[c] = vpc->clsfy_table_size[c]; break; case VP_COLOR_CHANNELS: *iptr = vpc->color_channels; break; case VP_SHADE_COLOR_SIZE: *iptr = vpc->shade_color_table_size; break; case VP_SHADE_WEIGHT_SIZE: *iptr = vpc->shade_weight_table_size; break; case VP_MATERIAL_COUNT: *iptr = vpc->num_materials; break; case VP_SHADE_COLOR_FIELD: *iptr = vpc->color_field; break; case VP_SHADE_WEIGHT_FIELD: *iptr = vpc->weight_field; break; case VP_LIGHT0: case VP_LIGHT1: case VP_LIGHT2: case VP_LIGHT3: case VP_LIGHT4: case VP_LIGHT5: *iptr = vpc->light_enable[option - VP_LIGHT0]; break; case VP_LIGHT_BOTH_SIDES: *iptr = vpc->light_both_sides; break; case VP_REVERSE_SURFACE_SIDES: *iptr = vpc->reverse_surface_sides; break; case VP_DEPTH_CUE: *iptr = vpc->dc_enable; break; case VP_DEPTH_CUE_TABLE_SIZE: *iptr = vpc->dc_table_len; break; case VP_DEPTH_CUE_SIZE_HINT: *iptr = vpc->dc_table_len_hint; break; case VP_CURRENT_MATRIX: *iptr = vpc->current_matrix; break; case VP_CONCAT_MODE: if (vpc->concat_left) *iptr = VP_CONCAT_LEFT; else *iptr = VP_CONCAT_RIGHT; break; case VP_IMAGE_WIDTH: *iptr = vpc->image_width; break; case VP_IMAGE_HEIGHT: *iptr = vpc->image_height; break; case VP_IMAGE_SCAN_SIZE: *iptr = vpc->image_bytes_per_scan; break; case VP_VIEW_AXIS: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->best_view_axis; break; case VP_INTERMEDIATE_WIDTH: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->intermediate_width; break; case VP_INTERMEDIATE_HEIGHT: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->intermediate_height; break; case VP_INTERMEDIATE_COLOR: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->intermediate_color_channels; break; case VP_INT_WIDTH_HINT: *iptr = vpc->int_image_width_hint; break; case VP_INT_HEIGHT_HINT: *iptr = vpc->int_image_height_hint; break; case VP_VIEW_X_AXIS: *iptr = !vpc->skip_rle_x; break; case VP_VIEW_Y_AXIS: *iptr = !vpc->skip_rle_y; break; case VP_VIEW_Z_AXIS: *iptr = !vpc->skip_rle_z; break; case VP_VIEW_X_SIZE: if (vpc->rle_x == NULL) { *iptr = 0; } else { *iptr = sizeof(RLEVoxels) + vpc->rle_x->run_count + vpc->rle_x->data_count*vpc->rle_bytes_per_voxel + vpc->rle_x->klen*vpc->rle_x->scan_offsets_per_slice* sizeof(ScanOffset); } break; case VP_VIEW_Y_SIZE: if (vpc->rle_y == NULL) { *iptr = 0; } else { *iptr = sizeof(RLEVoxels) + vpc->rle_y->run_count + vpc->rle_y->data_count*vpc->rle_bytes_per_voxel + vpc->rle_y->klen*vpc->rle_y->scan_offsets_per_slice* sizeof(ScanOffset); } break; case VP_VIEW_Z_SIZE: if (vpc->rle_z == NULL) { *iptr = 0; } else { *iptr = sizeof(RLEVoxels) + vpc->rle_z->run_count + vpc->rle_z->data_count*vpc->rle_bytes_per_voxel + vpc->rle_z->klen*vpc->rle_z->scan_offsets_per_slice* sizeof(ScanOffset); } break; case VP_MMOCTREE_THRESHOLDS: for (c = 0; c < vpc->num_clsfy_params; c++) iptr[c] = vpc->param_maxrange[c]; break; case VP_MMOCTREE_SIZE: if (vpc->mm_octree == NULL) *iptr = 0; else *iptr = sizeof(MinMaxOctree) + vpc->mm_octree->octree_bytes; break; case VP_SHADOW: *iptr = vpc->enable_shadows; break; case VP_SHADOW_LIGHT: *iptr = vpc->shadow_light_num; break; case VP_SHADOW_WIDTH_HINT: *iptr = vpc->shadow_width_hint; break; case VP_SHADOW_HEIGHT_HINT: *iptr = vpc->shadow_height_hint; break; case VP_SHADOW_WIDTH: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->shadow_width; break; case VP_SHADOW_HEIGHT: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); *iptr = vpc->shadow_height; break; case VP_SHADOW_COLOR_SIZE: *iptr = vpc->shadow_color_table_size; break; case VP_SHADOW_BIAS: *iptr = vpc->shadow_bias; break; case VP_PIXEL_TYPE: *iptr = vpc->pixel_type; break; case VP_CLAMP_SHADE_TABLE: *iptr = vpc->clamp_shade_table; break; case VP_COMPOSITE_ORDER: if ((retcode = VPFactorView(vpc)) != VP_OK) return(retcode); if (vpc->reverse_slice_order) *iptr = -1; else *iptr = 1; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetd * * Retrieve a double-precision-valued piece of state. */ vpResult vpGetd(vpc, option, dptr) vpContext *vpc; int option; double *dptr; { int c; switch (option) { case VP_MIN_VOXEL_OPACITY: *dptr = vpc->min_opacity; break; case VP_DEPTH_CUE_FRONT: *dptr = vpc->dc_front_factor; break; case VP_DEPTH_CUE_DENSITY: *dptr = vpc->dc_density; break; case VP_DEPTH_CUE_QUANTIZATION: *dptr = vpc->dc_quantization; break; case VP_MAX_RAY_OPACITY: *dptr = vpc->max_opacity; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetp * * Retrieve a pointer-valued piece of state. */ vpResult vpGetp(vpc, option, pptr) vpContext *vpc; int option; void **pptr; { int c; switch (option) { case VP_VOXEL_DATA: *pptr = vpc->raw_voxels; break; case VP_CLASSIFY_TABLES: for (c = 0; c < vpc->num_clsfy_params; c++) pptr[c] = vpc->clsfy_table[c]; break; case VP_SHADE_FUNC: *pptr = vpc->shade_func; break; case VP_SHADE_COLOR_TABLE: *pptr = vpc->shade_color_table; break; case VP_SHADE_WEIGHT_TABLE: *pptr = vpc->shade_weight_table; break; case VP_SHADOW_COLOR_TABLE: *pptr = vpc->shadow_color_table; break; case VP_IMAGE: *pptr = vpc->image; break; case VP_LOG_ALLOC_FUNC: *pptr = vpc->log_alloc_func; break; case VP_LOG_FREE_FUNC: *pptr = vpc->log_free_func; break; case VP_STATUS_FUNC: *pptr = vpc->status_func; break; case VP_READ_FUNC: *pptr = vpc->read_func; break; case VP_WRITE_FUNC: *pptr = vpc->write_func; break; case VP_MMAP_FUNC: *pptr = vpc->mmap_func; break; case VP_CLIENT_DATA: *pptr = vpc->client_data; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetMaterial * * Get material parameters. */ vpResult vpGetMaterial(vpc, material, property, surface_side, r, g, b) vpContext *vpc; int material; int property; int surface_side; double *r, *g, *b; { material -= VP_MATERIAL0; if (material < 0 || material >= vpc->num_materials) return(VPSetError(vpc, VPERROR_BAD_VALUE)); if (surface_side != VP_EXTERIOR && surface_side != VP_INTERIOR) return(VPSetError(vpc, VPERROR_BAD_OPTION)); switch (property) { case VP_AMBIENT: if (surface_side == VP_EXTERIOR) { *r = vpc->matl_props[material][EXT_SURFACE][MATL_AMB_R] / 255.; *g = vpc->matl_props[material][EXT_SURFACE][MATL_AMB_G] / 255.; *b = vpc->matl_props[material][EXT_SURFACE][MATL_AMB_B] / 255.; } else { *r = vpc->matl_props[material][INT_SURFACE][MATL_AMB_R] / 255.; *g = vpc->matl_props[material][INT_SURFACE][MATL_AMB_G] / 255.; *b = vpc->matl_props[material][INT_SURFACE][MATL_AMB_B] / 255.; } break; case VP_DIFFUSE: if (surface_side == VP_EXTERIOR) { *r = vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_R] / 255.; *g = vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_G] / 255.; *b = vpc->matl_props[material][EXT_SURFACE][MATL_DIFF_B] / 255.; } else { *r = vpc->matl_props[material][INT_SURFACE][MATL_DIFF_R] / 255.; *g = vpc->matl_props[material][INT_SURFACE][MATL_DIFF_G] / 255.; *b = vpc->matl_props[material][INT_SURFACE][MATL_DIFF_B] / 255.; } break; case VP_SPECULAR: if (surface_side == VP_EXTERIOR) { *r = vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_R] / 255.; *g = vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_G] / 255.; *b = vpc->matl_props[material][EXT_SURFACE][MATL_SPEC_B] / 255.; } else { *r = vpc->matl_props[material][INT_SURFACE][MATL_SPEC_R] / 255.; *g = vpc->matl_props[material][INT_SURFACE][MATL_SPEC_G] / 255.; *b = vpc->matl_props[material][INT_SURFACE][MATL_SPEC_B] / 255.; } break; case VP_SHINYNESS: if (surface_side & VP_EXTERIOR) *r = vpc->matl_props[material][EXT_SURFACE][MATL_SHINY]; else *r = vpc->matl_props[material][INT_SURFACE][MATL_SHINY]; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetLight * * Get the properties of a directional light source. */ vpResult vpGetLight(vpc, light_num, property, n0, n1, n2) vpContext *vpc; int light_num; int property; double *n0, *n1, *n2; { light_num -= VP_LIGHT0; if (light_num < 0 || light_num >= VP_MAX_LIGHTS) return(VPSetError(vpc, VPERROR_LIMIT_EXCEEDED)); switch (property) { case VP_DIRECTION: *n0 = vpc->light_vector[light_num][0]; *n1 = vpc->light_vector[light_num][1]; *n2 = vpc->light_vector[light_num][2]; break; case VP_COLOR: *n0 = vpc->light_color[light_num][0]; *n1 = vpc->light_color[light_num][1]; *n2 = vpc->light_color[light_num][2]; break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetImage * * Get one of the intermediate rendering buffers. */ vpResult vpGetImage(vpc, image, width, height, scan_bytes, pixel_type, image_type) vpContext *vpc; /* context */ void *image; /* buffer for storing result */ int width; /* expected width of image in buffer */ int height; /* expected height of image in buffer */ int scan_bytes; /* bytes per scanline in buffer */ int pixel_type; /* type of pixel to store in buffer */ int image_type; /* rendering buffer to extract from (VP_IMAGE_BUFFER or VP_SHADOW_BUFFER) */ { int x, y; unsigned char *dst_ptr; GrayIntPixel *gray_pixel; RGBIntPixel *rgb_pixel; int value; int color_channels; switch (image_type) { case VP_IMAGE_BUFFER: if (width != vpc->intermediate_width || height != vpc->intermediate_height) return(VPSetError(vpc, VPERROR_BAD_SIZE)); color_channels = vpc->intermediate_color_channels; dst_ptr = image; switch (pixel_type) { case VP_ALPHA: if (scan_bytes < width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); if (color_channels == 1) { for (y = 0; y < height; y++) { gray_pixel = vpc->int_image.gray_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(gray_pixel->opcflt * 255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; gray_pixel++; } } } else { for (y = 0; y < height; y++) { rgb_pixel = vpc->int_image.rgb_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(rgb_pixel->opcflt * 255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; rgb_pixel++; } } } break; case VP_LUMINANCE: if (color_channels != 1) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { gray_pixel = vpc->int_image.gray_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(gray_pixel->clrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; gray_pixel++; } } break; case VP_LUMINANCEA: if (color_channels != 1) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < 2*width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { gray_pixel = vpc->int_image.gray_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(gray_pixel->clrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(gray_pixel->opcflt * 255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; gray_pixel++; } } break; case VP_RGB: if (color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < 3*width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { rgb_pixel = vpc->int_image.rgb_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(rgb_pixel->rclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->gclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->bclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; rgb_pixel++; } } break; case VP_RGBA: if (color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < 4*width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { rgb_pixel = vpc->int_image.rgb_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(rgb_pixel->rclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->gclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->bclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->opcflt*255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; rgb_pixel++; } } break; case VP_BGR: if (color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < 3*width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { rgb_pixel = vpc->int_image.rgb_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(rgb_pixel->bclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->gclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->rclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; rgb_pixel++; } } break; case VP_ABGR: if (color_channels != 3) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (scan_bytes < 4*width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { rgb_pixel = vpc->int_image.rgb_intim + (vpc->pad_int_to_maxwidth ? vpc->max_intermediate_width*y : vpc->intermediate_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(rgb_pixel->opcflt*255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->bclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->gclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; value = (int)rint(rgb_pixel->rclrflt); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; rgb_pixel++; } } break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } break; case VP_SHADOW_BUFFER: if (pixel_type != VP_ALPHA) return(VPSetError(vpc, VPERROR_BAD_OPTION)); if (width != vpc->shadow_width || height != vpc->shadow_height) return(VPSetError(vpc, VPERROR_BAD_SIZE)); if (scan_bytes < width) return(VPSetError(vpc, VPERROR_BAD_SIZE)); for (y = 0; y < height; y++) { gray_pixel = vpc->shadow_buffer + (vpc->pad_shadow_to_maxwidth ? vpc->max_shadow_width*y : vpc->shadow_width*y); dst_ptr = (unsigned char *)image + y * scan_bytes; for (x = 0; x < width; x++) { value = (int)rint(gray_pixel->opcflt * 255.); if (value > 255) *dst_ptr = 255; else *dst_ptr = value; dst_ptr++; gray_pixel++; } } break; default: return(VPSetError(vpc, VPERROR_BAD_OPTION)); } return(VP_OK); } /* * vpGetTimer * * Get the value of one of the timers. */ vpResult vpGetTimer(vpc, option, iptr) vpContext *vpc; int option; int *iptr; { if (option < 0 || option >= VPTIMER_COUNT) return(VPSetError(vpc, VPERROR_BAD_OPTION)); #ifdef USE_TIMER *iptr = (int)(vpc->timer_ticks[option] * vpc->timer_usec_per_tick); #else *iptr = 0; #endif return(VP_OK); } /* * vpClearTimer * * Reset the value of one of the timers to zero. */ vpResult vpClearTimer(vpc, option) vpContext *vpc; int option; { if (option < 0 || option >= VPTIMER_COUNT) return(VPSetError(vpc, VPERROR_BAD_OPTION)); #ifdef USE_TIMER vpc->timer_ticks[option] = 0; #endif return(VP_OK); } #ifdef HAVE_HIRES_TIMER /* * StartHiResTimer * * Initialize the high-resolution memory mapped timer (available on * some models of SGI hardware). On machines with a 64-bit timer * (e.g. Challenge or ONYX), HAVE_64BIT_TIMER must be defined for * proper operation. */ static void StartHiResTimer(vpc) vpContext *vpc; { volatile unsigned timer_resolution; /* resolution of timer in psec. */ unsigned phys_addr; /* hardware address of timer */ unsigned page_addr; /* address of page containing timer */ int fd; /* file descriptor for file to be mapped */ volatile unsigned *timer_addr; /* memory-mapped address of timer */ /* set values to harmless defaults in case hardware doesn't really support a high-resolution timer */ vpc->timer_usec_per_tick = 0.; vpc->timer_addr = &vpc->dummy_timer; vpc->dummy_timer = 0; phys_addr = syssgi(SGI_QUERY_CYCLECNTR, &timer_resolution); if ((int)phys_addr == -1) return; if ((fd = open("/dev/mmem", O_RDONLY)) < 0) return; page_addr = phys_addr & ~POFFMASK; timer_addr = (volatile unsigned *)mmap(0, POFFMASK, PROT_READ, MAP_PRIVATE, fd, (int)page_addr); close(fd); if ((int)timer_addr == -1) return; vpc->timer_addr = (unsigned *)((unsigned)timer_addr + poff(phys_addr)); #ifdef HAVE_64BIT_TIMER vpc->timer_addr++; printf("Timer configured for 64 bits.\n"); #endif vpc->timer_usec_per_tick = timer_resolution * 1.0e-6; printf("Timer resolution is %d psec.\n", timer_resolution); } #endif /* HAVE_HIRES_TIMER */ volpack-1.0b3/AUTHORS0000644000265600020320000000007510727044625011240 00000000000000Phil Lacroute volpack@graphics.stanford.edu 16 December 1994 volpack-1.0b3/vp_rle.c0000644000265600020320000013233605701116545011626 00000000000000/* * vp_rle.c * * Routines for run-length encoding classified volume data. * * Copyright (c) 1994 The Board of Trustees of The Leland Stanford * Junior University. All rights reserved. * * Permission to use, copy, modify and distribute this software and its * documentation for any purpose is hereby granted without fee, provided * that the above copyright notice and this permission notice appear in * all copies of this software and that you do not sell the software. * Commercial licensing is available by contacting the author. * * THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * Author: * Phil Lacroute * Computer Systems Laboratory * Electrical Engineering Dept. * Stanford University */ /* * $Date: 1994/12/30 23:52:38 $ * $Revision: 1.28 $ */ #include "vp_global.h" static void EncodeScanline ANSI_ARGS((vpContext *vpc, void *voxels, MinMaxOctree *octree, MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS])); static void InitRLE ANSI_ARGS((vpContext *vpc)); static void CacheVoxel ANSI_ARGS((vpContext *vpc, double opacity, void *rawvoxel)); static void CacheLength ANSI_ARGS((vpContext *vpc, int length)); static void CountNonZeroVoxel ANSI_ARGS((RunData *rundata, int index, int end_of_scan, vpContext *vpc)); static void RepackClassifiedVolume ANSI_ARGS((vpContext *vpc)); static RLEVoxels *CreateEmptyRLEVoxels ANSI_ARGS((vpContext *vpc, int ilen, int jlen, int klen)); static RLEVoxels *CreateRLEVoxelsFromRunData ANSI_ARGS((vpContext *vpc, int ilen, int jlen, int klen, int non_zero_count, RunData *run_data, int rle_bytes_per_voxel)); static void StoreNonZeroVoxel ANSI_ARGS((void *voxel, int rle_bytes_per_voxel, void *data, unsigned char *lengths, RunData *rundata, int index)); static void PadScanlines ANSI_ARGS((int ilen, int jlen, int klen, RunData *run_data, unsigned char *lengths)); static ConstructionBuffer *CreateConstructionBuffer ANSI_ARGS(( vpContext *vpc)); static void DestroyConstructionBuffer ANSI_ARGS((vpContext *vpc, ConstructionBuffer *cbuf)); static GBuffer *CreateGBuffer ANSI_ARGS((vpContext *vpc)); static void DestroyGBuffer ANSI_ARGS((vpContext *vpc, GBuffer *gbuf)); #ifdef INDEX_VOLUME static vpResult ComputeIndex ANSI_ARGS((vpContext *vpc, RLEVoxels *rle_voxels)); #endif static vpResult ComputeScanOffsets ANSI_ARGS((vpContext *vpc, RLEVoxels *rle_voxels)); #ifdef DEBUG static void ValidateRLEVoxels ANSI_ARGS((vpContext *vpc, RLEVoxels *rle, int istride, int jstride, int kstride, int axis)); #endif /* * vpClassifyScalars * * Classify an array of scalars and store the result in the classified volume. */ vpResult vpClassifyScalars(vpc, scalar_data, length, scalar_field, grad_field, norm_field) vpContext *vpc; /* context */ unsigned char *scalar_data; /* 3D array of scalar data */ int length; /* number of scalars in scalar_data */ int scalar_field; /* voxel field for scalar, or VP_SKIP_FIELD */ int grad_field; /* voxel field for gradient, or VP_SKIP_FIELD */ int norm_field; /* voxel field for normal, or VP_SKIP_FIELD */ { int xlen, ylen, zlen; /* volume dimensions */ int y, z; /* loop indices */ unsigned char *scalar; /* pointer to current scalar */ int scalar_ystride; /* stride to next scalar scanline */ int scalar_zstride; /* stride to next scalar slice */ char *voxel; /* pointer to current voxel */ unsigned char *s_py, *s_my, *s_pz, *s_mz; /* ptrs to adjacent scans */ int retcode; /* return code from vpScanlineNormals */ void *voxel_scan; /* buffer for storing one scan of raw voxels */ /* check for errors */ xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; if (xlen == 0 || ylen == 0 || zlen == 0 || vpc->raw_bytes_per_voxel == 0) return(VPSetError(vpc, VPERROR_BAD_VOLUME)); if (xlen * ylen * zlen != length) return(VPSetError(vpc, VPERROR_BAD_SIZE)); /* initialize */ scalar = scalar_data; scalar_ystride = xlen; scalar_zstride = xlen*ylen; Alloc(vpc, voxel_scan, void *, xlen*vpc->raw_bytes_per_voxel,"voxel_scan"); /* compute volume data */ for (z = 0; z < zlen; z++) { ReportStatus(vpc, (double)z / (double)zlen); for (y = 0; y < ylen; y++) { s_my = (y == 0) ? NULL : scalar - scalar_ystride; s_py = (y == ylen-1) ? NULL : scalar + scalar_ystride; s_mz = (z == 0) ? NULL : scalar - scalar_zstride; s_pz = (z == zlen-1) ? NULL : scalar + scalar_zstride; voxel = voxel_scan; retcode = vpScanlineNormals(vpc, xlen, scalar, s_my, s_py, s_mz, s_pz, voxel, scalar_field, grad_field, norm_field); if (retcode != VP_OK) { Dealloc(vpc, voxel_scan); return(retcode); } retcode = vpClassifyScanline(vpc, voxel_scan); if (retcode != VP_OK) { Dealloc(vpc, voxel_scan); return(retcode); } scalar += scalar_ystride; } scalar += scalar_zstride - ylen*scalar_ystride; } ReportStatus(vpc, 1.0); Dealloc(vpc, voxel_scan); return(VP_OK); } /* * vpClassifyVolume * * Classify the current raw volume and store the result in the * classified volume. */ vpResult vpClassifyVolume(vpc) vpContext *vpc; /* context */ { int xlen, ylen, zlen; /* volume dimensions */ int y, z; /* loop indices */ char *voxel; /* pointer to current voxel */ int voxel_ystride; /* stride to next voxel scanline */ int voxel_zstride; /* stride to next voxel slice */ int retcode; /* return code */ MinMaxOctree *octree; /* octree for fast classification */ MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; /* stack for octree */ /* check for errors */ if ((retcode = VPCheckRawVolume(vpc)) != VP_OK) return(retcode); if ((retcode = VPCheckClassifier(vpc)) != VP_OK) return(retcode); /* initialize */ vpDestroyClassifiedVolume(vpc); InitRLE(vpc); xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; voxel = vpc->raw_voxels; voxel_ystride = vpc->ystride; voxel_zstride = vpc->zstride; octree = vpc->mm_octree; if (octree != NULL) { VPComputeSummedAreaTable(vpc); VPClassifyOctree(vpc); } /* compute volume data */ for (z = 0; z < zlen; z++) { ReportStatus(vpc, (double)z / (double)zlen); if (octree != NULL) VPInitOctreeLevelStack(vpc, level_stack, VP_Z_AXIS, z); for (y = 0; y < ylen; y++) { EncodeScanline(vpc, voxel, octree, level_stack); voxel += voxel_ystride; } voxel += voxel_zstride - ylen*voxel_ystride; } ReportStatus(vpc, 1.0); return(VP_OK); } /* * vpClassifyScanline * * Apply the classification function to a scanline of raw voxels and append * it to the classified volume. */ vpResult vpClassifyScanline(vpc, voxels) vpContext *vpc; /* context */ void *voxels; /* voxel scanline */ { int retcode; /* initialize if this is the first scanline */ if (vpc->cbuf == NULL) { if ((retcode = VPCheckClassifier(vpc)) != VP_OK) return(retcode); vpDestroyClassifiedVolume(vpc); InitRLE(vpc); } /* encode scanline */ EncodeScanline(vpc, voxels, NULL, NULL); return(VP_OK); } /* * EncodeScanline * * Classify and run-length encode one scanline of voxels. */ static void EncodeScanline(vpc, voxels, octree, level_stack) vpContext *vpc; /* context */ void *voxels; /* voxel scanline */ MinMaxOctree *octree; /* octree for fast classification */ MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS]; /* stack for octree */ { ConstructionBuffer *cbuf; /* state preserved between calls */ RunData rundata_x; /* statistics for current x-axis run */ RunData *rundata_y; /* statistics for all y-axis runs */ RunData *rundata_z; /* statistics for all z-axis runs */ int skip_rle_x; /* if true, do not compute rle_x */ int skip_rle_y; /* if true, do not compute rle_y */ int skip_rle_z; /* if true, do not compute rle_z */ int y, z; /* y and z coordinates of scanline */ int x; /* index of current voxel in scanline */ int xlen, ylen, zlen; /* volume dimensions */ float opacity; /* current value of the opacity (0.0-1.0) */ float min_opacity; /* low opacity threshold */ int raw_bytes_per_voxel; /* bytes in unclassified voxel */ int run_length; /* length of last run */ char *rawvoxel; /* current unclassified voxel */ unsigned char *octree_run_ptr; /* pointer to current run */ int voxel_count; /* voxels remaining in current run */ int retcode; /* initialize */ cbuf = vpc->cbuf; xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; bzero(&rundata_x, sizeof(RunData)); rundata_y = &cbuf->rundata_y[cbuf->next_z]; rundata_z = &cbuf->rundata_z[cbuf->next_y * xlen]; skip_rle_x = vpc->skip_rle_x; skip_rle_y = vpc->skip_rle_y; skip_rle_z = vpc->skip_rle_z; min_opacity = vpc->min_opacity; raw_bytes_per_voxel = vpc->raw_bytes_per_voxel; rawvoxel = voxels; y = cbuf->next_y; z = cbuf->next_z; if (octree != NULL) { if (cbuf->octree_scans_left == 0) { cbuf->octree_scans_left = VPComputeScanRuns(vpc, level_stack, cbuf->octree_runs, VP_Z_AXIS, y, xlen); } cbuf->octree_scans_left--; octree_run_ptr = cbuf->octree_runs; } /* loop over voxels in the scanline */ x = 0; while (x < xlen) { if (octree == NULL) { /* no octree available, so process all of the voxels in the scan */ voxel_count = xlen; } else do { /* skip over a run of zero voxels */ voxel_count = *octree_run_ptr++; rundata_y += zlen * voxel_count; rundata_z += voxel_count; rawvoxel += raw_bytes_per_voxel * voxel_count; x += voxel_count; /* get length of nonzero voxel run */ voxel_count = *octree_run_ptr++; } while (voxel_count == 0 && x < xlen); /* process the voxels in the nonzero run */ while (voxel_count-- > 0) { /* compute opacity */ opacity = VPClassifyVoxel(vpc, rawvoxel); /* compare opacity to threshold */ if (opacity > min_opacity) { /* voxel is non-transparent, so save it */ CacheVoxel(vpc, opacity, rawvoxel); if (!skip_rle_x) { rundata_y->p.p1.non_zero_count++; CountNonZeroVoxel(rundata_y, y, 0, NULL); } if (!skip_rle_y) { rundata_z->p.p1.non_zero_count++; CountNonZeroVoxel(rundata_z, z, 0, NULL); } rundata_x.p.p1.non_zero_count++; CountNonZeroVoxel(&rundata_x, x, 0, vpc); } rundata_y += zlen; rundata_z++; rawvoxel += raw_bytes_per_voxel; x++; } /* while (voxel_count) */ } /* for x */ /* finish off the statistics for the scanline */ CountNonZeroVoxel(&rundata_x, x, 1, vpc); /* update saved state */ cbuf->non_zero_count += rundata_x.p.p1.non_zero_count; cbuf->x_run_count += rundata_x.p.p1.run_count; /* check if this is the last scanline in the volume */ if (++cbuf->next_y == ylen) { cbuf->next_y = 0; cbuf->octree_scans_left = 0; if (++cbuf->next_z == zlen) { RepackClassifiedVolume(vpc); DestroyConstructionBuffer(vpc, vpc->cbuf); vpc->cbuf = NULL; #ifdef DEBUG printf("\r"); if (!skip_rle_x) { printf("Checking X scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_x, vpc->rle_bytes_per_voxel); } if (!skip_rle_y) { printf("Checking Y scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_y, vpc->rle_bytes_per_voxel); } if (!skip_rle_z) { printf("Checking Z scanline offsets....\n"); VPCheckScanOffsets(vpc->rle_z, vpc->rle_bytes_per_voxel); } VPValidateClassifiedVolume(vpc); #endif } } } /* * InitRLE * * Initialize in preparation for creating a new run-length encoded volume. */ static void InitRLE(vpc) vpContext *vpc; { int f; int rle_bytes_per_voxel, size, offset; int maxsize = 0; /* find out how many bytes of the raw voxel are used for shading */ rle_bytes_per_voxel = 0; for (f = 0; f < vpc->num_shade_fields; f++) { size = vpc->field_size[f]; offset = vpc->field_offset[f] + size; if (offset > rle_bytes_per_voxel) rle_bytes_per_voxel = offset; if (size > maxsize) maxsize = size; } /* add one byte for opacity and then pad to the byte boundary of the largest field in the voxel; this ensures alignment; the opacity is always stored in the last byte (so the padding is in between the shading fields and the opacity field) */ rle_bytes_per_voxel++; rle_bytes_per_voxel = (rle_bytes_per_voxel + maxsize-1) & ~(maxsize-1); vpc->rle_bytes_per_voxel = rle_bytes_per_voxel; /* initialize construction buffer */ vpc->cbuf = CreateConstructionBuffer(vpc); } /* * CacheVoxel * * Cache one voxel's data in the ConstructionBuffer. */ static void CacheVoxel(vpc, opacity, rawvoxel) vpContext *vpc; /* context */ double opacity; /* voxel's opacity */ void *rawvoxel; /* raw voxel data */ { ConstructionBuffer *cbuf; /* state during construction of volume */ GBuffer *data_buf; /* storage for cached voxels */ void *data_ptr; /* pointer to current voxel's storage */ int rle_bytes_per_voxel; /* bytes per voxel after classification */ int opc_int; /* quantized opacity */ /* initialize */ cbuf = vpc->cbuf; data_buf = cbuf->data_buf_tail; rle_bytes_per_voxel = vpc->rle_bytes_per_voxel; /* allocate more memory if necessary */ if (data_buf->bytes_left < rle_bytes_per_voxel) { /* allocate more memory */ data_buf->next = CreateGBuffer(vpc); data_buf = data_buf->next; cbuf->data_buf_tail = data_buf; } data_ptr = data_buf->data_ptr; /* copy the voxel fields required for shading */ bcopy(rawvoxel, data_ptr, rle_bytes_per_voxel-1); /* quantize and store the opacity */ opc_int = opacity*255.; if (opc_int > 255) opc_int = 255; else if (opc_int < 0) opc_int = 0; ByteField(data_ptr, rle_bytes_per_voxel-1) = opc_int; data_buf->data_ptr += rle_bytes_per_voxel; data_buf->bytes_left -= rle_bytes_per_voxel; } /* * CacheLength * * Cache one run length in the ConstructionBuffer. */ static void CacheLength(vpc, length) vpContext *vpc; int length; { GBuffer *lengths_buf; lengths_buf = vpc->cbuf->lengths_buf_tail; if (lengths_buf->bytes_left == 0) { /* allocate more memory */ lengths_buf->next = CreateGBuffer(vpc); lengths_buf = lengths_buf->next; vpc->cbuf->lengths_buf_tail = lengths_buf; } *(lengths_buf->data_ptr)++ = length; lengths_buf->bytes_left--; } /* * CountNonZeroVoxel * * Update the run count and nonzero voxel count for a voxel scanline. * This routine adds one non-zero voxel to the scanline. Index * indicates the position of the voxel in the scanline. If that * position is not immediately adjacent to the last non-zero voxel then * a run of zero voxels is added as well. * * If the vpc argument is non-NULL then the lengths of any completed * runs are written out to the run length buffer. */ static void CountNonZeroVoxel(rundata, index, end_of_scan, vpc) RunData *rundata; /* statistics for the scanline */ int index; /* index of voxel in scanline */ int end_of_scan; /* if true then finish the scanline instead of adding a voxel */ vpContext *vpc; /* context in which run lengths should be stored */ { int run_length; if (rundata->next_index != index) { /* a run of zero voxels intervenes between the current index and the last nonzero voxel that was processed */ if (rundata->next_index != 0) { /* add the last nonzero run to the statistics */ run_length = rundata->run_length; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; rundata->p.p1.run_count += 2; if (vpc != NULL) { CacheLength(vpc, 255); CacheLength(vpc, 0); } } rundata->p.p1.run_count++; if (vpc != NULL) CacheLength(vpc, run_length); } /* add the last zero run to the statistics */ run_length = index - rundata->next_index; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; rundata->p.p1.run_count += 2; if (vpc != NULL) { CacheLength(vpc, 255); CacheLength(vpc, 0); } } rundata->p.p1.run_count++; if (vpc != NULL) CacheLength(vpc, run_length); if (end_of_scan) { /* add a zero-length nonzero run to finish the scanline */ rundata->p.p1.run_count++; if (vpc != NULL) CacheLength(vpc, 0); } else { /* start the new run */ rundata->run_length = 1; rundata->next_index = index + 1; } } else if (!end_of_scan) { /* add a nonzero voxel to the current run */ if (rundata->next_index == 0) { rundata->p.p1.run_count++; /* count initial zero run */ if (vpc != NULL) CacheLength(vpc, 0); } rundata->run_length++; rundata->next_index = index + 1; } else { /* scanline ends with a nonzero voxel run */ run_length = rundata->run_length; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; rundata->p.p1.run_count += 2; if (vpc != NULL) { CacheLength(vpc, 255); CacheLength(vpc, 0); } } rundata->p.p1.run_count++; if (vpc != NULL) CacheLength(vpc, run_length); } } /* * RepackClassifiedVolume * * Repack the data in the ConstructionBuffer after the last call to * vpClassifyScanline. This procedure creates the three run-length * encoded copies of the classified voxels. */ static void RepackClassifiedVolume(vpc) vpContext *vpc; { int xlen, ylen, zlen; /* volume dimensions */ int x, y, z; /* voxel coordinates */ int non_zero_count; /* number of nonzero voxels in volume */ int rle_bytes_per_voxel; /* bytes per classified voxel */ int skip_rle_x; /* if true, compute rle_x */ int skip_rle_y; /* if true, compute rle_y */ int skip_rle_z; /* if true, compute rle_z */ char *x_data; /* voxel data for x viewpoint */ char *y_data; /* voxel data for y viewpoint */ char *z_data; /* voxel data for z viewpoint */ unsigned char *x_lengths; /* run length for x viewpoint */ unsigned char *y_lengths; /* run length for y viewpoint */ unsigned char *z_lengths; /* run length for z viewpoint */ int z_data_offset; /* offset to current data value in z volume */ int z_length_offset; /* offset to current length value in z volume*/ GBuffer *data_buf; /* next GBuffer containing voxel data */ char *data; /* pointer to next voxel */ int data_bytes_left; /* bytes of data left in data buffer */ GBuffer *lengths_buf; /* next GBuffer containing length data */ unsigned char *lengths; /* pointer to next length */ int lengths_bytes_left; /* bytes of data left in lengths buffer */ int x_run_length; /* length of current x-scanline run */ int is_non_zero; /* true if current x-scanline run is nonzero */ RunData *rundata_y; /* statistics for y-axis runs */ RunData *rundata_z; /* statistics for z-axis runs */ /* initialize */ xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; non_zero_count = vpc->cbuf->non_zero_count; rle_bytes_per_voxel = vpc->rle_bytes_per_voxel; skip_rle_x = vpc->skip_rle_x; skip_rle_y = vpc->skip_rle_y; skip_rle_z = vpc->skip_rle_z; /* check for empty volume */ if (non_zero_count == 0) { if (!skip_rle_x) vpc->rle_x = CreateEmptyRLEVoxels(vpc, ylen, zlen, xlen); if (!skip_rle_y) vpc->rle_y = CreateEmptyRLEVoxels(vpc, zlen, xlen, ylen); if (!skip_rle_z) vpc->rle_z = CreateEmptyRLEVoxels(vpc, xlen, ylen, zlen); return; } /* allocate space for y-axis runs (used for the x viewing axis) */ if (!skip_rle_x) { vpc->rle_x = CreateRLEVoxelsFromRunData(vpc, ylen, zlen, xlen, non_zero_count, vpc->cbuf->rundata_y, rle_bytes_per_voxel); x_data = vpc->rle_x->data; x_lengths = vpc->rle_x->run_lengths; } /* allocate space for z-axis runs (used for the y viewing axis) */ if (!skip_rle_y) { vpc->rle_y = CreateRLEVoxelsFromRunData(vpc, zlen, xlen, ylen, non_zero_count, vpc->cbuf->rundata_z, rle_bytes_per_voxel); y_data = vpc->rle_y->data; y_lengths = vpc->rle_y->run_lengths; } /* allocate space for x-axis runs (used for the z viewing axis) */ if (!skip_rle_z) { vpc->rle_z = VPCreateRLEVoxels(vpc, xlen, ylen, zlen, non_zero_count, vpc->cbuf->x_run_count, rle_bytes_per_voxel); Alloc(vpc, vpc->rle_z->scan_offsets, ScanOffset *, zlen*sizeof(ScanOffset), "scan_offsets"); vpc->rle_z->scan_offsets_per_slice = 1; z_data = vpc->rle_z->data; z_lengths = vpc->rle_z->run_lengths; z_data_offset = 0; z_length_offset = 0; } /* copy data into the three RLEVoxels structures */ data_buf = vpc->cbuf->data_buf_head; data = NULL; data_bytes_left = 0; lengths_buf = vpc->cbuf->lengths_buf_head; lengths = NULL; lengths_bytes_left = 0; x_run_length = 0; is_non_zero = 1; for (z = 0; z < zlen; z++) { ReportStatus(vpc, (double)z / (double)zlen); if (!skip_rle_z) { vpc->rle_z->scan_offsets[z].first_data = z_data_offset; vpc->rle_z->scan_offsets[z].first_len = (z_length_offset & 0x1) ? z_length_offset + 1 : z_length_offset; } rundata_z = vpc->cbuf->rundata_z; for (y = 0; y < ylen; y++) { rundata_y = &vpc->cbuf->rundata_y[z]; for (x = 0; x < xlen; x++) { while (x_run_length == 0) { /* find length of next run */ if (lengths_bytes_left <= 0) { /* go to next lengths buffer */ lengths = (unsigned char *)lengths_buf->data; lengths_bytes_left = GBUFFER_SIZE - lengths_buf->bytes_left; lengths_buf = lengths_buf->next; if (!skip_rle_z) { bcopy(lengths, z_lengths, lengths_bytes_left); z_lengths += lengths_bytes_left; } } x_run_length = *lengths++; lengths_bytes_left--; is_non_zero = !is_non_zero; z_length_offset++; } x_run_length--; /* consume one voxel */ if (is_non_zero) { /* find the data for this voxel */ if (data_bytes_left <= 0) { data = data_buf->data; data_bytes_left = GBUFFER_SIZE - data_buf->bytes_left; data_buf = data_buf->next; if (!skip_rle_z) { bcopy(data, z_data, data_bytes_left); z_data = (char *)z_data + data_bytes_left; } } /* store voxel */ if (!skip_rle_x) { StoreNonZeroVoxel(data, rle_bytes_per_voxel, x_data, x_lengths, rundata_y, y); } if (!skip_rle_y) { StoreNonZeroVoxel(data, rle_bytes_per_voxel, y_data, y_lengths, rundata_z, z); } data += rle_bytes_per_voxel; data_bytes_left -= rle_bytes_per_voxel; z_data_offset += rle_bytes_per_voxel; } rundata_y += zlen; rundata_z++; } /* for x */ } /* for y */ } /* for z */ ReportStatus(vpc, 1.0); if (!skip_rle_x) PadScanlines(ylen, zlen, xlen, vpc->cbuf->rundata_y, x_lengths); if (!skip_rle_y) PadScanlines(zlen, xlen, ylen, vpc->cbuf->rundata_z, y_lengths); } /* * CreateEmptyRLEVoxels * * Create an empty RLEVoxels object (all voxels transparent). */ static RLEVoxels * CreateEmptyRLEVoxels(vpc, ilen, jlen, klen) vpContext *vpc; int ilen, jlen, klen; { RLEVoxels *rle_voxels; int j, k; unsigned char *run_lengths; ScanOffset *scan_offsets; rle_voxels = VPCreateRLEVoxels(vpc, ilen, jlen, klen, 1, 2*jlen*klen, 1); Alloc(vpc, rle_voxels->scan_offsets, ScanOffset *, klen*sizeof(ScanOffset), "scan_offsets"); rle_voxels->scan_offsets_per_slice = 1; run_lengths = rle_voxels->run_lengths; scan_offsets = rle_voxels->scan_offsets; for (k = 0; k < klen; k++) { scan_offsets->first_len = k*jlen*2; scan_offsets->first_data = 0; scan_offsets++; for (j = 0; j < jlen; j++) { *run_lengths++ = ilen; *run_lengths++ = 0; } } return(rle_voxels); } /* * CreateRLEVoxelsFromRunData * * Allocate an RLEVoxels structure using the data in a RunData array * in order to determine the required size. Also reinitialize the RunData * array with pointers to the RLEVoxels data for the beginning of * each scanline. */ static RLEVoxels * CreateRLEVoxelsFromRunData(vpc, ilen, jlen, klen, non_zero_count, run_data, rle_bytes_per_voxel) vpContext *vpc; /* context */ int ilen, jlen, klen; /* size of volume in rotated object space */ int non_zero_count; /* number of nonzero voxels in volume */ RunData *run_data; /* array of run statistics (jlen*klen entries) */ int rle_bytes_per_voxel;/* number of bytes to allocate for each voxel */ { int j, k; /* scanline and slice number */ int scan_run_count; /* runs in current scanline */ int run_count; /* runs in entire volume */ int scan_non_zero_count; /* nonzero voxels in scanline */ int data_offset; /* scanline's offset in RLEVoxels->data */ int length_offset; /* scanline's offset in RLEVoxels->run_lengths */ ScanOffset *slice_offset; /* offsets for each slice */ RLEVoxels *rle_voxels; /* return value */ Alloc(vpc, slice_offset, ScanOffset *, klen*sizeof(ScanOffset), "scan_offsets"); /* accumulate the statistics for the last run in each scanline, count the total number of runs, and store the data and length offsets for the beginning of the scanline */ data_offset = 0; length_offset = 0; run_count = 0; for (k = 0; k < klen; k++) { slice_offset[k].first_data = data_offset; slice_offset[k].first_len = length_offset; for (j = 0; j < jlen; j++) { CountNonZeroVoxel(run_data, ilen, 1, NULL); scan_non_zero_count = run_data->p.p1.non_zero_count; scan_run_count = run_data->p.p1.run_count; run_data->run_length = 0; run_data->next_index = 0; run_data->p.p2.data_offset = data_offset; run_data->p.p2.length_offset = length_offset; data_offset += scan_non_zero_count * rle_bytes_per_voxel; length_offset += scan_run_count * sizeof(unsigned char); run_count += scan_run_count; run_data++; } } /* allocate space */ rle_voxels = VPCreateRLEVoxels(vpc, ilen, jlen, klen, non_zero_count, run_count, rle_bytes_per_voxel); rle_voxels->scan_offsets_per_slice = 1; rle_voxels->scan_offsets = slice_offset; return(rle_voxels); } /* * StoreNonZeroVoxel * * Store a nonzero voxel in an RLEVoxels object. This function is * just like CountNonZeroVoxel except that it actually stores voxel data. */ static void StoreNonZeroVoxel(voxel, rle_bytes_per_voxel, data, lengths, rundata, index) void *voxel; /* input voxel data */ int rle_bytes_per_voxel;/* size of voxel */ void *data; /* location to store voxel */ unsigned char *lengths; /* location to store run lengths */ RunData *rundata; /* run length statistics for current voxel scanline */ int index; /* index of voxel in scanline */ { int run_length; /* store the voxel */ if (voxel != NULL) { bcopy(voxel, (char *)data + rundata->p.p2.data_offset, rle_bytes_per_voxel); rundata->p.p2.data_offset += rle_bytes_per_voxel; } /* update run lengths */ if (rundata->next_index != index) { /* a run of zero voxels intervenes between the current index and the last nonzero voxel that was processed */ if (rundata->next_index != 0) { /* add the last nonzero run to the statistics */ run_length = rundata->run_length; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; lengths[rundata->p.p2.length_offset++] = 255; lengths[rundata->p.p2.length_offset++] = 0; } lengths[rundata->p.p2.length_offset++] = run_length; } /* add the last zero run to the statistics */ run_length = index - rundata->next_index; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; lengths[rundata->p.p2.length_offset++] = 255; lengths[rundata->p.p2.length_offset++] = 0; } lengths[rundata->p.p2.length_offset++] = run_length; if (voxel == NULL) { /* add a zero-length nonzero run to finish the scanline */ lengths[rundata->p.p2.length_offset++] = 0; } else { /* start the new run */ rundata->run_length = 1; rundata->next_index = index + 1; } } else if (voxel != NULL) { /* add a nonzero voxel to the current run */ if (rundata->next_index == 0) { lengths[rundata->p.p2.length_offset++] = 0; } rundata->run_length++; rundata->next_index = index + 1; } else { /* scanline ends with a nonzero voxel run */ run_length = rundata->run_length; while (run_length > 255) { /* run is too long, so split it */ run_length -= 255; lengths[rundata->p.p2.length_offset++] = 255; lengths[rundata->p.p2.length_offset++] = 0; } lengths[rundata->p.p2.length_offset++] = run_length; } } /* * PadScanlines * * Make sure each scanline has an even number of runs. */ static void PadScanlines(ilen, jlen, klen, run_data, lengths) int ilen, jlen, klen; /* size of volume in rotated object space */ RunData *run_data; /* array of run statistics (jlen*klen entries) */ unsigned char *lengths; /* beginning of run lengths array */ { int scan_count; /* number of scanlines */ int scan_run_count; /* number of runs in scanline */ int scan; /* current scanline number */ scan_count = jlen * klen; for (scan = 0; scan < scan_count; scan++) { StoreNonZeroVoxel(NULL, 0, NULL, lengths, run_data, ilen); run_data++; } } /* * VPCreateRLEVoxels * * * Allocate a new RLEVoxels object. */ RLEVoxels * VPCreateRLEVoxels(vpc, ilen, jlen, klen, data_count, run_count, rle_bytes_per_voxel) vpContext *vpc; /* context */ int ilen, jlen, klen; /* dimensions in rotated object space */ int data_count; /* number of nonzero voxels */ int run_count; /* number of runs */ int rle_bytes_per_voxel;/* bytes of storage for one voxel */ { RLEVoxels *rle_voxels; Alloc(vpc, rle_voxels, RLEVoxels *, sizeof(RLEVoxels), "RLEVoxels"); rle_voxels->ilen = ilen; rle_voxels->jlen = jlen; rle_voxels->klen = klen; rle_voxels->run_count = run_count; if (run_count > 0) { Alloc(vpc, rle_voxels->run_lengths, unsigned char *, run_count, "run_lengths"); } else { rle_voxels->run_lengths = NULL; } rle_voxels->data_count = data_count; if (data_count > 0) { Alloc(vpc, rle_voxels->data, void *, data_count * rle_bytes_per_voxel, "voxeldata"); } else { rle_voxels->data = NULL; } rle_voxels->scan_offsets_per_slice = 0; rle_voxels->scan_offsets = NULL; rle_voxels->mmapped = 0; #ifdef INDEX_VOLUME rle_voxels->voxel_index = NULL; #endif return(rle_voxels); } /* * VPDestroyRLEVoxels * * Destroy an RLEVoxels object. */ void VPDestroyRLEVoxels(vpc, rle_voxels) vpContext *vpc; RLEVoxels *rle_voxels; { if (!rle_voxels->mmapped) { if (rle_voxels->run_lengths != NULL) Dealloc(vpc, rle_voxels->run_lengths); if (rle_voxels->data != NULL) Dealloc(vpc, rle_voxels->data); if (rle_voxels->scan_offsets != NULL) Dealloc(vpc, rle_voxels->scan_offsets); } #ifdef INDEX_VOLUME if (rle_voxels->voxel_index != NULL) Dealloc(vpc, rle_voxels->voxel_index); #endif Dealloc(vpc, rle_voxels); } /* * CreateConstructionBuffer * * Create a ConstructionBuffer object. */ static ConstructionBuffer * CreateConstructionBuffer(vpc) vpContext *vpc; { ConstructionBuffer *cbuf; int xlen, ylen, zlen; xlen = vpc->xlen; ylen = vpc->ylen; zlen = vpc->zlen; Alloc(vpc, cbuf, ConstructionBuffer *, sizeof(ConstructionBuffer), "ConstructionBuffer"); Alloc(vpc, cbuf->rundata_y, RunData *, xlen*zlen*sizeof(RunData), "rundata_y"); Alloc(vpc, cbuf->rundata_z, RunData *, ylen*xlen*sizeof(RunData), "rundata_z"); bzero(cbuf->rundata_y, xlen*zlen*sizeof(RunData)); bzero(cbuf->rundata_z, ylen*xlen*sizeof(RunData)); cbuf->data_buf_head = CreateGBuffer(vpc); cbuf->data_buf_tail = cbuf->data_buf_head; cbuf->lengths_buf_head = CreateGBuffer(vpc); cbuf->lengths_buf_tail = cbuf->lengths_buf_head; cbuf->non_zero_count = 0; cbuf->x_run_count = 0; cbuf->octree_scans_left = 0; cbuf->next_z = 0; cbuf->next_y = 0; return(cbuf); } /* * DestroyConstructionBuffer * * Destroy a ConstructionBuffer object. */ static void DestroyConstructionBuffer(vpc, cbuf) vpContext *vpc; ConstructionBuffer *cbuf; { GBuffer *gbuf, *next_gbuf; Dealloc(vpc, cbuf->rundata_y); Dealloc(vpc, cbuf->rundata_z); for (gbuf = cbuf->data_buf_head; gbuf != NULL; gbuf = next_gbuf) { next_gbuf = gbuf->next; DestroyGBuffer(vpc, gbuf); } for (gbuf = cbuf->lengths_buf_head; gbuf != NULL; gbuf = next_gbuf) { next_gbuf = gbuf->next; DestroyGBuffer(vpc, gbuf); } Dealloc(vpc, cbuf); } /* * CreateGBuffer * * Create a GBuffer object. */ static GBuffer * CreateGBuffer(vpc) vpContext *vpc; { GBuffer *gbuf; Alloc(vpc, gbuf, GBuffer *, sizeof(GBuffer), "GBuffer"); gbuf->bytes_left = GBUFFER_SIZE; gbuf->data_ptr = gbuf->data; gbuf->next = NULL; return(gbuf); } /* * DestroyGBuffer * * Destroy a GBuffer. */ static void DestroyGBuffer(vpc, gbuf) vpContext *vpc; GBuffer *gbuf; { Dealloc(vpc, gbuf); } /* * vpDestroyClassifiedVolume * * Free all memory associated with a classified volume. */ vpResult vpDestroyClassifiedVolume(vpc) vpContext *vpc; { if (vpc->cbuf != NULL) { DestroyConstructionBuffer(vpc, vpc->cbuf); vpc->cbuf = NULL; } if (vpc->rle_x != NULL) { VPDestroyRLEVoxels(vpc, vpc->rle_x); vpc->rle_x = NULL; } if (vpc->rle_y != NULL) { VPDestroyRLEVoxels(vpc, vpc->rle_y); vpc->rle_y = NULL; } if (vpc->rle_z != NULL) { VPDestroyRLEVoxels(vpc, vpc->rle_z); vpc->rle_z = NULL; } return(VP_OK); } #ifdef INDEX_VOLUME /* * vpComputeRLEIndex * * Compute indexes for the classified volume data in a context. */ vpResult vpComputeRLEIndex(vpc) vpContext *vpc; { vpResult result; if ((result = VPComputeRLEScanOffsets(vpc)) != VP_OK) return(result); if (vpc->rle_x != NULL) { if ((result = ComputeIndex(vpc, vpc->rle_x)) != VP_OK) return(result); } if (vpc->rle_y != NULL) { if ((result = ComputeIndex(vpc, vpc->rle_y)) != VP_OK) return(result); } if (vpc->rle_z != NULL) { if ((result = ComputeIndex(vpc, vpc->rle_z)) != VP_OK) return(result); } return(VP_OK); } /* * ComputeIndex * * Compute an index that maps 3D voxel coordinates to the RLE run data * for the corresponding voxel. The values stored in the index are * byte offsets to the beginning of the run containing the voxel, * plus a count indicating the position of the voxel in the run. * Return value is a result code. */ static vpResult ComputeIndex(vpc, rle_voxels) vpContext *vpc; RLEVoxels *rle_voxels; { int ilen, jlen, klen; /* size of volume */ unsigned char *RLElen; /* pointer to current run length */ VoxelLocation *index; /* pointer to current index entry */ int i, j, k; /* current voxel coordinates */ unsigned len_offset; /* offset in bytes from beginning of scanline to current run length */ unsigned data_offset; /* offset in bytes from beginning of scanline to current voxel data */ int run_is_zero; /* true if current run is a zero run */ int run_count; /* voxels left in current run */ int voxel_size; /* size of a voxel in bytes */ ilen = rle_voxels->ilen; jlen = rle_voxels->jlen; klen = rle_voxels->klen; RLElen = rle_voxels->run_lengths; if (rle_voxels->scan_offsets_per_slice != jlen) return(VPERROR_BAD_VOLUME); if (rle_voxels->voxel_index == NULL) { Alloc(vpc, rle_voxels->voxel_index, VoxelLocation *, ilen * jlen * klen * sizeof(VoxelLocation), "voxel_index"); } index = rle_voxels->voxel_index; voxel_size = vpc->rle_bytes_per_voxel; run_is_zero = 0; run_count = 0; for (k = 0; k < klen; k++) { for (j = 0; j < jlen; j++) { ASSERT(run_is_zero == 0); ASSERT(run_count == 0); len_offset = 0; data_offset = 0; for (i = 0; i < ilen; i++) { /* record index for current voxel */ if (len_offset > 256) { Dealloc(vpc, rle_voxels->voxel_index); rle_voxels->voxel_index = NULL; return(VPERROR_LIMIT_EXCEEDED); } index->run_count = run_count; index->len_offset = len_offset; if (run_is_zero) index->data_offset = data_offset | INDEX_RUN_IS_ZERO; else index->data_offset = data_offset; index++; /* go on to next voxel */ while (run_count == 0) { run_count = *RLElen++; run_is_zero = !run_is_zero; len_offset++; } run_count--; if (!run_is_zero) data_offset += voxel_size; } ASSERT(run_count == 0); if (run_is_zero) { run_count = *RLElen++; run_is_zero = !run_is_zero; len_offset++; } } } return(VP_OK); } #endif /* INDEX_VOLUME */ /* * VPComputeRLEScanOffsets * * Recompute the scan_offsets arrays for the classified volume data in * a context. Return value is a result code. */ vpResult VPComputeRLEScanOffsets(vpc) vpContext *vpc; { vpResult result; if (vpc->rle_x != NULL) { if ((result = ComputeScanOffsets(vpc, vpc->rle_x)) != VP_OK) return(result); #ifdef DEBUG VPCheckScanOffsets(vpc->rle_x, vpc->rle_bytes_per_voxel); #endif } if (vpc->rle_y != NULL) { if ((result = ComputeScanOffsets(vpc, vpc->rle_y)) != VP_OK) return(result); #ifdef DEBUG VPCheckScanOffsets(vpc->rle_y, vpc->rle_bytes_per_voxel); #endif } if (vpc->rle_z != NULL) { if ((result = ComputeScanOffsets(vpc, vpc->rle_z)) != VP_OK) return(result); #ifdef DEBUG VPCheckScanOffsets(vpc->rle_z, vpc->rle_bytes_per_voxel); #endif } return(VP_OK); } /* * ComputeScanOffsets * * Recompute the scan_offsets array for a classified volume. * Return value is a result code. */ static vpResult ComputeScanOffsets(vpc, rle_voxels) vpContext *vpc; RLEVoxels *rle_voxels; { int ilen, jlen, klen; /* size of volume */ unsigned char *RLElen; /* pointer to current run length */ ScanOffset *scan_offset; /* pointer to current scanline offset */ int i, j, k; /* current voxel coordinates */ unsigned len_offset; /* offset in bytes from beginning of run lengths to current run length */ unsigned data_offset; /* offset in bytes from beginning of voxel data to current voxel data */ int voxel_size; /* size of a voxel in bytes */ int zerocount, nonzerocount; if (rle_voxels->mmapped) return(VPERROR_IO); ilen = rle_voxels->ilen; jlen = rle_voxels->jlen; klen = rle_voxels->klen; RLElen = rle_voxels->run_lengths; if (rle_voxels->scan_offsets_per_slice != jlen) { if (rle_voxels->scan_offsets != NULL) Dealloc(vpc, rle_voxels->scan_offsets); Alloc(vpc, rle_voxels->scan_offsets, ScanOffset *, klen * jlen * sizeof(ScanOffset), "scan_offsets"); rle_voxels->scan_offsets_per_slice = jlen; } scan_offset = rle_voxels->scan_offsets; len_offset = 0; data_offset = 0; voxel_size = vpc->rle_bytes_per_voxel; for (k = 0; k < klen; k++) { for (j = 0; j < jlen; j++) { scan_offset->first_len = len_offset; scan_offset->first_data = data_offset; scan_offset++; for (i = 0; i < ilen; ) { zerocount = *RLElen++; /* get length of run of zeros */ nonzerocount = *RLElen++;/* get length of run of non-zeros */ len_offset += 2; data_offset += nonzerocount * voxel_size; i += zerocount + nonzerocount; } ASSERT(i == ilen); } } return(VP_OK); } #ifdef DEBUG /* * VPCheckScanOffsets * * Check the scan_offsets field of an RLEVolume for internal consistency. */ void VPCheckScanOffsets(rle_voxels, rle_bytes_per_voxel) RLEVoxels *rle_voxels; { int i, j, k; int ilen, jlen, klen; int run_length; int is_non_zero; unsigned char *run_length_ptr; int length_offset; int data_offset; int scan_offsets_per_slice; ScanOffset *scan_offset; scan_offsets_per_slice = rle_voxels->scan_offsets_per_slice; if (scan_offsets_per_slice == 0) return; ilen = rle_voxels->ilen; jlen = rle_voxels->jlen; klen = rle_voxels->klen; run_length_ptr = rle_voxels->run_lengths; run_length = 0; is_non_zero = 1; length_offset = 0; data_offset = 0; for (k = 0; k < klen; k++) { for (j = 0; j < jlen; j++) { if (j < scan_offsets_per_slice) { scan_offset = &rle_voxels->scan_offsets[ k*scan_offsets_per_slice + j]; if (scan_offset->first_len != length_offset) { printf("Bad length offset on slice %d, scanline %d: ",k,j); printf("%d should be %d\n", scan_offset->first_len, length_offset); } if (scan_offset->first_data != data_offset) { printf("Bad data offset on slice %d, scanline %d: ",k,j); printf("%d should be %d\n", scan_offset->first_data, data_offset); } } for (i = 0; i < ilen; i++) { while (run_length == 0) { run_length = *run_length_ptr++; is_non_zero = !is_non_zero; length_offset++; } run_length--; if (is_non_zero) data_offset += rle_bytes_per_voxel; } if (run_length != 0) { printf("Run did not terminate at end of scanline "); printf("on slice %d, scanline %d\n", k, j); } if (!is_non_zero) { if (*run_length_ptr++ != 0) { printf("Missing zero run at end of scanline "); printf("on slice %d, scanline %d\n", k, j); } is_non_zero = !is_non_zero; length_offset++; } } } } /* * VPValidateClassifiedVolume * * Compare the classified volume to the unclassified volume. */ void VPValidateClassifiedVolume(vpc) vpContext *vpc; { if (vpc->raw_voxels == NULL) return; if (vpc->rle_z != NULL) { printf("Checking Z view....\n"); ValidateRLEVoxels(vpc, vpc->rle_z, vpc->xstride, vpc->ystride, vpc->zstride, VP_Z_AXIS); } if (vpc->rle_y != NULL) { printf("Checking Y view....\n"); ValidateRLEVoxels(vpc, vpc->rle_y, vpc->zstride, vpc->xstride, vpc->ystride, VP_Y_AXIS); } if (vpc->rle_x != NULL) { printf("Checking X view....\n"); ValidateRLEVoxels(vpc, vpc->rle_x, vpc->ystride, vpc->zstride, vpc->xstride, VP_X_AXIS); } } static void ValidateRLEVoxels(vpc, rle, istride, jstride, kstride, axis) vpContext *vpc; RLEVoxels *rle; int istride, jstride, kstride; int axis; { char *rawvoxel; char *rlevoxel; unsigned char *lengths; int i, j, k; int count; int is_non_zero; int num_runs; float opacity; int ilen, jlen, klen; int founderror; int raw_opc_int; int rle_opc_int; int rle_bytes_per_voxel; rawvoxel = (char *)vpc->raw_voxels; rlevoxel = (char *)rle->data; lengths = rle->run_lengths; ilen = rle->ilen; jlen = rle->jlen; klen = rle->klen; rle_bytes_per_voxel = vpc->rle_bytes_per_voxel; founderror = 0; for (k = 0; k < klen; k++) { for (j = 0; j < jlen; j++) { count = 0; is_non_zero = 1; num_runs = 0; for (i = 0; i < ilen; i++) { while (count == 0) { count = *lengths++; is_non_zero = !is_non_zero; if (++num_runs > rle->ilen) VPBug("runaway scan detected by ValidateRLEVoxels"); } opacity = VPClassifyVoxel(vpc, rawvoxel); if (is_non_zero) { if (opacity <= vpc->min_opacity && fabs(opacity - vpc->min_opacity) > 0.001) { printf("\n"); printf("**** zero rawvoxel in nonzero rlerun ****\n"); printf("voxel (i,j,k)=(%d,%d,%d), viewaxis %d\n", i, j, k, axis); printf("Actual opacity: %17.15f\n", opacity); printf("Threshold: %17.15f\n", vpc->min_opacity); founderror = 1; } raw_opc_int = (int)rint(opacity*255.); rle_opc_int = ByteField(rlevoxel, rle_bytes_per_voxel-1); if (abs(raw_opc_int - rle_opc_int) > 1) { printf("\n"); printf("**** rawvoxel and rlevoxel disagree ****\n"); printf("voxel (i,j,k)=(%d,%d,%d), viewaxis %d\n", i, j, k, axis); printf("Raw opacity: %3d\n", raw_opc_int); printf("RLE opacity: %3d\n", rle_opc_int); founderror = 1; } rlevoxel += rle_bytes_per_voxel; } else { if (opacity > vpc->min_opacity && fabs(opacity - vpc->min_opacity) > 0.001) { printf("\n"); printf("**** nonzero rawvoxel in zero rlerun ****\n"); printf("voxel (i,j,k)=(%d,%d,%d), viewaxis %d\n", i, j, k, axis); printf("Actual opacity: %17.15f\n", opacity); printf("Threshold: %17.15f\n", vpc->min_opacity); founderror = 1; } } if (founderror) { VPDumpClassifier(vpc); VPBug("ValidateRLEVoxels found a problem"); } rawvoxel += istride; count--; } if (count != 0) VPBug("Run did not terminate at end of scanline"); if (!is_non_zero) { if (*lengths++ != 0) VPBug("Missing zero run at end of scanline"); is_non_zero = !is_non_zero; } rawvoxel += jstride - ilen*istride; } rawvoxel += kstride - jlen*jstride; } } #endif void VPDumpView(vpc) vpContext *vpc; { int c; printf("MODEL:\n"); for (c = 0; c < 4; c++) { printf(" %12.6f %12.6f %12.6f %12.6f\n", vpc->transforms[VP_MODEL][c][0], vpc->transforms[VP_MODEL][c][1], vpc->transforms[VP_MODEL][c][2], vpc->transforms[VP_MODEL][c][3]); } printf("VIEW:\n"); for (c = 0; c < 4; c++) { printf(" %12.6f %12.6f %12.6f %12.6f\n", vpc->transforms[VP_MODEL][c][0], vpc->transforms[VP_MODEL][c][1], vpc->transforms[VP_MODEL][c][2], vpc->transforms[VP_MODEL][c][3]); } printf("PROJECT:\n"); for (c = 0; c < 4; c++) { printf(" %12.6f %12.6f %12.6f %12.6f\n", vpc->transforms[VP_MODEL][c][0], vpc->transforms[VP_MODEL][c][1], vpc->transforms[VP_MODEL][c][2], vpc->transforms[VP_MODEL][c][3]); } } void VPDumpClassifier(vpc) vpContext *vpc; { int c, d; for (d = 0; d < vpc->num_clsfy_params; d++) { printf("CLASSIFIER PARAM %d:\n ", d); for (c = 0; c < vpc->field_max[vpc->param_field[d]]; c++) { printf(" %8.6f", vpc->clsfy_table[d][c]); if (c % 8 == 7) printf("\n "); } printf("\n"); } }
Section 1: Overview
  1. Introduction to VolPack
  2. The Volume Rendering Pipeline
  3. Data Structures and Rendering Algorithms
Section 2: Using VolPack
  1. Include Files and Libraries
  2. Rendering Contexts
  3. Volumes
  4. Classification
  5. Classified Volumes
  6. Min-Max Octrees
  7. View Transformations
  8. Shading and Lighting
  9. Images
  10. Rendering
  11. State Variables
  12. Utility Functions
  13. Result Codes and Error Handling
Section 3: Tips and Pointers
  1. Maximizing Rendering Speed
  2. Maximizing Image Quality
  3. Software Support
  4. Obtaining the Software