Compare commits

...
2 Commits
Author SHA1 Message Date
Christopher Sean Morrison 00e7f2a45c remove what looks like a tag related to the merging of the bobWinPort work, some artifact tag that was retained through conversion from cvs. (svn branch delete)
svn:revision:46336
svn:tag:temp_tag
svn:account:brlcad
2011-08-23 15:47:55 +00:00
cvs-fast-export 3a39e428b4 Synthetic commit for incomplete tag temp_tag
svn:revision:25915
cvs:account:cvs-fast-export
2005-12-24 02:44:08 +00:00
21 changed files with 0 additions and 26926 deletions
-52
View File
@@ -1,52 +0,0 @@
/*
* C O N S T . C
*
* Constants used by the ray tracing library.
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005
*
* Copyright Notice -
* This software is Copyright (C) 1989 by the United States Army.
* All rights reserved.
*/
#ifndef lint
static char RCSmat[] = "@(#)$Header$ (BRL)";
#endif
#include "conf.h"
#include <stdio.h>
#include "machine.h"
#include "vmath.h"
#include "raytrace.h"
CONST double rt_pi = 3.14159265358979323846; /* pi */
CONST double rt_twopi = 6.28318530717958647692; /* pi*2 */
CONST double rt_halfpi = 1.57079632679489661923; /* pi/2 */
CONST double rt_quarterpi=0.78539816339744830961; /* pi/4 */
CONST double rt_invpi = 0.318309886183790671538; /* 1/pi */
CONST double rt_inv2pi = 0.159154943091895335769; /* 1/(pi*2) */
CONST double rt_inv4pi = 0.07957747154594766788; /* 1/(pi*4) */
CONST double rt_inv255 = 1.0/255.0;
CONST double rt_degtorad = 0.0174532925199433; /* (pi*2)/360 */
CONST double rt_radtodeg = 57.29577951308230698802; /* 360/(pi*2) */
CONST mat_t rt_identity = {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
#ifdef ipsc860
/* Hack to work around the broken iPSC/860 loader. It doesn't
* see the definition in global.c, probably because there is no
* .text or .data there that it needs.
*/
struct rt_g rt_g;
#endif
-170
View File
@@ -1,170 +0,0 @@
/*
* H I S T . C
*
* General purpose histogram handling routines
*
* The macro RT_HISTOGRAM_TALLY is used to record items that
* live in a single "bin", while the subroutine rt_hist_range()
* is used to record items that may extend across multiple "bin"s.
*
* Author -
* Michael John Muuss
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005-5066
*
* Copyright Notice -
* This software is Copyright (C) 1990 by the United States Army.
* All rights reserved.
*/
#ifndef lint
static char RCShist[] = "@(#)$Header$ (BRL)";
#endif
#include "conf.h"
#include <stdio.h>
#include <math.h>
#include "machine.h"
#include "vmath.h"
#include "raytrace.h"
#include "./debug.h"
/*
* R T _ H I S T _ F R E E
*/
void
rt_hist_free( histp )
struct histogram *histp;
{
/* The 'clean' command can be called before the first rt_prep(),
* resulting in zero magic numbers in rtip->rti_hist_cellsize.
*/
if( histp && histp->magic == 0 ) return;
RT_CK_HISTOGRAM(histp);
if( histp->hg_bins )
rt_free( (char *)histp->hg_bins, "old histogram bins");
histp->hg_bins = (long *)0;
histp->hg_nbins = 0;
histp->magic = -1; /* sanity */
}
/*
* R T _ H I S T _ I N I T
*
* Initialize a histogram structure.
* It is expected that the structure is junk upon entry.
*/
void
rt_hist_init( histp, min, max, nbins )
struct histogram *histp;
fastf_t min, max;
int nbins;
{
if( max <= min ) max = min+1;
if( nbins < 2 ) {
nbins = 2;
} else if( nbins > 10000 ) {
nbins = 10000;
}
histp->hg_min = floor(min);
histp->hg_max = ceil(max);
histp->hg_nbins = nbins;
/* When max-min <= nbins, clumpsize should be 1 */
histp->hg_clumpsize = ((max-min)/nbins)+1;
if( histp->hg_clumpsize <= 0 ) histp->hg_clumpsize = 1;
histp->hg_nsamples = 0L;
histp->hg_bins = (long *)rt_calloc( nbins+1, sizeof(long), "histogram bins");
histp->magic = RT_HISTOGRAM_MAGIC;
}
/*
* R T _ H I S T _ R A N G E
*/
void
rt_hist_range( hp, low, high )
register struct histogram *hp;
fastf_t low;
fastf_t high;
{
long a;
long b;
register int i;
RT_CK_HISTOGRAM(hp);
if( low <= hp->hg_min )
a = 0;
else
a = (low - hp->hg_min) / hp->hg_clumpsize;
if( high >= hp->hg_max )
b = hp->hg_nbins-1;
else
b = (high - hp->hg_min) / hp->hg_clumpsize;
if( a < 0 || b >= hp->hg_nbins ) rt_bomb("rt_hist_range() out of range\n");
for( i=a; i <= b; i++ ) {
hp->hg_bins[i]++;
}
hp->hg_nsamples++;
}
/*
* R T _ H I S T _ P R
*/
void
rt_hist_pr( histp, title )
register struct histogram *histp;
CONST char *title;
{
register int i;
long maxcount;
static CONST char marks[] = "################################################################";
#define NMARKS 50
char buf[256];
int percent;
int mark_count;
int val;
int nbins;
RT_CK_HISTOGRAM(histp);
/* Find entry with highest count */
maxcount = 0L;
for( i=0; i<histp->hg_nbins; i++ ) {
if( histp->hg_bins[i] > maxcount )
maxcount = histp->hg_bins[i];
}
if( maxcount <= 0 ) maxcount = 1;
/* Supress trailing bins with zero counts. nbins s/b >= 1 */
for( nbins = histp->hg_nbins-1; nbins >= 1; nbins-- )
if(histp->hg_bins[nbins] > 0) break;
/* 12345678 12345678 123 .... */
rt_log("\nHistogram of %s\nmin=%g, max=%g, nbins=%d, clumpsize=%g\n%d samples collected, highest count was %d\n\n Value Count Rel%%| Bar Graph\n",
title,
histp->hg_min, histp->hg_max,
histp->hg_nbins, histp->hg_clumpsize,
histp->hg_nsamples, maxcount );
/* Print each bin. Final bins with zero counts are supressed. */
for( i=0; i <= nbins; i++ ) {
percent = (int)(((double)histp->hg_bins[i])*100.0/maxcount);
mark_count = percent*NMARKS/100;
if( mark_count <= 0 ) {
buf[0] = '\0';
} else {
bcopy( marks, buf, mark_count );
buf[mark_count] = '\0';
}
val = histp->hg_min + i*histp->hg_clumpsize;
rt_log("%8d %8d %3d |%s\n",
val,
histp->hg_bins[i], percent, buf );
}
}
-2379
View File
File diff suppressed because it is too large Load Diff
-551
View File
@@ -1,551 +0,0 @@
/*
* P O L Y L I B . C
*
* Library for dealing with polynomials.
*
* Functions -
* rt_poly_mul Multiply two polynomials
* rt_poly_scale Scale a polynomial
* rt_poly_add Add two polynomials
* rt_poly_sub Subtract two polynomials
* rt_poly_synthetic_division Divide 1 poly into another using Synthetic Division
* quadratic Solve quadratic formula
* cubic Solve cubic forumla
* rt_pr_poly Print a polynomial
*
* Author -
* Jeff Hanes
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005
*
* Copyright Notice -
* This software is Copyright (C) 1985 by the United States Army.
* All rights reserved.
*/
#ifndef lint
static char RCSpolylib[] = "@(#)$Header$ (BRL)";
#endif
#include "conf.h"
#include <stdio.h>
#include <math.h>
#include <signal.h>
#include "machine.h"
#include "externs.h"
#include "vmath.h"
#include "raytrace.h"
#include "rtstring.h"
#include "./polyno.h"
#include "./complex.h"
extern void rt_pr_poly();
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define PI_DIV_3 (M_PI/3.0)
static poly Zpoly = { 0, 0.0 };
/*
* rt_poly_mul -- multiply two polynomials
*/
poly *
rt_poly_mul(m1,m2,product)
register poly *m1, *m2, *product;
{
if( m1->dgr == 1 && m2->dgr == 1 ) {
product->dgr = 2;
product->cf[0] = m1->cf[0] * m2->cf[0];
product->cf[1] = m1->cf[0] * m2->cf[1] +
m1->cf[1] * m2->cf[0];
product->cf[2] = m1->cf[1] * m2->cf[1];
return(product);
}
if( m1->dgr == 2 && m2->dgr == 2 ) {
product->dgr = 4;
product->cf[0] = m1->cf[0] * m2->cf[0];
product->cf[1] = m1->cf[0] * m2->cf[1] +
m1->cf[1] * m2->cf[0];
product->cf[2] = m1->cf[0] * m2->cf[2] +
m1->cf[1] * m2->cf[1] +
m1->cf[2] * m2->cf[0];
product->cf[3] = m1->cf[1] * m2->cf[2] +
m1->cf[2] * m2->cf[1];
product->cf[4] = m1->cf[2] * m2->cf[2];
return(product);
}
/* Not one of the common (or easy) cases. */
{
register int ct1, ct2;
*product = Zpoly;
/* If the degree of the product will be larger than the
* maximum size allowed in "polyno.h", then return a null
* pointer to indicate failure.
*/
if ( (product->dgr = m1->dgr + m2->dgr) > MAXP )
return PM_NULL;
for ( ct1=0; ct1 <= m1->dgr; ++ct1 ){
for ( ct2=0; ct2 <= m2->dgr; ++ct2 ){
product->cf[ct1+ct2] +=
m1->cf[ct1] * m2->cf[ct2];
}
}
}
return product;
}
/*
* rt_poly_scale -- scale a polynomial
*/
poly *
rt_poly_scale(eqn,factor)
register poly *eqn;
double factor;
{
register int cnt;
for ( cnt=0; cnt <= eqn->dgr; ++cnt ){
eqn->cf[cnt] *= factor;
}
return eqn;
}
/*
* rt_poly_add -- add two polynomials
*/
poly *
rt_poly_add(poly1,poly2,sum)
register poly *poly1, *poly2, *sum;
{
LOCAL poly tmp;
register int i, offset;
offset = Abs(poly1->dgr - poly2->dgr);
tmp = Zpoly;
if ( poly1->dgr >= poly2->dgr ){
*sum = *poly1;
for ( i=0; i <= poly2->dgr; ++i ){
tmp.cf[i+offset] = poly2->cf[i];
}
} else {
*sum = *poly2;
for ( i=0; i <= poly1->dgr; ++i ){
tmp.cf[i+offset] = poly1->cf[i];
}
}
for ( i=0; i <= sum->dgr; ++i ){
sum->cf[i] += tmp.cf[i];
}
return sum;
}
/*
* rt_poly_sub -- subtract two polynomials
*/
poly *
rt_poly_sub(poly1,poly2,diff)
register poly *poly1, *poly2, *diff;
{
LOCAL poly tmp;
register int i, offset;
offset = Abs(poly1->dgr - poly2->dgr);
*diff = Zpoly;
tmp = Zpoly;
if ( poly1->dgr >= poly2->dgr ){
*diff = *poly1;
for ( i=0; i <= poly2->dgr; ++i ){
tmp.cf[i+offset] = poly2->cf[i];
}
} else {
diff->dgr = poly2->dgr;
for ( i=0; i <= poly1->dgr; ++i ){
diff->cf[i+offset] = poly1->cf[i];
}
tmp = *poly2;
}
for ( i=0; i <= diff->dgr; ++i ){
diff->cf[i] -= tmp.cf[i];
}
return diff;
}
/* >>> s y n D i v ( ) <<<
* Divides any polynomial into any other polynomial using synthetic
* division. Both polynomials must have real coefficients.
*/
void
rt_poly_synthetic_division(dvdend,dvsor,quo,rem)
register poly *dvdend, *dvsor, *quo, *rem;
{
register int div;
register int n;
*quo = *dvdend;
*rem = Zpoly;
if ((quo->dgr = dvdend->dgr - dvsor->dgr) < 0)
quo->dgr = -1;
if ((rem->dgr = dvsor->dgr - 1) > dvdend->dgr)
rem->dgr = dvdend->dgr;
for ( n=0; n <= quo->dgr; ++n){
quo->cf[n] /= dvsor->cf[0];
for ( div=1; div <= dvsor->dgr; ++div){
quo->cf[n+div] -= quo->cf[n] * dvsor->cf[div];
}
}
for ( n=1; n<=(rem->dgr+1); ++n){
rem->cf[n-1] = quo->cf[quo->dgr+n];
quo->cf[quo->dgr+n] = 0;
}
}
/* >>> q u a d r a t i c ( ) <<<
*
* Uses the quadratic formula to find the roots (in `complex' form)
* of any quadratic equation with real coefficients.
*/
void
rt_poly_quadratic_roots( quadrat, root )
register poly *quadrat;
register complex root[];
{
LOCAL fastf_t discrim, denom, rad;
if( NEAR_ZERO( quadrat->cf[0], SMALL ) ) {
/* root = -cf[2] / cf[1] */
if( NEAR_ZERO( quadrat->cf[1], SMALL ) ) {
/* No solution. Now what? */
rt_log("rt_poly_quadratic_roots(): ERROR, no solution\n");
return;
}
/* Fake it as a repeated root. */
root[0].re = root[1].re = -quadrat->cf[2]/quadrat->cf[1];
root[0].im = root[1].im = 0.0;
return;
}
/* What to do if cf[1] > SQRT_MAX_FASTF ? */
discrim = quadrat->cf[1]*quadrat->cf[1] - 4.0* quadrat->cf[0]*quadrat->cf[2];
denom = 0.5 / quadrat->cf[0];
if ( discrim >= 0.0 ){
rad = sqrt( discrim );
root[0].re = ( -quadrat->cf[1] + rad ) * denom;
root[1].re = ( -quadrat->cf[1] - rad ) * denom;
root[1].im = root[0].im = 0.0;
} else {
root[1].re = root[0].re = -quadrat->cf[1] * denom;
root[1].im = -(root[0].im = sqrt( -discrim ) * denom);
}
}
#define SQRT3 1.732050808
#define THIRD 0.333333333333333333333333333
#define INV_TWENTYSEVEN 0.037037037037037037037037037
#define CUBEROOT( a ) (( (a) >= 0.0 ) ? pow( a, THIRD ) : -pow( -(a), THIRD ))
/* >>> c u b i c ( ) <<<
*
* Uses the cubic formula to find the roots ( in `complex' form )
* of any cubic equation with real coefficients.
*
* to solve a polynomial of the form:
*
* X**3 + c1*X**2 + c2*X + c3 = 0,
*
* first reduce it to the form:
*
* Y**3 + a*Y + b = 0,
*
* where
* Y = X + c1/3,
* and
* a = c2 - c1**2/3,
* b = ( 2*c1**3 - 9*c1*c2 + 27*c3 )/27.
*
* Then we define the value delta, D = b**2/4 + a**3/27.
*
* If D > 0, there will be one real root and two conjugate
* complex roots.
* If D = 0, there will be three real roots at least two of
* which are equal.
* If D < 0, there will be three unequal real roots.
*
* Returns 1 for success, 0 for fail.
*/
static int expecting_fpe = 0;
static jmp_buf abort_buf;
HIDDEN void rt_catch_FPE(sig)
int sig;
{
if( !expecting_fpe )
rt_bomb("unexpected SIGFPE!");
if( !rt_g.rtg_parallel )
(void)signal(SIGFPE, rt_catch_FPE); /* Renew handler */
longjmp(abort_buf, 1); /* return error code */
}
int
rt_poly_cubic_roots( eqn, root )
register poly *eqn;
register complex root[];
{
LOCAL fastf_t a, b, c1, c1_3rd, delta;
register int i;
static int first_time = 1;
if( !rt_g.rtg_parallel ) {
/* abort_buf is NOT parallel! */
if( first_time ) {
first_time = 0;
(void)signal(SIGFPE, rt_catch_FPE);
}
expecting_fpe = 1;
if( setjmp( abort_buf ) ) {
(void)signal(SIGFPE, rt_catch_FPE);
rt_log("rt: rt_poly_cubic_roots() Floating Point Error\n");
return(0); /* FAIL */
}
}
c1 = eqn->cf[1];
if( Abs(c1) > SQRT_MAX_FASTF ) return(0); /* FAIL */
c1_3rd = c1 * THIRD;
a = eqn->cf[2] - c1*c1_3rd;
if( Abs(a) > SQRT_MAX_FASTF ) return(0); /* FAIL */
b = (2.0*c1*c1*c1 - 9.0*c1*eqn->cf[2] + 27.0*eqn->cf[3])*INV_TWENTYSEVEN;
if( Abs(b) > SQRT_MAX_FASTF ) return(0); /* FAIL */
if( (delta = a*a) > SQRT_MAX_FASTF ) return(0); /* FAIL */
delta = b*b*0.25 + delta*a*INV_TWENTYSEVEN;
if ( delta > 0.0 ){
LOCAL fastf_t r_delta, A, B;
r_delta = sqrt( delta );
A = B = -0.5 * b;
A += r_delta;
B -= r_delta;
A = CUBEROOT( A );
B = CUBEROOT( B );
root[2].re = root[1].re = -0.5 * ( root[0].re = A + B );
root[0].im = 0.0;
root[2].im = -( root[1].im = (A - B)*SQRT3*0.5 );
} else if ( delta == 0.0 ){
LOCAL fastf_t b_2;
b_2 = -0.5 * b;
root[0].re = 2.0* CUBEROOT( b_2 );
root[2].re = root[1].re = -0.5 * root[0].re;
root[2].im = root[1].im = root[0].im = 0.0;
} else {
LOCAL fastf_t phi, fact;
LOCAL fastf_t cs_phi, sn_phi_s3;
if( a >= 0.0 ) {
fact = 0.0;
phi = 0.0;
cs_phi = 1.0; /* cos( phi ); */
sn_phi_s3 = 0.0; /* sin( phi ) * SQRT3; */
} else {
FAST fastf_t f;
a *= -THIRD;
fact = sqrt( a );
if( (f = b * (-0.5) / (a*fact)) >= 1.0 ) {
phi = 0.0;
cs_phi = 1.0; /* cos( phi ); */
sn_phi_s3 = 0.0; /* sin( phi ) * SQRT3; */
} else if( f <= -1.0 ) {
phi = PI_DIV_3;
cs_phi = cos( phi );
sn_phi_s3 = sin( phi ) * SQRT3;
} else {
phi = acos( f ) * THIRD;
cs_phi = cos( phi );
sn_phi_s3 = sin( phi ) * SQRT3;
}
}
root[0].re = 2.0*fact*cs_phi;
root[1].re = fact*( sn_phi_s3 - cs_phi);
root[2].re = fact*( -sn_phi_s3 - cs_phi);
root[2].im = root[1].im = root[0].im = 0.0;
}
for ( i=0; i < 3; ++i )
root[i].re -= c1_3rd;
expecting_fpe = 0;
return(1); /* OK */
}
/* >>> q u a r t i c ( ) <<<
*
* Uses the quartic formula to find the roots ( in `complex' form )
* of any quartic equation with real coefficients.
*
* Returns 1 for success, 0 for fail.
*/
int
rt_poly_quartic_roots( eqn, root )
register poly *eqn;
register complex root[];
{
LOCAL poly cube, quad1, quad2;
LOCAL complex u[3];
LOCAL fastf_t U, p, q, q1, q2;
#define Max3(a,b,c) ((c)>((a)>(b)?(a):(b)) ? (c) : ((a)>(b)?(a):(b)))
cube.dgr = 3;
cube.cf[0] = 1.0;
cube.cf[1] = -eqn->cf[2];
cube.cf[2] = eqn->cf[3]*eqn->cf[1]
- 4*eqn->cf[4];
cube.cf[3] = -eqn->cf[3]*eqn->cf[3]
- eqn->cf[4]*eqn->cf[1]*eqn->cf[1]
+ 4*eqn->cf[4]*eqn->cf[2];
if( !rt_poly_cubic_roots( &cube, u ) ) {
return( 0 ); /* FAIL */
}
if ( u[1].im != 0.0 ){
U = u[0].re;
} else {
U = Max3( u[0].re, u[1].re, u[2].re );
}
p = eqn->cf[1]*eqn->cf[1]*0.25 + U - eqn->cf[2];
U *= 0.5;
q = U*U - eqn->cf[4];
if( p < 0 ) {
if( p < -1.0e-8 ) {
return(0); /* FAIL */
}
p = 0;
} else {
p = sqrt( p );
}
if( q < 0 ) {
if( q < -1.0e-8 ) {
return(0); /* FAIL */
}
q = 0;
} else {
q = sqrt( q );
}
quad1.dgr = quad2.dgr = 2;
quad1.cf[0] = quad2.cf[0] = 1.0;
quad1.cf[1] = eqn->cf[1]*0.5;
quad2.cf[1] = quad1.cf[1] + p;
quad1.cf[1] -= p;
q1 = U - q;
q2 = U + q;
p = quad1.cf[1]*q2 + quad2.cf[1]*q1 - eqn->cf[3];
if( Abs( p ) < 1.0e-8){
quad1.cf[2] = q1;
quad2.cf[2] = q2;
} else {
q = quad1.cf[1]*q1 + quad2.cf[1]*q2 - eqn->cf[3];
if( Abs( q ) < 1.0e-8 ){
quad1.cf[2] = q2;
quad2.cf[2] = q1;
} else {
return(0); /* FAIL */
}
}
rt_poly_quadratic_roots( &quad1, root );
rt_poly_quadratic_roots( &quad2, &root[2] );
return(1); /* SUCCESS */
}
/*
* R T _ P R _ P O L Y
*/
void
rt_pr_poly(title, eqn)
char *title;
register poly *eqn;
{
register int n;
register int exp;
struct rt_vls str;
char buf[48];
rt_vls_init( &str );
rt_vls_extend( &str, 196 );
rt_vls_strcat( &str, title );
sprintf(buf, " polynomial, degree = %d\n", eqn->dgr);
rt_vls_strcat( &str, buf );
exp = eqn->dgr;
for ( n=0; n<=eqn->dgr; n++,exp-- ) {
register double coeff = eqn->cf[n];
if( n > 0 ) {
if( coeff < 0 ) {
rt_vls_strcat( &str, " - " );
coeff = -coeff;
} else {
rt_vls_strcat( &str, " + " );
}
}
sprintf( buf, "%g", coeff );
rt_vls_strcat( &str, buf );
if( exp > 1 ) {
sprintf( buf, " *X^%d", exp );
rt_vls_strcat( &str, buf );
} else if( exp == 1 ) {
rt_vls_strcat( &str, " *X" );
} else {
/* For constant term, add nothing */
}
}
rt_vls_strcat( &str, "\n" );
rt_log( "%s", rt_vls_addr(&str) );
rt_vls_free( &str );
}
/*
* R T _ P R _ R O O T S
*/
void
rt_pr_roots( title, roots, n )
char *title;
complex roots[];
int n;
{
register int i;
rt_log("%s: %d roots:\n", title, n );
for( i=0; i<n; i++ ) {
rt_log("%4d %e + i * %e\n", i, roots[i].re, roots[i].im );
}
}
-43
View File
@@ -1,43 +0,0 @@
/*
* P O L Y N O . H
*
* Definitions for handling polynomial equations
*
* Author -
* Jeff Hanes
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005
*
* Copyright Notice -
* This software is Copyright (C) 1985 by the United States Army.
* All rights reserved.
*
* $Header$
*/
#ifndef POLYNO_H
#define POLYNO_H seen
#define MAXP 4 /* Maximum Poly Order */
#define Abs( a ) ((a) >= 0 ? (a) : -(a))
#define Max( a, b ) ((a) > (b) ? (a) : (b))
/* error return value for 'polyMul' */
#define PM_NULL ((poly *)0)
/* polynomial data type */
typedef struct {
int dgr;
double cf[MAXP+1];
} poly;
/* library functions in polylib.c */
extern poly *polyAdd(), *polySub(), *polyMul(), *polyScal();
extern void quadratic(), synDiv(), prntpoly(), pr_poly();
extern int quartic(), cubic();
#endif /* POLYNO_H */
-1797
View File
File diff suppressed because it is too large Load Diff
-11
View File
@@ -1,11 +0,0 @@
#ifdef WIN32
#include "common.h"
#include <stdio.h>
#include "machine.h"
#include "bu.h"
#endif
const char version[] = "\
@(#) BRL-CAD Release 7.4.0 The BRL-CAD to IGES converter\n\
Fri Sep 9 12:00:00 EST 2005, Compilation 1\n\
bob@mako:/home/bob/src/brlcad/src/iges\n";
-11
View File
@@ -1,11 +0,0 @@
#ifdef WIN32
#include "common.h"
#include <stdio.h>
#include "machine.h"
#include "bu.h"
#endif
const char version[] = "\
@(#) BRL-CAD Release 7.4.0 The IGES to BRL-CAD converter\n\
Fri Sep 9 12:00:00 EST 2005, Compilation 1\n\
bob@mako:/home/bob/src/brlcad/src/iges\n";
-51
View File
@@ -1,51 +0,0 @@
/* P K G S W I T C H . C
* BRL-CAD
*
* Copyright (C) 2004-2005 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** \addtogroup libfb */
/*@{*/
/** @file pkgswitch.c
* Package Handlers.
*/
/*@}*/
#include "./pkg.h"
#include "./pkgtypes.h"
/*
* Package Handlers.
*/
extern int pkgfoo(); /* foobar message handler */
struct pkg_switch pkg_switch[] = {
{ MSG_ERROR, pkgfoo, "Error Message" },
{ MSG_CLOSE, pkgfoo, "Close Connection" }
};
int pkg_swlen = 2;
/*
* Local Variables:
* mode: C
* tab-width: 8
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* ex: shiftwidth=4 tabstop=8
*/
-82
View File
@@ -1,82 +0,0 @@
/* P K G T Y P E S . H
* BRL-CAD
*
* Copyright (C) 2004-2005 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** \addtogroup libfb */
/*@{*/
/** @file pkgtypes.h
* Types of packages used for the remote frame buffer
* communication between libfb/if_remote.c and rfbd/rfbd.c.
* This file is shared by those two modules.
*
* Authors -
* Phil Dykstra
* Michael John Muuss
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005
*
* $Header$
*/
/*@}*/
#define MSG_FBOPEN 1
#define MSG_FBCLOSE 2
#define MSG_FBCLEAR 3
#define MSG_FBREAD 4
#define MSG_FBWRITE 5
#define MSG_FBCURSOR 6 /* fb_cursor() */
#define MSG_FBWINDOW 7 /* OLD */
#define MSG_FBZOOM 8 /* OLD */
#define MSG_FBSCURSOR 9 /* OLD */
#define MSG_FBVIEW 10 /* NEW */
#define MSG_FBGETVIEW 11 /* NEW */
#define MSG_FBRMAP 12
#define MSG_FBWMAP 13
#define MSG_FBHELP 14
#define MSG_FBREADRECT 15
#define MSG_FBWRITERECT 16
#define MSG_FBFLUSH 17
#define MSG_FBFREE 18
#define MSG_FBGETCURSOR 19 /* NEW */
#define MSG_FBPOLL 30 /* NEW */
#define MSG_FBSETCURSOR 31 /* NEW in Release 4.4 */
#define MSG_FBBWREADRECT 32 /* NEW in Release 4.6 */
#define MSG_FBBWWRITERECT 33 /* NEW in Release 4.6 */
#define MSG_DATA 20
#define MSG_RETURN 21
#define MSG_CLOSE 22
#define MSG_ERROR 23
#define MSG_NORETURN 100
/*
* Local Variables:
* mode: C
* tab-width: 8
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* ex: shiftwidth=4 tabstop=8
*/
-800
View File
@@ -1,800 +0,0 @@
/* S E R V E R . C
* BRL-CAD
*
* Copyright (C) 1998-2005 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** \addtogroup libfb */
/*@{*/
/** @file server.c
* Remote libfb server event handlers (originally rfbd).
*
* Authors -
* Phillip Dykstra
* Michael John Muuss
*
* Source -
* The U. S. Army Research Laboratory
* Aberdeen Proving Ground, Maryland 21005-5068 USA
*/
/*@}*/
#ifndef lint
static const char RCSid[] = "@(#)$Header$ (ARL)";
#endif
#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#if defined (HAVE_SYS_SELECT_H)
# include <sys/select.h>
#else
# if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h>
# endif
# if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
# endif
# if defined(HAVE_UNISTD_H)
# include <unistd.h>
# else
# if defined(HAVE_SYS_UNISTD_H)
# include <sys/unistd.h>
# endif
# endif
#endif
#include "machine.h"
#include "fb.h"
#include "pkg.h"
#include "./pkgtypes.h"
#define NET_LONG_LEN 4 /* # bytes to network long */
/*
* Package Handlers defined in this file.
*/
void fb_server_got_unknown(struct pkg_conn *pcp, char *buf); /* foobar message handler */
void fb_server_fb_open(struct pkg_conn *pcp, char *buf), fb_server_fb_close(struct pkg_conn *pcp, char *buf), fb_server_fb_clear(struct pkg_conn *pcp, char *buf), fb_server_fb_read(struct pkg_conn *pcp, char *buf), fb_server_fb_write(struct pkg_conn *pcp,
char *buf);
void fb_server_fb_cursor(struct pkg_conn *pcp, char *buf), fb_server_fb_getcursor(struct pkg_conn *pcp, char *buf);
void fb_server_fb_rmap(struct pkg_conn *pcp, char *buf), fb_server_fb_wmap(struct pkg_conn *pcp, char *buf);
void fb_server_fb_help(struct pkg_conn *pcp, char *buf);
void fb_server_fb_readrect(struct pkg_conn *pcp, char *buf), fb_server_fb_writerect(struct pkg_conn *pcp, char *buf);
void fb_server_fb_bwreadrect(struct pkg_conn *pcp, char *buf), fb_server_fb_bwwriterect(struct pkg_conn *pcp, char *buf);
void fb_server_fb_poll(struct pkg_conn *pcp, char *buf), fb_server_fb_flush(struct pkg_conn *pcp, char *buf), fb_server_fb_free(struct pkg_conn *pcp, char *buf);
void fb_server_fb_view(struct pkg_conn *pcp, char *buf), fb_server_fb_getview(struct pkg_conn *pcp, char *buf);
void fb_server_fb_setcursor(struct pkg_conn *pcp, char *buf);
/* Old Routines */
void fb_server_fb_scursor(struct pkg_conn *pcp, char *buf), fb_server_fb_window(struct pkg_conn *pcp, char *buf), fb_server_fb_zoom(struct pkg_conn *pcp, char *buf);
/*
* These are the only symbols intended for export to LIBFB users.
*/
FBIO *fb_server_fbp = FBIO_NULL;
fd_set *fb_server_select_list;
int *fb_server_max_fd = (int *)NULL;
int fb_server_got_fb_free = 0; /* !0 => we have received an fb_free */
int fb_server_refuse_fb_free = 0; /* !0 => don't accept fb_free() */
int fb_server_retain_on_close = 0; /* !0 => we are holding a reusable FB open */
const struct pkg_switch fb_server_pkg_switch[] = {
{ MSG_FBOPEN, fb_server_fb_open, "Open Framebuffer" },
{ MSG_FBCLOSE, fb_server_fb_close, "Close Framebuffer" },
{ MSG_FBCLEAR, fb_server_fb_clear, "Clear Framebuffer" },
{ MSG_FBREAD, fb_server_fb_read, "Read Pixels" },
{ MSG_FBWRITE, fb_server_fb_write, "Write Pixels" },
{ MSG_FBWRITE + MSG_NORETURN, fb_server_fb_write, "Asynch write" },
{ MSG_FBCURSOR, fb_server_fb_cursor, "Cursor" },
{ MSG_FBGETCURSOR, fb_server_fb_getcursor, "Get Cursor" }, /*NEW*/
{ MSG_FBSCURSOR, fb_server_fb_scursor, "Screen Cursor" }, /*OLD*/
{ MSG_FBWINDOW, fb_server_fb_window, "Window" }, /*OLD*/
{ MSG_FBZOOM, fb_server_fb_zoom, "Zoom" }, /*OLD*/
{ MSG_FBVIEW, fb_server_fb_view, "View" }, /*NEW*/
{ MSG_FBGETVIEW, fb_server_fb_getview, "Get View" }, /*NEW*/
{ MSG_FBRMAP, fb_server_fb_rmap, "R Map" },
{ MSG_FBWMAP, fb_server_fb_wmap, "W Map" },
{ MSG_FBHELP, fb_server_fb_help, "Help Request" },
{ MSG_ERROR, fb_server_got_unknown, "Error Message" },
{ MSG_CLOSE, fb_server_got_unknown, "Close Connection" },
{ MSG_FBREADRECT, fb_server_fb_readrect, "Read Rectangle" },
{ MSG_FBWRITERECT, fb_server_fb_writerect, "Write Rectangle" },
{ MSG_FBWRITERECT+MSG_NORETURN, fb_server_fb_writerect,"Write Rectangle" },
{ MSG_FBBWREADRECT, fb_server_fb_bwreadrect,"Read BW Rectangle" },
{ MSG_FBBWWRITERECT, fb_server_fb_bwwriterect,"Write BW Rectangle" },
{ MSG_FBBWWRITERECT+MSG_NORETURN, fb_server_fb_bwwriterect,"Write BW Rectangle" },
{ MSG_FBFLUSH, fb_server_fb_flush, "Flush Output" },
{ MSG_FBFLUSH + MSG_NORETURN, fb_server_fb_flush, "Flush Output" },
{ MSG_FBFREE, fb_server_fb_free, "Free Resources" },
{ MSG_FBPOLL, fb_server_fb_poll, "Handle Events" },
{ MSG_FBSETCURSOR, fb_server_fb_setcursor, "Set Cursor Shape" },
{ MSG_FBSETCURSOR + MSG_NORETURN, fb_server_fb_setcursor, "Set Cursor Shape" },
{ 0, NULL, NULL }
};
/******** Here's where the hooks lead *********/
/*
* F B _ S E R V E R _ G O T _ U N K N O W N
*
* This is where we go for message types we don't understand.
*
* The fb_log() might go to the ordinary LIBFB routine, or
* the application might have provided a replacement routine
* which might send the message back across the wire.
*/
void
fb_server_got_unknown(struct pkg_conn *pcp, char *buf)
{
fb_log( "fb_server_got_unknown: message type %d not part of remote LIBFB protocol, ignored.\n",
pcp->pkc_type );
(void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ O P E N
*
* There can only be one framebuffer (fbp) open at any one time
* (although that can be a stacker driving many actual windows),
* but framebuffers can be opened and closed and opened again in the
* lifetime of one server process if fb_server_retain_on_close is set.
*/
void
fb_server_fb_open(struct pkg_conn *pcp, char *buf)
{
int height, width;
char rbuf[5*NET_LONG_LEN+1];
int want;
width = pkg_glong( &buf[0*NET_LONG_LEN] );
height = pkg_glong( &buf[1*NET_LONG_LEN] );
if( fb_server_fbp == FBIO_NULL ) {
/* Attempt to open new framebuffer */
if( strlen(&buf[8]) == 0 )
fb_server_fbp = fb_open( NULL, width, height );
else
fb_server_fbp = fb_open( &buf[8], width, height );
} else {
/* Use existing framebuffer */
}
if( fb_server_fbp == FBIO_NULL ) {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], -1 ); /* ret */
(void)pkg_plong( &rbuf[1*NET_LONG_LEN], 0 );
(void)pkg_plong( &rbuf[2*NET_LONG_LEN], 0 );
(void)pkg_plong( &rbuf[3*NET_LONG_LEN], 0 );
(void)pkg_plong( &rbuf[4*NET_LONG_LEN], 0 );
} else {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], 0 ); /* ret */
(void)pkg_plong( &rbuf[1*NET_LONG_LEN], fb_server_fbp->if_max_width );
(void)pkg_plong( &rbuf[2*NET_LONG_LEN], fb_server_fbp->if_max_height );
(void)pkg_plong( &rbuf[3*NET_LONG_LEN], fb_server_fbp->if_width );
(void)pkg_plong( &rbuf[4*NET_LONG_LEN], fb_server_fbp->if_height );
if(fb_server_fbp->if_selfd > 0 && fb_server_select_list ) {
FD_SET(fb_server_fbp->if_selfd, fb_server_select_list);
if( fb_server_max_fd != NULL &&
fb_server_fbp->if_selfd > *fb_server_max_fd )
*fb_server_max_fd = fb_server_fbp->if_selfd;
}
}
want = 5*NET_LONG_LEN;
if( pkg_send( MSG_RETURN, rbuf, want, pcp ) != want )
fprintf(stderr, "pkg_send fb_open reply\n");
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ C L O S E
*
*/
void
fb_server_fb_close(struct pkg_conn *pcp, char *buf)
{
char rbuf[NET_LONG_LEN+1];
if( fb_server_retain_on_close ) {
/*
* We are playing FB server so we don't really close the
* frame buffer. We should flush output however.
*/
(void)fb_flush( fb_server_fbp );
(void)pkg_plong( &rbuf[0], 0 ); /* return success */
} else {
if(fb_server_fbp->if_selfd > 0 && fb_server_select_list) {
FD_CLR(fb_server_fbp->if_selfd, fb_server_select_list);
}
(void)pkg_plong( &rbuf[0], fb_close( fb_server_fbp ) );
fb_server_fbp = FBIO_NULL;
}
/* Don't check for errors, SGI linger mode or other events
* may have already closed down all the file descriptors.
* If communication has broken, other end will know we are gone.
*/
(void)pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ F R E E
*
* The fb_free() call is more potent than fb_close(), which it
* must preceed; it causes shared memory to be returned & stuff like that.
* The current FBSERV program exits after getting one.
*
* We set fb_server_got_fb_free as an indicator to calling application.
* It doesn't prevent another framebuffer from being opened,
* although application might want to reset the flag after noticing,
* if it isn't going to exit at that point.
*/
void
fb_server_fb_free(struct pkg_conn *pcp, char *buf)
{
char rbuf[NET_LONG_LEN+1];
if( fb_server_refuse_fb_free ) {
(void)pkg_plong( &rbuf[0], -1 );
} else {
(void)pkg_plong( &rbuf[0], fb_free( fb_server_fbp ) );
fb_server_fbp = FBIO_NULL;
}
if( pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp ) != NET_LONG_LEN )
fprintf(stderr, "pkg_send fb_free reply\n");
if( buf ) (void)free(buf);
fb_server_got_fb_free = 1;
}
/*
* F B _ S E R V E R _ F B _ C L E A R
*
*/
void
fb_server_fb_clear(struct pkg_conn *pcp, char *buf)
{
RGBpixel bg;
char rbuf[NET_LONG_LEN+1];
bg[RED] = buf[0];
bg[GRN] = buf[1];
bg[BLU] = buf[2];
(void)pkg_plong( rbuf, fb_clear( fb_server_fbp, bg ) );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ R E A D
*
*/
void
fb_server_fb_read(struct pkg_conn *pcp, char *buf)
{
int x, y, num;
int ret;
static unsigned char *scanbuf = NULL;
static int buflen = 0;
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
num = pkg_glong( &buf[2*NET_LONG_LEN] );
if( num*sizeof(RGBpixel) > buflen ) {
if( scanbuf != NULL )
free( (char *)scanbuf );
buflen = num*sizeof(RGBpixel);
if( buflen < 1024*sizeof(RGBpixel) )
buflen = 1024*sizeof(RGBpixel);
if( (scanbuf = (unsigned char *)malloc( buflen )) == NULL ) {
fb_log("fb_read: malloc failed!");
if( buf ) (void)free(buf);
buflen = 0;
return;
}
}
ret = fb_read( fb_server_fbp, x, y, scanbuf, num );
if( ret < 0 ) ret = 0; /* map error indications */
/* sending a 0-length package indicates error */
pkg_send( MSG_RETURN, scanbuf, ret*sizeof(RGBpixel), pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ W R I T E
*
* Client can ask for PKG-level acknowledgements (with error code) or not,
* based upon whether type is MSG_FBWRITE or MSG_FBWRITE+MSG_NORETURN.
*/
void
fb_server_fb_write(struct pkg_conn *pcp, char *buf)
{
int x, y, num;
char rbuf[NET_LONG_LEN+1];
int ret;
int type;
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
num = pkg_glong( &buf[2*NET_LONG_LEN] );
type = pcp->pkc_type;
ret = fb_write( fb_server_fbp, x, y, (unsigned char *)&buf[3*NET_LONG_LEN], num );
if( type < MSG_NORETURN ) {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
}
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ R E A D R E C T
*/
void
fb_server_fb_readrect(struct pkg_conn *pcp, char *buf)
{
int xmin, ymin;
int width, height;
int num;
int ret;
static unsigned char *scanbuf = NULL;
static int buflen = 0;
xmin = pkg_glong( &buf[0*NET_LONG_LEN] );
ymin = pkg_glong( &buf[1*NET_LONG_LEN] );
width = pkg_glong( &buf[2*NET_LONG_LEN] );
height = pkg_glong( &buf[3*NET_LONG_LEN] );
num = width * height;
if( num*sizeof(RGBpixel) > buflen ) {
if( scanbuf != NULL )
free( (char *)scanbuf );
buflen = num*sizeof(RGBpixel);
if( buflen < 1024*sizeof(RGBpixel) )
buflen = 1024*sizeof(RGBpixel);
if( (scanbuf = (unsigned char *)malloc( buflen )) == NULL ) {
fb_log("fb_read: malloc failed!");
if( buf ) (void)free(buf);
buflen = 0;
return;
}
}
ret = fb_readrect( fb_server_fbp, xmin, ymin, width, height, scanbuf );
if( ret < 0 ) ret = 0; /* map error indications */
/* sending a 0-length package indicates error */
pkg_send( MSG_RETURN, scanbuf, ret*sizeof(RGBpixel), pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ W R I T E R E C T
*
* A whole rectangle of pixels at once, probably large.
*/
void
fb_server_fb_writerect(struct pkg_conn *pcp, char *buf)
{
int x, y;
int width, height;
char rbuf[NET_LONG_LEN+1];
int ret;
int type;
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
width = pkg_glong( &buf[2*NET_LONG_LEN] );
height = pkg_glong( &buf[3*NET_LONG_LEN] );
type = pcp->pkc_type;
ret = fb_writerect( fb_server_fbp, x, y, width, height,
(unsigned char *)&buf[4*NET_LONG_LEN] );
if( type < MSG_NORETURN ) {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
}
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ B W R E A D R E C T
*/
void
fb_server_fb_bwreadrect(struct pkg_conn *pcp, char *buf)
{
int xmin, ymin;
int width, height;
int num;
int ret;
static unsigned char *scanbuf = NULL;
static int buflen = 0;
xmin = pkg_glong( &buf[0*NET_LONG_LEN] );
ymin = pkg_glong( &buf[1*NET_LONG_LEN] );
width = pkg_glong( &buf[2*NET_LONG_LEN] );
height = pkg_glong( &buf[3*NET_LONG_LEN] );
num = width * height;
if( num > buflen ) {
if( scanbuf != NULL )
free( (char *)scanbuf );
buflen = num;
if( buflen < 1024 )
buflen = 1024;
if( (scanbuf = (unsigned char *)malloc( buflen )) == NULL ) {
fb_log("fb_bwreadrect: malloc failed!");
if( buf ) (void)free(buf);
buflen = 0;
return;
}
}
ret = fb_bwreadrect( fb_server_fbp, xmin, ymin, width, height, scanbuf );
if( ret < 0 ) ret = 0; /* map error indications */
/* sending a 0-length package indicates error */
pkg_send( MSG_RETURN, scanbuf, ret, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ B W W R I T E R E C T
*
* A whole rectangle of monochrome pixels at once, probably large.
*/
void
fb_server_fb_bwwriterect(struct pkg_conn *pcp, char *buf)
{
int x, y;
int width, height;
char rbuf[NET_LONG_LEN+1];
int ret;
int type;
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
width = pkg_glong( &buf[2*NET_LONG_LEN] );
height = pkg_glong( &buf[3*NET_LONG_LEN] );
type = pcp->pkc_type;
ret = fb_bwwriterect( fb_server_fbp, x, y, width, height,
(unsigned char *)&buf[4*NET_LONG_LEN] );
if( type < MSG_NORETURN ) {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
} else {
/* No formal return code. Note errors locally */
if(ret < 0) fb_log("fb_server_fb_bwwriterect(%d,%d, %d,%d) error %d\n",
x, y, width, height, ret);
}
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ C U R S O R
*
*/
void
fb_server_fb_cursor(struct pkg_conn *pcp, char *buf)
{
int mode, x, y;
char rbuf[NET_LONG_LEN+1];
mode = pkg_glong( &buf[0*NET_LONG_LEN] );
x = pkg_glong( &buf[1*NET_LONG_LEN] );
y = pkg_glong( &buf[2*NET_LONG_LEN] );
(void)pkg_plong( &rbuf[0], fb_cursor( fb_server_fbp, mode, x, y ) );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ G E T _ C U R S O R
*
*/
void
fb_server_fb_getcursor(struct pkg_conn *pcp, char *buf)
{
int ret;
int mode, x, y;
char rbuf[4*NET_LONG_LEN+1];
ret = fb_getcursor( fb_server_fbp, &mode, &x, &y );
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
(void)pkg_plong( &rbuf[1*NET_LONG_LEN], mode );
(void)pkg_plong( &rbuf[2*NET_LONG_LEN], x );
(void)pkg_plong( &rbuf[3*NET_LONG_LEN], y );
pkg_send( MSG_RETURN, rbuf, 4*NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ S E T C U R S O R
*
*/
void
fb_server_fb_setcursor(struct pkg_conn *pcp, char *buf)
{
char rbuf[NET_LONG_LEN+1];
int ret;
int xbits, ybits;
int xorig, yorig;
xbits = pkg_glong( &buf[0*NET_LONG_LEN] );
ybits = pkg_glong( &buf[1*NET_LONG_LEN] );
xorig = pkg_glong( &buf[2*NET_LONG_LEN] );
yorig = pkg_glong( &buf[3*NET_LONG_LEN] );
ret = fb_setcursor( fb_server_fbp, (unsigned char *)&buf[4*NET_LONG_LEN],
xbits, ybits, xorig, yorig );
if( pcp->pkc_type < MSG_NORETURN ) {
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
}
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ S C U R S O R
*
* An OLD iterface. Retained so old clients can still be served.
*/
void
fb_server_fb_scursor(struct pkg_conn *pcp, char *buf)
{
int mode, x, y;
char rbuf[NET_LONG_LEN+1];
mode = pkg_glong( &buf[0*NET_LONG_LEN] );
x = pkg_glong( &buf[1*NET_LONG_LEN] );
y = pkg_glong( &buf[2*NET_LONG_LEN] );
(void)pkg_plong( &rbuf[0], fb_scursor( fb_server_fbp, mode, x, y ) );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ W I N D O W
*
* An OLD iterface. Retained so old clients can still be served.
*/
void
fb_server_fb_window(struct pkg_conn *pcp, char *buf)
{
int x, y;
char rbuf[NET_LONG_LEN+1];
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
(void)pkg_plong( &rbuf[0], fb_window( fb_server_fbp, x, y ) );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ Z O O M
*
* An OLD iterface. Retained so old clients can still be served.
*/
void
fb_server_fb_zoom(struct pkg_conn *pcp, char *buf)
{
int x, y;
char rbuf[NET_LONG_LEN+1];
x = pkg_glong( &buf[0*NET_LONG_LEN] );
y = pkg_glong( &buf[1*NET_LONG_LEN] );
(void)pkg_plong( &rbuf[0], fb_zoom( fb_server_fbp, x, y ) );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ V I E W
*
*/
void
fb_server_fb_view(struct pkg_conn *pcp, char *buf)
{
int ret;
int xcenter, ycenter, xzoom, yzoom;
char rbuf[NET_LONG_LEN+1];
xcenter = pkg_glong( &buf[0*NET_LONG_LEN] );
ycenter = pkg_glong( &buf[1*NET_LONG_LEN] );
xzoom = pkg_glong( &buf[2*NET_LONG_LEN] );
yzoom = pkg_glong( &buf[3*NET_LONG_LEN] );
ret = fb_view( fb_server_fbp, xcenter, ycenter, xzoom, yzoom );
(void)pkg_plong( &rbuf[0], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ G E T V I E W
*
*/
void
fb_server_fb_getview(struct pkg_conn *pcp, char *buf)
{
int ret;
int xcenter, ycenter, xzoom, yzoom;
char rbuf[5*NET_LONG_LEN+1];
ret = fb_getview( fb_server_fbp, &xcenter, &ycenter, &xzoom, &yzoom );
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], ret );
(void)pkg_plong( &rbuf[1*NET_LONG_LEN], xcenter );
(void)pkg_plong( &rbuf[2*NET_LONG_LEN], ycenter );
(void)pkg_plong( &rbuf[3*NET_LONG_LEN], xzoom );
(void)pkg_plong( &rbuf[4*NET_LONG_LEN], yzoom );
pkg_send( MSG_RETURN, rbuf, 5*NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ R M A P
*
*/
void
fb_server_fb_rmap(struct pkg_conn *pcp, char *buf)
{
register int i;
char rbuf[NET_LONG_LEN+1];
ColorMap map;
unsigned char cm[256*2*3];
(void)pkg_plong( &rbuf[0*NET_LONG_LEN], fb_rmap( fb_server_fbp, &map ) );
for( i = 0; i < 256; i++ ) {
(void)pkg_pshort( cm+2*(0+i), map.cm_red[i] );
(void)pkg_pshort( cm+2*(256+i), map.cm_green[i] );
(void)pkg_pshort( cm+2*(512+i), map.cm_blue[i] );
}
pkg_send( MSG_DATA, cm, sizeof(cm), pcp );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ W M A P
*
* Accept a color map sent by the client, and write it to the framebuffer.
* Network format is to send each entry as a network (IBM) order 2-byte
* short, 256 red shorts, followed by 256 green and 256 blue, for a total
* of 3*256*2 bytes.
*/
void
fb_server_fb_wmap(struct pkg_conn *pcp, char *buf)
{
int i;
char rbuf[NET_LONG_LEN+1];
long ret;
ColorMap map;
if( pcp->pkc_len == 0 )
ret = fb_wmap( fb_server_fbp, COLORMAP_NULL );
else {
for( i = 0; i < 256; i++ ) {
map.cm_red[i] = pkg_gshort( buf+2*(0+i) );
map.cm_green[i] = pkg_gshort( buf+2*(256+i) );
map.cm_blue[i] = pkg_gshort( buf+2*(512+i) );
}
ret = fb_wmap( fb_server_fbp, &map );
}
(void)pkg_plong( &rbuf[0], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ F L U S H
*
*/
void
fb_server_fb_flush(struct pkg_conn *pcp, char *buf)
{
int ret;
char rbuf[NET_LONG_LEN+1];
ret = fb_flush( fb_server_fbp );
if( pcp->pkc_type < MSG_NORETURN ) {
(void)pkg_plong( rbuf, ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
}
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ P O L L
*
*/
void
fb_server_fb_poll(struct pkg_conn *pcp, char *buf)
{
(void)fb_poll( fb_server_fbp );
if( buf ) (void)free(buf);
}
/*
* F B _ S E R V E R _ F B _ H E L P
*
* At one time at least we couldn't send a zero length PKG
* message back and forth, so we receive a dummy long here.
*/
void
fb_server_fb_help(struct pkg_conn *pcp, char *buf)
{
long ret;
char rbuf[NET_LONG_LEN+1];
(void)pkg_glong( &buf[0*NET_LONG_LEN] );
ret = fb_help(fb_server_fbp);
(void)pkg_plong( &rbuf[0], ret );
pkg_send( MSG_RETURN, rbuf, NET_LONG_LEN, pcp );
if( buf ) (void)free(buf);
}
/*
* Local Variables:
* mode: C
* tab-width: 8
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* ex: shiftwidth=4 tabstop=8
*/
-213
View File
@@ -1,213 +0,0 @@
/* C L I P . C
* BRL-CAD
*
* Copyright (C) 1985-2005 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* 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 file; see the file named COPYING for more
* information.
*/
/** @file clip.c
*
* Functions -
* clip clip a 2-D integer line seg against the size of the display
* vclip clip a 3-D floating line segment against a bounding RPP.
*
* Authors -
* clip() was written by Doug Kingston, 14 October 81
* Based on the clipping routine in "Principles of Computer
* Graphics" by Newman and Sproull, 1973, McGraw/Hill.
*
* vclip() was adapted from RT by Mike Muuss, 17 January 1985.
*
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005
*/
#ifndef lint
static const char RCSid[] = "@(#)$Header$ (BRL)";
#endif
#include "common.h"
#include <stdio.h>
#include "machine.h"
#include "vmath.h"
#include "bu.h"
#include "tcl.h"
#include "mged_dm.h"
static int code();
int
clip (fastf_t *xp1, fastf_t *yp1, fastf_t *xp2, fastf_t *yp2)
{
char code1, code2;
code1 = code (*xp1, *yp1);
code2 = code (*xp2, *yp2);
while (code1 || code2) {
if (code1 & code2)
return (-1); /* No part is visible */
/* SWAP codes, X's, and Y's */
if (code1 == 0) {
char ctemp;
fastf_t temp;
ctemp = code1;
code1 = code2;
code2 = ctemp;
temp = *xp1;
*xp1 = *xp2;
*xp2 = temp;
temp = *yp1;
*yp1 = *yp2;
*yp2 = temp;
}
if (code1 & 01) { /* Push toward left edge */
*yp1 = *yp1 + (*yp2-*yp1)*(GED_MIN-*xp1)/(*xp2-*xp1);
*xp1 = GED_MIN;
}
else if (code1 & 02) { /* Push toward right edge */
*yp1 = *yp1 + (*yp2-*yp1)*(GED_MAX-*xp1)/(*xp2-*xp1);
*xp1 = GED_MAX;
}
else if (code1 & 04) { /* Push toward bottom edge */
*xp1 = *xp1 + (*xp2-*xp1)*(GED_MIN-*yp1)/(*yp2-*yp1);
*yp1 = GED_MIN;
}
else if (code1 & 010) { /* Push toward top edge */
*xp1 = *xp1 + (*xp2-*xp1)*(GED_MAX-*yp1)/(*yp2-*yp1);
*yp1 = GED_MAX;
}
code1 = code (*xp1, *yp1);
}
return (0);
}
static int
code (fastf_t x, fastf_t y)
{
int cval;
cval = 0;
if (x < GED_MIN)
cval |= 01;
else if (x > GED_MAX)
cval |= 02;
if (y < GED_MIN)
cval |= 04;
else if (y > GED_MAX)
cval |= 010;
return (cval);
}
#define EPSILON 0.0001
#define INFINITY 100000000.0
/*
* V C L I P
*
* Clip a ray against a rectangular parallelpiped (RPP)
* that has faces parallel to the coordinate planes (a clipping RPP).
* The RPP is defined by a minimum point and a maximum point.
*
* Returns -
* 0 if ray does not hit RPP,
* !0 if ray hits RPP.
*
* Implicit Return -
* if !0 was returned, "a" and "b" have been clipped to the RPP.
*/
int vclip( vect_t a, vect_t b, register fastf_t *min, register fastf_t *max )
{
static vect_t diff;
static double sv;
static double st;
static double mindist, maxdist;
register fastf_t *pt = &a[0];
register fastf_t *dir = &diff[0];
register int i;
mindist = -INFINITY;
maxdist = INFINITY;
VSUB2( diff, b, a );
for( i=0; i < 3; i++, pt++, dir++, max++, min++ ) {
if( *dir < -EPSILON ) {
if( (sv = (*min - *pt) / *dir) < 0.0 )
return(0); /* MISS */
if(maxdist > sv)
maxdist = sv;
if( mindist < (st = (*max - *pt) / *dir) )
mindist = st;
} else if( *dir > EPSILON ) {
if( (st = (*max - *pt) / *dir) < 0.0 )
return(0); /* MISS */
if(maxdist > st)
maxdist = st;
if( mindist < ((sv = (*min - *pt) / *dir)) )
mindist = sv;
} else {
/*
* If direction component along this axis is NEAR 0,
* (ie, this ray is aligned with this axis),
* merely check against the boundaries.
*/
if( (*min > *pt) || (*max < *pt) )
return(0); /* MISS */;
}
}
if( mindist >= maxdist )
return(0); /* MISS */
if( mindist > 1 || maxdist < 0 )
return(0); /* MISS */
if( mindist <= 0 && maxdist >= 1 )
return(1); /* HIT, no clipping needed */
/* Don't grow one end of a contained segment */
if( mindist < 0 )
mindist = 0;
if( maxdist > 1 )
maxdist = 1;
/* Compute actual intercept points */
VJOIN1( b, a, maxdist, diff ); /* b must go first */
VJOIN1( a, a, mindist, diff );
return(1); /* HIT */
}
/*
* Local Variables:
* mode: C
* tab-width: 8
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* ex: shiftwidth=4 tabstop=8
*/
-2456
View File
File diff suppressed because it is too large Load Diff
-819
View File
@@ -1,819 +0,0 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-tcl=DIR use Tcl $DEF_VER binaries from DIR"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$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" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# 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 << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--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
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=man2tcl.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
# RCS: @(#) $Id$
# Recover information that Tcl computed with its configure script.
#--------------------------------------------------------------------
# See if there was a command-line option for where Tcl is; if
# not, assume that its top-level directory is a sibling of ours.
#--------------------------------------------------------------------
DEF_VER=8.4
# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
withval="$with_tcl"
TCL_BIN_DIR=$withval
else
TCL_BIN_DIR=`cd ../../tcl$DEF_VER$TCL_PATCH_LEVEL/unix; pwd`
fi
if test ! -d $TCL_BIN_DIR; then
{ echo "configure: error: Tcl directory $TCL_BIN_DIR doesn't exist" 1>&2; exit 1; }
fi
if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
{ echo "configure: error: There's no tclConfig.sh in $TCL_BIN_DIR; perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" 1>&2; exit 1; }
fi
. $TCL_BIN_DIR/tclConfig.sh
TCL_WIN_VERSION=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
CC=$TCL_CC
trap '' 1 2 15
cat > confcache <<\EOF
# 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. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "Makefile tcl.hpj" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@TCL_WIN_VERSION@%$TCL_WIN_VERSION%g
s%@CC@%$CC%g
s%@TCL_VERSION@%$TCL_VERSION%g
s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile tcl.hpj"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-52
View File
@@ -1,52 +0,0 @@
# This Makefile is used to create several test cases for Tcl's load
# command. It also illustrates how to take advantage of configuration
# exported by Tcl to set up Makefiles for shared libraries.
# RCS: @(#) $Id$
TCL_DBGX = @TCL_DBGX@
CC = @CC@
LIBS = @TCL_BUILD_STUB_LIB_SPEC@ @DL_LIBS@ @LIBS@ @MATH_LIBS@
AC_FLAGS = @EXTRA_CFLAGS@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD = @SHLIB_LD@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
SRC_DIR = @srcdir@
TCL_VERSION= @TCL_VERSION@
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic -DTCL_MEM_DEBUG \
${SHLIB_CFLAGS} -DUSE_TCL_STUBS ${AC_FLAGS}
all: pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgd${SHLIB_SUFFIX} pkge${SHLIB_SUFFIX}
@touch ../dltest.marker
pkga${SHLIB_SUFFIX}: $(SRC_DIR)/pkga.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkga.c
${SHLIB_LD} -o pkga${SHLIB_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
pkgb${SHLIB_SUFFIX}: $(SRC_DIR)/pkgb.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgb.c
${SHLIB_LD} -o pkgb${SHLIB_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
pkgc${SHLIB_SUFFIX}: $(SRC_DIR)/pkgc.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgc.c
${SHLIB_LD} -o pkgc${SHLIB_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
pkgd${SHLIB_SUFFIX}: $(SRC_DIR)/pkgd.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgd.c
${SHLIB_LD} -o pkgd${SHLIB_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
pkge${SHLIB_SUFFIX}: $(SRC_DIR)/pkge.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkge.c
${SHLIB_LD} -o pkge${SHLIB_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
clean:
rm -f *.o *${SHLIB_SUFFIX} config.cache config.log config.status
rm -f lib.exp ../dltest.marker
distclean: clean
rm -f Makefile
-2399
View File
File diff suppressed because it is too large Load Diff
-5554
View File
File diff suppressed because it is too large Load Diff
-2224
View File
File diff suppressed because it is too large Load Diff
-443
View File
@@ -1,443 +0,0 @@
#!/bin/sh
# configure script for zlib. This script is needed only if
# you wish to build a shared library and your system supports them,
# of if you need special compiler, flags or install directory.
# Otherwise, you can just use directly "make test; make install"
#
# To create a shared library, use "configure --shared"; by default a static
# library is created. If the primitive shared library support provided here
# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
#
# To impose specific compiler or flags or install directory, use for example:
# prefix=$HOME CC=cc CFLAGS="-O4" ./configure
# or for csh/tcsh users:
# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
# LDSHARED is the command to be used to create a shared library
# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
# If you have problems, try without defining CC and CFLAGS before reporting
# an error.
LIBS=libz.a
LDFLAGS="-L. ${LIBS}"
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
AR=${AR-"ar rc"}
RANLIB=${RANLIB-"ranlib"}
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
includedir=${includedir-'${prefix}/include'}
mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
shared=0
gcc=0
old_cc="$CC"
old_cflags="$CFLAGS"
while test $# -ge 1
do
case "$1" in
-h* | --h*)
echo 'usage:'
echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
exit 0;;
-p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
-p* | --p*) prefix="$2"; shift; shift;;
-e* | --e*) exec_prefix="$2"; shift; shift;;
-l* | --l*) libdir="$2"; shift; shift;;
-i* | --i*) includedir="$2"; shift; shift;;
-s* | --s*) shared=1; shift;;
*) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
esac
done
test=ztest$$
cat > $test.c <<EOF
extern int getchar();
int hello() {return getchar();}
EOF
test -z "$CC" && echo Checking for gcc...
cc=${CC-gcc}
cflags=${CFLAGS-"-O3"}
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
case "$cc" in
*gcc*) gcc=1;;
esac
if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
CC="$cc"
SFLAGS=${CFLAGS-"-fPIC -O3"}
CFLAGS="$cflags"
case `(uname -s || echo unknown) 2>/dev/null` in
Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
CYGWIN* | Cygwin* | cygwin* | OS/2* )
EXE='.exe';;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
# (alain.bonnefoy@icbt.com)
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
HP-UX*) LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
shared_ext='.sl'
SHAREDLIB='libz.sl';;
Darwin*) shared_ext='.dylib'
SHAREDLIB=libz$shared_ext
SHAREDLIBV=libz.$VER$shared_ext
SHAREDLIBM=libz.$VER1$shared_ext
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBV -compatibility_version $VER2 -current_version $VER"};;
*) LDSHARED=${LDSHARED-"$cc -shared"};;
esac
else
# find system name and corresponding cc options
CC=${CC-cc}
case `(uname -sr || echo unknown) 2>/dev/null` in
HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
CFLAGS=${CFLAGS-"-O"}
# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
LDSHARED=${LDSHARED-"ld -b"}
shared_ext='.sl'
SHAREDLIB='libz.sl';;
IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
CFLAGS=${CFLAGS-"-ansi -O2"}
LDSHARED=${LDSHARED-"cc -shared"};;
OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
CFLAGS=${CFLAGS-"-O -std1"}
LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
CFLAGS=${CFLAGS-"-O -std1"}
LDSHARED=${LDSHARED-"cc -shared"};;
QNX*) SFLAGS=${CFLAGS-"-4 -O"}
CFLAGS=${CFLAGS-"-4 -O"}
LDSHARED=${LDSHARED-"cc"}
RANLIB=${RANLIB-"true"}
AR="cc -A";;
SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
CFLAGS=${CFLAGS-"-O3"}
LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
CFLAGS=${CFLAGS-"-fast -xcg89"}
LDSHARED=${LDSHARED-"cc -G"};;
SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
CFLAGS=${CFLAGS-"-O2"}
LDSHARED=${LDSHARED-"ld"};;
UNIX_System_V\ 4.2.0)
SFLAGS=${CFLAGS-"-KPIC -O"}
CFLAGS=${CFLAGS-"-O"}
LDSHARED=${LDSHARED-"cc -G"};;
UNIX_SV\ 4.2MP)
SFLAGS=${CFLAGS-"-Kconform_pic -O"}
CFLAGS=${CFLAGS-"-O"}
LDSHARED=${LDSHARED-"cc -G"};;
OpenUNIX\ 5)
SFLAGS=${CFLAGS-"-KPIC -O"}
CFLAGS=${CFLAGS-"-O"}
LDSHARED=${LDSHARED-"cc -G"};;
AIX*) # Courtesy of dbakker@arrayasolutions.com
SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
LDSHARED=${LDSHARED-"xlc -G"};;
# send working options for other systems to support@gzip.org
*) SFLAGS=${CFLAGS-"-O"}
CFLAGS=${CFLAGS-"-O"}
LDSHARED=${LDSHARED-"cc -shared"};;
esac
fi
SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
if test $shared -eq 1; then
echo Checking for shared library support...
# we must test in two steps (cc then ld), required at least on SunOS 4.x
if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
CFLAGS="$SFLAGS"
LIBS="$SHAREDLIBV"
echo Building shared library $SHAREDLIBV with $CC.
elif test -z "$old_cc" -a -z "$old_cflags"; then
echo No shared library support.
shared=0;
else
echo 'No shared library support; try without defining CC and CFLAGS'
shared=0;
fi
fi
if test $shared -eq 0; then
LDSHARED="$CC"
echo Building static library $LIBS version $VER with $CC.
else
LDFLAGS="-L. ${SHAREDLIBV}"
fi
cat > $test.c <<EOF
#include <unistd.h>
int main() { return 0; }
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
echo "Checking for unistd.h... Yes."
else
cp -p zconf.in.h zconf.h
echo "Checking for unistd.h... No."
fi
cat > $test.c <<EOF
#include <stdio.h>
#include <stdarg.h>
#include "zconf.h"
int main()
{
#ifndef STDC
choke me
#endif
return 0;
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
cat > $test.c <<EOF
#include <stdio.h>
#include <stdarg.h>
int mytest(char *fmt, ...)
{
char buf[20];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return 0;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
EOF
if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
echo "Checking for vsnprintf() in stdio.h... Yes."
cat >$test.c <<EOF
#include <stdio.h>
#include <stdarg.h>
int mytest(char *fmt, ...)
{
int n;
char buf[20];
va_list ap;
va_start(ap, fmt);
n = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return n;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for return value of vsnprintf()... Yes."
else
CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
echo "Checking for return value of vsnprintf()... No."
echo " WARNING: apparently vsnprintf() does not return a value. zlib"
echo " can build but will be open to possible string-format security"
echo " vulnerabilities."
fi
else
CFLAGS="$CFLAGS -DNO_vsnprintf"
echo "Checking for vsnprintf() in stdio.h... No."
echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
echo " can build but will be open to possible buffer-overflow security"
echo " vulnerabilities."
cat >$test.c <<EOF
#include <stdio.h>
#include <stdarg.h>
int mytest(char *fmt, ...)
{
int n;
char buf[20];
va_list ap;
va_start(ap, fmt);
n = vsprintf(buf, fmt, ap);
va_end(ap);
return n;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for return value of vsprintf()... Yes."
else
CFLAGS="$CFLAGS -DHAS_vsprintf_void"
echo "Checking for return value of vsprintf()... No."
echo " WARNING: apparently vsprintf() does not return a value. zlib"
echo " can build but will be open to possible string-format security"
echo " vulnerabilities."
fi
fi
else
echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
cat >$test.c <<EOF
#include <stdio.h>
int mytest()
{
char buf[20];
snprintf(buf, sizeof(buf), "%s", "foo");
return 0;
}
int main()
{
return (mytest());
}
EOF
if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
echo "Checking for snprintf() in stdio.h... Yes."
cat >$test.c <<EOF
#include <stdio.h>
int mytest()
{
char buf[20];
return snprintf(buf, sizeof(buf), "%s", "foo");
}
int main()
{
return (mytest());
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for return value of snprintf()... Yes."
else
CFLAGS="$CFLAGS -DHAS_snprintf_void"
echo "Checking for return value of snprintf()... No."
echo " WARNING: apparently snprintf() does not return a value. zlib"
echo " can build but will be open to possible string-format security"
echo " vulnerabilities."
fi
else
CFLAGS="$CFLAGS -DNO_snprintf"
echo "Checking for snprintf() in stdio.h... No."
echo " WARNING: snprintf() not found, falling back to sprintf(). zlib"
echo " can build but will be open to possible buffer-overflow security"
echo " vulnerabilities."
cat >$test.c <<EOF
#include <stdio.h>
int mytest()
{
char buf[20];
return sprintf(buf, "%s", "foo");
}
int main()
{
return (mytest());
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for return value of sprintf()... Yes."
else
CFLAGS="$CFLAGS -DHAS_sprintf_void"
echo "Checking for return value of sprintf()... No."
echo " WARNING: apparently sprintf() does not return a value. zlib"
echo " can build but will be open to possible string-format security"
echo " vulnerabilities."
fi
fi
fi
cat >$test.c <<EOF
#include <errno.h>
int main() { return 0; }
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for errno.h... Yes."
else
echo "Checking for errno.h... No."
CFLAGS="$CFLAGS -DNO_ERRNO_H"
fi
cat > $test.c <<EOF
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
caddr_t hello() {
return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
CFLAGS="$CFLAGS -DUSE_MMAP"
echo Checking for mmap support... Yes.
else
echo Checking for mmap support... No.
fi
CPP=${CPP-"$CC -E"}
case $CFLAGS in
*ASMV*)
if test "`nm $test.o | grep _hello`" = ""; then
CPP="$CPP -DNO_UNDERLINE"
echo Checking for underline in external names... No.
else
echo Checking for underline in external names... Yes.
fi;;
esac
rm -f $test.[co] $test $test$shared_ext
# udpate Makefile
sed < Makefile.in "
/^CC *=/s#=.*#=$CC#
/^CFLAGS *=/s#=.*#=$CFLAGS#
/^CPP *=/s#=.*#=$CPP#
/^LDSHARED *=/s#=.*#=$LDSHARED#
/^LIBS *=/s#=.*#=$LIBS#
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
/^AR *=/s#=.*#=$AR#
/^RANLIB *=/s#=.*#=$RANLIB#
/^EXE *=/s#=.*#=$EXE#
/^prefix *=/s#=.*#=$prefix#
/^exec_prefix *=/s#=.*#=$exec_prefix#
/^libdir *=/s#=.*#=$libdir#
/^includedir *=/s#=.*#=$includedir#
/^mandir *=/s#=.*#=$mandir#
/^LDFLAGS *=/s#=.*#=$LDFLAGS#
" > Makefile
-529
View File
@@ -1,529 +0,0 @@
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# 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@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AWK = @AWK@
BCEDITOR = @BCEDITOR@
BLT_LIBRARY = @BLT_LIBRARY@
BLT_VERSION = @BLT_VERSION@
BN = @BN@
BRLCAD_DATA = @BRLCAD_DATA@
BRLCAD_ROOT = @BRLCAD_ROOT@
BRLCAD_VERSION = @BRLCAD_VERSION@
BU = @BU@
CC = @CC@
CFG_TCL_EXPORT_FILE_SUFFIX = @CFG_TCL_EXPORT_FILE_SUFFIX@
CFG_TCL_SHARED_LIB_SUFFIX = @CFG_TCL_SHARED_LIB_SUFFIX@
CFG_TCL_UNSHARED_LIB_SUFFIX = @CFG_TCL_UNSHARED_LIB_SUFFIX@
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
CFLAGS_WARNING = @CFLAGS_WARNING@
CONFIG_CACHE = @CONFIG_CACHE@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_TIME = @CONFIG_TIME@
CP = @CP@
CPP = @CPP@
CURSOR = @CURSOR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
DM = @DM@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_N = @ECHO_N@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
FB = @FB@
FFT = @FFT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
ITCL = @ITCL@
ITCL_VERSION = @ITCL_VERSION@
ITK = @ITK@
IWIDGETS_VERSION = @IWIDGETS_VERSION@
JAVA_CFLAGS = @JAVA_CFLAGS@
JAVA_LDFLAGS = @JAVA_LDFLAGS@
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBDL = @LIBDL@
LIBGL = @LIBGL@
LIBM = @LIBM@
LIBMALLOC = @LIBMALLOC@
LIBMX = @LIBMX@
LIBNSL = @LIBNSL@
LIBRT = @LIBRT@
LIBS = @LIBS@
LIBSGIGL = @LIBSGIGL@
LIBSOCKET = @LIBSOCKET@
LIBTHREAD = @LIBTHREAD@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIBZ = @LIBZ@
LN_S = @LN_S@
MAINT = @MAINT@
MAJOR_VERSION = @MAJOR_VERSION@
MATH_LIBS = @MATH_LIBS@
MINOR_VERSION = @MINOR_VERSION@
MULTISPECTRAL = @MULTISPECTRAL@
MV = @MV@
OBJDUMP = @OBJDUMP@
OPTICAL = @OPTICAL@
ORLE = @ORLE@
PACKAGE = @PACKAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PATCH_VERSION = @PATCH_VERSION@
PKG = @PKG@
PNG = @PNG@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
REGEX = @REGEX@
RLE = @RLE@
RM = @RM@
SAMPLE_APPLICATIONS_DIR = @SAMPLE_APPLICATIONS_DIR@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_LIBS = @SDL_LIBS@
SH = @SH@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD = @SHLIB_LD@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
STLIB_LD = @STLIB_LD@
STRIP = @STRIP@
SYSV = @SYSV@
TCL = @TCL@
TCLCAD = @TCLCAD@
TCLSTUB = @TCLSTUB@
TCL_BUILD_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
TCL_BUILD_STUB_LIB_PATH = @TCL_BUILD_STUB_LIB_PATH@
TCL_BUILD_STUB_LIB_SPEC = @TCL_BUILD_STUB_LIB_SPEC@
TCL_DBGX = @TCL_DBGX@
TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
TCL_LIBRARY = @TCL_LIBRARY@
TCL_LIB_FILE = @TCL_LIB_FILE@
TCL_LIB_FLAG = @TCL_LIB_FLAG@
TCL_LIB_SPEC = @TCL_LIB_SPEC@
TCL_LIB_VERSIONS_OK = @TCL_LIB_VERSIONS_OK@
TCL_MAJOR_VERSION = @TCL_MAJOR_VERSION@
TCL_MINOR_VERSION = @TCL_MINOR_VERSION@
TCL_NEEDS_EXP_FILE = @TCL_NEEDS_EXP_FILE@
TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@
TCL_SHARED_BUILD = @TCL_SHARED_BUILD@
TCL_SRC_DIR = @TCL_SRC_DIR@
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
TCL_STUB_LIB_PATH = @TCL_STUB_LIB_PATH@
TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
TCL_THREADS = @TCL_THREADS@
TCL_VERSION = @TCL_VERSION@
TERMIO = @TERMIO@
TERMLIB = @TERMLIB@
TK = @TK@
TKIMG_VERSION = @TKIMG_VERSION@
TKSTUB = @TKSTUB@
TK_LIBRARY = @TK_LIBRARY@
TK_VERSION = @TK_VERSION@
U = @U@
VERSION = @VERSION@
WDB = @WDB@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PREFIX = @X_PREFIX@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
YFLAGS = @YFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
mkdir_p = @mkdir_p@
noinst_LTLIBRARIES = tkimgb.la
tkimgb_la_LDFLAGS = -module
tkimgb_la_SOURCES = \
tkimg.c \
tkimgIO.c \
tkimgPPB.c \
tkimgStubInit.c \
tkimgStubLib.c \
tkimgUtils.c
AM_CPPFLAGS = \
-I${top_srcdir}/src/other/tkimg/base \
-DTKIMG_VERSION="\"${TKIMG_VERSION}\"" \
-DTKIMG_PACKAGE_NAME=\"Tkimg\" \
-DTCL_LIBRARY="\"${TCL_LIBRARY}\"" \
-DTCL_PACKAGE_PATH="\"${TCL_PACKAGE_PATH}\"" \
-DUSE_TCLALLOC=0
MAINTAINERCLEANFILES = Makefile.in
subdir = src/other/tkimg/base
mkinstalldirs = $(SHELL) $(top_srcdir)/misc/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/brlcad_config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
tkimgb_la_LIBADD =
am_tkimgb_la_OBJECTS = tkimg.lo tkimgIO.lo tkimgPPB.lo tkimgStubInit.lo \
tkimgStubLib.lo tkimgUtils.lo
tkimgb_la_OBJECTS = $(am_tkimgb_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
depcomp = $(SHELL) $(top_srcdir)/misc/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tkimg.Plo ./$(DEPDIR)/tkimgIO.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/tkimgPPB.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/tkimgStubInit.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/tkimgStubLib.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/tkimgUtils.Plo
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(tkimgb_la_SOURCES)
DIST_COMMON = README ChangeLog Makefile.am Makefile.in configure \
configure.in
SOURCES = $(tkimgb_la_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/misc/Makefile.defs $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/other/tkimg/base/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test -z "$dir" && dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
tkimgb.la: $(tkimgb_la_OBJECTS) $(tkimgb_la_DEPENDENCIES)
$(LINK) $(tkimgb_la_LDFLAGS) $(tkimgb_la_OBJECTS) $(tkimgb_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimgIO.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimgPPB.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimgStubInit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimgStubLib.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkimgUtils.Plo@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
.c.lo:
@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
CCDEPMODE = @CCDEPMODE@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
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: $(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 "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_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
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../../../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
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_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(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 "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
uninstall-am: uninstall-info-am
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES distclean \
distclean-compile distclean-depend distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am info \
info-am install install-am install-data install-data-am \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool tags uninstall uninstall-am \
uninstall-info-am
.PHONY: fast fast-am fast-recursive noprod prodclean prodclean-recursive
#
# compile all sources first, then link on a second pass. requires 2x
# disk space to account for uncertainty on whether the objects are for
# a library or an executable.
#
fast: fast-recursive
fast-am: $(FAST_OBJECTS) all-am
fast-recursive:
@list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) fast); \
done
@$(MAKE) $(AM_MAKEFLAGS) fast-am
#
# remove all of the build targets (binaries and libraries)
#
noprod: prodclean
prodclean: prodclean-recursive
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
@test -z "$(lib_LTLIBRARIES)" || echo rm -f $(lib_LTLIBRARIES) && rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test -z "$dir" && dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
@test -z "$(noinst_LTLIBRARIES)" || echo rm -f $(noinst_LTLIBRARIES) && rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test -z "$dir" && dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
prodclean-recursive:
@list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) prodclean); \
done
# 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:
-6290
View File
File diff suppressed because it is too large Load Diff